Eclipse Communications Framework

A Forensic Approach

A few months ago, I started looking into using Eclipse ECF to provide a mechanism for moving some OSGi services to a remote OSGi paradigm.  The problem that I very quickly ran into is that ECF has the least amount of documentation of any Eclipse project that I have used.  Much of the documentation is also geared toward developers who want to develop new protocols, containers, discoverers, etc.  I do not want to develop ECF, I want to use it!

Of course, after my rant about lack of documentation, I found that the ECF team is working on an ECF Users Guide.

After a few days of Google exercises, I decided to go to the source and see what I could figure out for myself.  I started by cloning the ECF repository available here: ECF Git Repository and then loaded all of the projects into a new workspace.

The Tests

I checked my Run Configurations and found that there were now several JUnit Plugin tests created from launch configurations included in the test projects.

ECF Run Configurations

I launched each of the tests and found that most completed successfully.  I was a bit surprised, since I still had several compile issues in the source.  As it turns out, the compile issues were either due to missing dependencies or were bundles in an incubation directory:

  • There are a few ECF SDO plugins that depend on EMF SDO
  • The mylyn plugin had compile issues (probably because I’m running Kepler)
  • There is an ECF provider (and test) for dnsdd that has a dependency on org.xbill.dns
  • There is an ECF provider (and test) for zookeeper that has a dependency on org.apache.hadoop.zookeper
  • There is an ECF plugin with import dependencies on the Spring Framework
  • The REST capabilities have a dependency on org.json
  • There are twitter bundles that I assume have a dependency on some Twitter packages.

The tests that did not use these items seemed to run correctly.  This was important to me so that I could get a baseline of working code to use as a comparison for my learning experiences.

The Examples

The other great way to learn from the code is to check out all of the example projects that are included in the repository.  There are several example client and server bundles with run configurations that show how the different configurations are set up to connect.

For distributed OSGi, there are different configurations of the same remote connection:

  1. Declarative Services or register the service programmatically
  2. Service Discovery or static endpoint configuration
  3. If using Service Discovery, pick from SLP, Zookeeper, or Zeroconf
  4. r-OSGi or ECF Generic
  5. Synchronous or Asynchronous with callbacks

I was able to learn a great deal about how the remote OSGi can be configured by focusing on the commonality and differences between the examples:

ECF Example Projects

All in all, I was able to get my services working in a few different configurations.  I still have a good bit of work to do because I was using EMF objects as parameters of my service methods, and EMF objects are not serializable without some extra code.  But that’s a post for another day…

This entry was posted in Eclipse and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *