Petals ESB Container

Migrate from Fractal Spoon to the new Fractal Juliac Compiler version 2.6

Details

  • Description:
    Hide

    For now we use Fractal in the following way:

    • Fractal Components implementations are annotated with an old annotation library called fraclet 2.0.2.
    • http://fractal.ow2.org/fraclet/migration.html#annotation
    • These implementation are transformed to fractaladl definitions using an old spoon maven plugin and spoonlet, the implementation of the transformation.
    • http://alchim.sourceforge.net/spoon-maven-plugin/
    • https://github.com/davidB/spoon-maven-plugin/
    • Fractal composite components are described using the fractal adl, and refer to implementation's fractaladl definitions (e.g.: <component definition="org.ow2.petals.extension.autoloader.AutoLoaderServiceImpl" name="AutoLoaderServiceImpl"/>).
    • The implementations are also modified at the bytecode level to include needed methods implementation for fractal (binding methods and so on).
    • Components are instantiated at runtime by referring to their fractaladl definition, which then instantiate the implementations when needed (e.g.: FractalHelper.createNewComponent(AUTOLOADER_COMPOSITE) with AUTOLOADER_COMPOSITE a String) and also generate classes at runtime.

    The problem with that are:

    • The bytecode manipulation makes debugging painful because the classes content is changed and recompiled with an old eclipse jdt.
    • The runtime instantiation using String is not the best in term of type safety.
    • The runtime instantiation relies on runtime bytecode manipulation and interface creation, which is not the most efficient.
    • The runtime instantiation prevent the use of tools like jacoco for verifying test coverage.
    • The implementation used is old and maybe some bugfixes were fixed now.
    • The spoon version we need and the fraclet are not maintained anymore

    With Juliac, we would use Fractal like this:

    • Fractal Components implementations are annotated with the new annotation library called fraclet 3.3.
    • http://fractal.ow2.org/fraclet/migration.html#annotation
    • Fractal composite components are described using the fractal adl, and refer to implementation's fractaladl definitions (e.g.: <component definition="org.ow2.petals.extension.autoloader.AutoLoaderServiceImpl" name="AutoLoaderServiceImpl"/>).
    • Juliac will generate the classes needed by component that were previously generated at runtime
    • Juliac will generate the classes for the implementations, but without modifying them, only generating new classes that refer to the implementation
    • Juliac will generate classes for the composites.
    • Composites will be instantiable from their generated class (Petals.newFcInstance())
    • Implementation, if needed for example for extensions, will be instantiable from the generated class (that have a name that contains a unique but stable id, see http://mail.ow2.org/wws/arc/fractal/2015-02/msg00030.html to understand why)

    Advantages will be:

    • no runtime bytecode manipulation
    • no offline bytecode manipulation
    • nice debugging
    • cleaner code
    • potential bug fixes
    • maintained tool (spoon and fraclet were not really maintained)

    Discussions for this to be possible (because it doesn't work with the current stable version of juliac) are initiated:

    Work to be done:

    • migrate all the fractal implementations to the new fraclet annotation (I did it already locally for the microkernel)
    • change the way components are instantiated: normally we just need to replace calls to fractal.adl.Factory with calls to the generated class... to be investigated!
    Show
    For now we use Fractal in the following way:
    • Fractal Components implementations are annotated with an old annotation library called fraclet 2.0.2.
    • http://fractal.ow2.org/fraclet/migration.html#annotation
    • These implementation are transformed to fractaladl definitions using an old spoon maven plugin and spoonlet, the implementation of the transformation.
    • http://alchim.sourceforge.net/spoon-maven-plugin/
    • https://github.com/davidB/spoon-maven-plugin/
    • Fractal composite components are described using the fractal adl, and refer to implementation's fractaladl definitions (e.g.: <component definition="org.ow2.petals.extension.autoloader.AutoLoaderServiceImpl" name="AutoLoaderServiceImpl"/>).
    • The implementations are also modified at the bytecode level to include needed methods implementation for fractal (binding methods and so on).
    • Components are instantiated at runtime by referring to their fractaladl definition, which then instantiate the implementations when needed (e.g.: FractalHelper.createNewComponent(AUTOLOADER_COMPOSITE) with AUTOLOADER_COMPOSITE a String) and also generate classes at runtime.
    The problem with that are:
    • The bytecode manipulation makes debugging painful because the classes content is changed and recompiled with an old eclipse jdt.
    • The runtime instantiation using String is not the best in term of type safety.
    • The runtime instantiation relies on runtime bytecode manipulation and interface creation, which is not the most efficient.
    • The runtime instantiation prevent the use of tools like jacoco for verifying test coverage.
    • The implementation used is old and maybe some bugfixes were fixed now.
    • The spoon version we need and the fraclet are not maintained anymore
    With Juliac, we would use Fractal like this:
    • Fractal Components implementations are annotated with the new annotation library called fraclet 3.3.
    • http://fractal.ow2.org/fraclet/migration.html#annotation
    • Fractal composite components are described using the fractal adl, and refer to implementation's fractaladl definitions (e.g.: <component definition="org.ow2.petals.extension.autoloader.AutoLoaderServiceImpl" name="AutoLoaderServiceImpl"/>).
    • Juliac will generate the classes needed by component that were previously generated at runtime
    • Juliac will generate the classes for the implementations, but without modifying them, only generating new classes that refer to the implementation
    • Juliac will generate classes for the composites.
    • Composites will be instantiable from their generated class (Petals.newFcInstance())
    • Implementation, if needed for example for extensions, will be instantiable from the generated class (that have a name that contains a unique but stable id, see http://mail.ow2.org/wws/arc/fractal/2015-02/msg00030.html to understand why)
    Advantages will be:
    • no runtime bytecode manipulation
    • no offline bytecode manipulation
    • nice debugging
    • cleaner code
    • potential bug fixes
    • maintained tool (spoon and fraclet were not really maintained)
    Discussions for this to be possible (because it doesn't work with the current stable version of juliac) are initiated: Work to be done:
    • migrate all the fractal implementations to the new fraclet annotation (I did it already locally for the microkernel)
    • change the way components are instantiated: normally we just need to replace calls to fractal.adl.Factory with calls to the generated class... to be investigated!
  • Environment:
    -

Activity

Victor NOËL made changes - Thu, 12 Feb 2015 - 11:40:01 +0100
Field Original Value New Value
Assignee Christophe DENEUX [ cdeneux ] Victor NOËL [ vnoel ]
Victor NOËL made changes - Thu, 12 Feb 2015 - 13:34:37 +0100
Priority Blocker [ 1 ]
Description For now we use Fractal in the following way:
 - Fractal Components implementations are annotated with an old annotation library called fraclet 2.0.2.
  - http://fractal.ow2.org/fraclet/migration.html#annotation
 - These implementation are transformed to fractaladl definitions using an old spoon maven plugin and spoonlet, the implementation of the transformation.
  - http://alchim.sourceforge.net/spoon-maven-plugin/
  - https://github.com/davidB/spoon-maven-plugin/
 - Fractal composite components are described using the fractal adl, and refer to implementation's fractaladl definitions (e.g.: <component definition="org.ow2.petals.extension.autoloader.AutoLoaderServiceImpl" name="AutoLoaderServiceImpl"/>).
 - The implementations are also modified at the bytecode level to include needed methods implementation for fractal (binding methods and so on).
 - Components are instantiated at runtime by referring to their fractaladl definition, which then instantiate the implementations when needed (e.g.: FractalHelper.createNewComponent(AUTOLOADER_COMPOSITE) with AUTOLOADER_COMPOSITE a String) and also generate classes at runtime.

The problem with that are:
 - The bytecode manipulation makes debugging painful because the classes content is changed and recompiled with an old eclipse jdt.
 - The runtime instantiation using String is not the best in term of type safety.
 - The runtime instantiation relies on runtime bytecode manipulation and interface creation, which is not the most efficient.
 - The runtime instantiation prevent the use of tools like jacoco for verifying test coverage.
 - The implementation used is old and maybe some bugfixes were fixed now.
 - The spoon version we need and the fraclet are not maintained anymore

With Juliac, we would use Fractal like this:
 - Fractal Components implementations are annotated with the new annotation library called fraclet 3.3.
  - http://fractal.ow2.org/fraclet/migration.html#annotation
 - Fractal composite components are described using the fractal adl, and refer to implementation's fractaladl definitions (e.g.: <component definition="org.ow2.petals.extension.autoloader.AutoLoaderServiceImpl" name="AutoLoaderServiceImpl"/>).
 - Juliac will generate the classes needed by component that were previously generated at runtime
 - Juliac will generate the classes for the implementations, but without modifying them, only generating new classes that refer to the implementation
 - Juliac will generate classes for the composites.
 - Composites will be instantiable from their generated class (Petals.newFcInstance())
 - Implementation, if needed, will be instantiable from... TOBEVERIFIED

Advantages will be:
 - no runtime bytecode manipulation
 - no offline bytecode manipulation
 - nice debugging
 - cleaner code
 - potential bug fixes
 - maintained tool (spoon and fraclet were not really maintained)

Discussions for this to be possible (because it doesn't work with the current stable version of juliac) are initiated:
 - http://mail.ow2.org/wws/arc/fractal/2015-01/msg00000.html
 - Now it works good (using the 2.6-SNAPSHOT version of juliac): http://mail.ow2.org/wws/arc/fractal/2015-02/msg00024.html
 - We are waiting for a release then :)

Work to be done:
 - migrate all the fractal implementations to the new fraclet annotation (I did it already locally for the microkernel)
 - change the way components are instantiated: this has to be investigated, many questions are still open!!
For now we use Fractal in the following way:
 - Fractal Components implementations are annotated with an old annotation library called fraclet 2.0.2.
  - http://fractal.ow2.org/fraclet/migration.html#annotation
 - These implementation are transformed to fractaladl definitions using an old spoon maven plugin and spoonlet, the implementation of the transformation.
  - http://alchim.sourceforge.net/spoon-maven-plugin/
  - https://github.com/davidB/spoon-maven-plugin/
 - Fractal composite components are described using the fractal adl, and refer to implementation's fractaladl definitions (e.g.: <component definition="org.ow2.petals.extension.autoloader.AutoLoaderServiceImpl" name="AutoLoaderServiceImpl"/>).
 - The implementations are also modified at the bytecode level to include needed methods implementation for fractal (binding methods and so on).
 - Components are instantiated at runtime by referring to their fractaladl definition, which then instantiate the implementations when needed (e.g.: FractalHelper.createNewComponent(AUTOLOADER_COMPOSITE) with AUTOLOADER_COMPOSITE a String) and also generate classes at runtime.

The problem with that are:
 - The bytecode manipulation makes debugging painful because the classes content is changed and recompiled with an old eclipse jdt.
 - The runtime instantiation using String is not the best in term of type safety.
 - The runtime instantiation relies on runtime bytecode manipulation and interface creation, which is not the most efficient.
 - The runtime instantiation prevent the use of tools like jacoco for verifying test coverage.
 - The implementation used is old and maybe some bugfixes were fixed now.
 - The spoon version we need and the fraclet are not maintained anymore

With Juliac, we would use Fractal like this:
 - Fractal Components implementations are annotated with the new annotation library called fraclet 3.3.
  - http://fractal.ow2.org/fraclet/migration.html#annotation
 - Fractal composite components are described using the fractal adl, and refer to implementation's fractaladl definitions (e.g.: <component definition="org.ow2.petals.extension.autoloader.AutoLoaderServiceImpl" name="AutoLoaderServiceImpl"/>).
 - Juliac will generate the classes needed by component that were previously generated at runtime
 - Juliac will generate the classes for the implementations, but without modifying them, only generating new classes that refer to the implementation
 - Juliac will generate classes for the composites.
 - Composites will be instantiable from their generated class (Petals.newFcInstance())
 - Implementation, if needed for example for extensions, will be instantiable from the generated class (that have a name that contains a unique but stable id, see http://mail.ow2.org/wws/arc/fractal/2015-02/msg00030.html to understand why)

Advantages will be:
 - no runtime bytecode manipulation
 - no offline bytecode manipulation
 - nice debugging
 - cleaner code
 - potential bug fixes
 - maintained tool (spoon and fraclet were not really maintained)

Discussions for this to be possible (because it doesn't work with the current stable version of juliac) are initiated:
 - http://mail.ow2.org/wws/arc/fractal/2015-01/msg00000.html
 - Now it works good (using the 2.6-SNAPSHOT version of juliac): http://mail.ow2.org/wws/arc/fractal/2015-02/msg00024.html
 - We are waiting for a release then :)

Work to be done:
 - migrate all the fractal implementations to the new fraclet annotation (I did it already locally for the microkernel)
 - change the way components are instantiated: normally we just need to replace calls to fractal.adl.Factory with calls to the generated class... to be investigated!
Christophe DENEUX made changes - Thu, 12 Mar 2015 - 09:37:31 +0100
Status New [ 10000 ] Open [ 10002 ]
Priority Blocker [ 1 ] Major [ 3 ]
Component/s Artifact repository [ 10254 ]
Component/s Autoloader [ 10253 ]
Component/s Component framework [ 10258 ]
Component/s ComponentContext [ 10110 ]
Component/s Configuration [ 10257 ]
Component/s Installation/Deployment [ 10041 ]
Component/s JMX [ 10256 ]
Component/s Micro-kernel [ 10291 ]
Component/s Monitoring [ 10078 ]
Component/s Persistence [ 10057 ]
Component/s Recovery [ 10077 ]
Component/s Registry [ 10058 ]
Component/s Repository [ 10160 ]
Component/s Router [ 10070 ]
Component/s Topology/network [ 10061 ]
Component/s Transporter [ 10062 ]
Component/s WS API [ 10260 ]
Christophe DENEUX made changes - Thu, 12 Mar 2015 - 09:37:46 +0100
Fix Version/s 4.3.0 [ 10413 ]
Victor NOËL made changes - Fri, 27 Mar 2015 - 11:58:42 +0100
Status Open [ 10002 ] In Progress [ 10003 ]
Victor NOËL made changes - Fri, 27 Mar 2015 - 11:58:56 +0100
Status In Progress [ 10003 ] Resolved [ 10004 ]
Resolution Fixed [ 1 ]
Victor NOËL made changes - Wed, 15 Jul 2015 - 09:32:01 +0200
Summary Migrate from Fractal Spoon to the new Fractal Juliac Compiler Migrate from Fractal Spoon to the new Fractal Juliac Compiler version 2.6

People

Dates

  • Created:
    Thu, 12 Feb 2015 - 11:39:50 +0100
    Updated:
    Wed, 15 Jul 2015 - 09:32:01 +0200
    Resolved:
    Fri, 27 Mar 2015 - 11:58:56 +0100