cancel
Showing results for 
Search instead for 
Did you mean: 

pvm will be moved into engine

tombaeyens
Champ in-the-making
Champ in-the-making
after some reflection and seeing the disadvantages of extracting pvm as a separate module, we came to the conclusion that pvm should be merged into the engine.

in the future, the interpretation algorithm should work against interfaces (instead of the impl objects).  that way we can build separate runtime execution datamodels for the different strategies like pojo usage, DB persistent usage (with lazy loading) and later also a cloud based runtime execution model.

the plan is that next week i'll merge pvm into the engine module.  after that we can still work further towards those long term goals without impacting the api.

also the separate juel module will be merged into the engine module.
3 REPLIES 3

gnodet
Champ in-the-making
Champ in-the-making
Ok, I'll defer adding the OSGi metadata to the jars until the refactoring is done then.

falko_menge
Champ in-the-making
Champ in-the-making
@tom: Could you quickly summarize the disadvantages of extracting PVM as a separate module?

tombaeyens
Champ in-the-making
Champ in-the-making
* we had to build in many polymorphic methods in the pvm classes so that we can inject special behavior in the engine.  implementation of lazy initialization hooks in the base class is really unreadable and unmaintainable

* one other situation now arises where the pvm uses a classloader.  in the engine we want to make the classloader configurable.  but in the pvm, we can't access the process engine configuration.

* variables in the pvm are stored in a Map<String, Object>.  then in the engine we provided a VariableMap implements Map<String, Object> that translates all the values into persistable VariableInstance.  Because the PVM uses the map api, we cannot introduce backpointers from VariableInstance to execution easily or do other engine specific stuff with variables.

* we now have figured out a new strategy for dealing with different environments.  if we extract the interfaces of the model that the interpretation algorithm needs, then we can build different domain models and still have one engine to interprete those different models.  then we can build a plain pojo model, a dedicated mybatis persistence model, a cloud model etc.

those are the ones that I recall from the top of my head