Monday, November 2, 2009

Less EMF!

This year's Eclipse summit was a great success, again. Before I start to chatter about the modeling technologies that I found most interesting, I'd like to point out that there also seems to be some sort of anti modeling coalition. It's clear that the public statement that "Modeling sucks!", without further reasoning, is more likely to create common hilarity than constructive engagement in the challenges and opportunities. A pity that I missed the Foundation 2.0 talk!

I noticed that others took the war against modeling and EMF in particular more seriously. There seems to be a whole industry concerned with devices that shield against EMF and the like. They are sold with the slogan "Less EMF", go figure:


Of course these attempts to discredit the value of modeling are doomed to failure, as the overwhelming interest in Eclipse modeling technologies at the past summit demonstrated. The tutorial about Advanced Programming Techniques with EMF and CDO was so overly crowded that the organizers had to take all tables out of the room and make place for almost 100 attendees.


At least the same amount of interested persons stayed in that room to participate in the discussions of the following modeling symposium. All the other talks (24 total) and BOFs about modeling had been extremely well attended, too. Some of them were of particular interest for me and the CDO Model Repository project:

  • The new EMF Model Query provides an SQL-like query language, cool (Xtext-based?) tooling and an extensible query orchestration and interpretation framework. The SAP team announced that an integration with the CDO server side is very interesting.

  • Frederic Jouault and Hugo Bruneliere compared Eclipse modeling and Microsoft Oslo technologies and had some ideas how to bridge the two worlds and transform artifacts between both. They mentioned that Oslo misses a model repository.

  • Cedric Brun demonstrated the Acceleo generator tooling and gave insights to the process of bringing this project into Eclipse.org. The tooling looked so comfortable that I thought I should give generative approaches a new chance in the CDO code itself.

  • Kenn Hussey and Raphael Faudougave a BOF and a talk on Papyrus, the new integrated modeling environment at Eclipse.org. These ones were really interesting because some large companies announced that they want to participate in a general initiative with the goal of providing a commercial quality modeling tool with various diagramming support, queries, refectorings and a lot more. CDO was seen in the center of this new architecture to provide client-side scalability, model storage and collaboration.

  • Markus Herrmannsdoerfer gave a talk that I awaited for a long time already. It was about the COPE framework that seems to do a great job to assist with model evolution (they call it adaptation) and the subsequent instance data migration. Very interesting stuff! Many CDO users have asked for more support in this area and it's clear that we need to provide solutions in a world of changing businesses.

  • Hajo Eichler demonstrated his ideas on executable models. And he did that very well. Last not least because he copied major parts of my own slides. Sure, he asked for my permission, but because he also changed the copyright to his own's Ed announced that we might send the police after him. Two minutes later we could hear their alarms from outside and he got really worried. Poor Hajo!

  • Goulwen Le Fur gave an introduction to the new Extended Editing Framework project which is about generating "sexy" properties sheets and possibly object data entry forms. I really hope that they add support for reflective models soon, so that we can use this cool technology in our CDO Explorer UI.


Today it's exactly one year ago that I startet blogging and since that time I was allowed to realize how much positive impact a little marketing can have on a technology like CDO. Some of my friends startet a private competition in finding modeling talks at the summit with no mention of CDO. Not an easy task ;-)

I realize that these days more and more modelers are interested in a model repository, either for using it as a runtime platform for their own products or for storing their design time models. I'm glad that we, the CDO team, have forseen this interest and for the future I hope that we can have even more collaboration and consolidation with other efforts in this area:

Please work with us
on adding the cool features to CDO that you need!

Wednesday, September 30, 2009

EMF Tips #3: Why should I want to generate editors?

I thought about treating you with more of those beautiful flowers in Ed's garden but there's still material from our trip to Toronto. Thanks to Dave (Dave, the book, not the Google Bear!) and Kevin for organizing cool downtown and clubbing tours. And for demonstrating how dynamic IBM really is. Thanks also to Lynn and Kenn for showing us Ottawa. Damn, from getting almost one finger between Toronto and Ottawa on the map I deduced that it might be an hour's trip. It is not! Canada is sooo big.


So, why should I want to generate editors for my models? Have you ever thought about this? Or are you politely generating these editor plug-ins, just because it's possible? Or fun?


You might remember that I have 28 models in my workspace. Let's, for a moment, assume I generated 28 additional editor plug-ins into my workspace. A lot of code to maintain and we should be absolutely sure that this is (a) necessary and (b) appropriate!


To judge if it's necessary to generate editors on a per-model basis we need to compare the generated code of two such editor plu-ins. Interestingly, it boils down to a single difference in the initializeEditingDomain() method where the ItemProviderAdapterFactory for the model is added to the ComposedAdapterFactory. More interestingly, the editor will continue to function properly even if you remove this model-specific line! The reason is that the ComposedAdapterFactory delegates to a registry of descriptors which are contributed to the extension registry by the edit plug-ins. You see, it's clearly not necessary to have a generated editor per model.


And usually it's also not appropriate to have vast numbers of editors that are all alike. Model editors are a means to implement functionality that is orthogonal to the models. Things like ordering of nodes and properties, changing colors, fonts and so on are achieved by customizing the editor. I really don't want to duplicate all these UI-related, i.e. model-independent, aspects over 28 editors! And don't forget, your model can be used in other generated editors (other than the one that has been generated for this particular model).


All we need is a single generated editor for all our models.


Eventually we'll need additional editors for additional UI-related requirements, but not for additional models. The same arguments are certainly valid for the generated wizards. One difference between the generated editor plug-ins that I did not talk about, yet, is the editor and wizard markup in the plugin.xml. Our reusable editor would at least have to be prepared that it can be associated with different file extensions, depending on the set of deployed model or edit plug-ins.

Tuesday, September 29, 2009

EMF Tips #2: Tweaking my Genmodel

The major part of this month I've been on vacation in Toronto and spent a wonderful time with René, Ed and Frank. Ed's garden is as beautiful as one might expect and I was busy collecting evidence of that.


Too busy to keep up with my EMF Tips blog series. In part #1 we discussed ways to easily generate multiple models. Thanks for all the helpful comments.


This part focusses on tayloring and tweaking the outputs of a single generator model. The default Genmodel properties lead to generation of four plug-ins: model, edit, editor and tests.


We will always need the model plug-in itself but often we don't need all of the other three outputs, so how do we exclude particular plug-ins from generation?


The Genmodel has a properties category for each of the output plug-ins: Edit, Editor and Tests. Completely switching off the generation of any of these is as simple as deleting the respective Directory property.


The generator UI will immediately reflect this by disabling the respective Generate menu item. Even the Shift+Alt+G dialog from tip #1 will adjust accordingly.


The next part of this series will focus on the interesting question "Why should I want to generate editors?". For now, you'd know how to avoid it. Stay tuned.


I was just told that there are still three seats available for the Eclipse Modeling Code Camp training that Ed and I will be giving next month (starting October, 12th) in Munich. Don't miss this great opportunity to spend four days with us and become

the world's greatest modeler!

Saturday, August 22, 2009

EMF is Awesome!

This is one of the conclusions in the first part of an article series I wrote for the german Eclipse Magazin. I already blogged about the included example application eDine. Now the article has been promoted to the JAXenter portal, where it can be read by everybody who's able to read German:


In this article I elaborate on some internal details of EMF regarding scalability (see also my blog How Scalable are my Models?) before I dive into a detailed explanation of the CDO Model Repository.


The second part of this series will show you how to use EMF and CDO to build distributed, scalable and model-based application systems. The comprehensive example that will be included in that article is already available in the Eclipse CVS. I'll leave a note here when the second part is publicly available on JAXenter.


In case there's a translation geek out there, willing to help me translate these articles into English for a broader audience, please drop me a note. A seat in the CDO hall of fame is guaranteed :P

Monday, August 17, 2009

Modeling Stammtisch Details

Our poll for the upcoming Eclipse Modeling Stammtisch in Berlin was successful enough to arrange for a nice location and time. Jens v. Pilgrim sent me a proposal which I liked, too:

Prater Garten

Kastanienallee 7 – 9
10435 Berlin
(Prenzlauer Berg)

Begin: 18:30
End: Open

For the outside area it's not possible to reserve tables but they promised me that at this early time it'll be next to sure that we don't end up without a table for 25 persons. The rush hour there is only around 20:00.


Thank you, Jens, for the suggestion. We hope to meet you all there in two days...

Friday, August 14, 2009

Eclipse Foundation funds my Project

Some discussion has been going on about revenue models for open source projects and their committers. Many good ideas, some whining, and also some misconceptions. One of those was brought to my attention several times just recently by users of CDO and by some of my customers. They seem to believe that

The Eclipse Foundation funds my Project

This is simply not true, neither for my projects, CDO and Net4j, nor for any other Eclipse project. The Foundation's revenue, as well as the donations to the Foundation, are spent in a way that more or less suits all projects equally. Staff must be paid, servers operated, marketing be done, and so on.



All projects are responsible for their own funding. In particular the committers are either employees and paid by their employer (who'd better have a good business model for being able to continue to fund open source development) or so called individual committers, in which case they have to look after themselves for their funding or just do the work for their own gratification.


To make a project successful a great deal of marketing has to be done which often incurs additional costs such as conference fees and travel expenses. I tend to think that the community benefits from these marketing efforts in a similar way as from the usage of open source product itself. The more people are using a product the quicker it will mature to something really great. And the needed funding can be distributed among even more shoulders.



I'm clearly an individual committer and I'm usually working full-time on my two Eclipse projects, for more than five years now. This can and will only continue to work if enough users of the project results realize that nothing is really free:

Open source software is free.

Free like in freedom
but not gratis!


I hope this does not sound too much like whining. It's not intended to be like that. In fact I appreciate that more and more companies that reap benefit and revenue from using open source technologies realize the subtle but essential economic mechanisms that guarantee continuation of their business model. I'd like to take this as a chance to thank my own customers: It has always been fun to spend time with you being incredibly creative and productive to our mutual benefit!

Thursday, August 13, 2009

EMF Tips #1: How the hell do I generate my 28 models?

Recently Ed pointed me to a "hidden" feature in EMF which I always thought I was missing. I take this as an opportunity to launch a series of EMF blogs with hints around EMF, starting with:

How the hell do I generate my 28 models?

In CDO and Net4j together we have 28 models, many of them being test or example models. It has always been a hazzle to regenerate them for new versions of EMF having been published. The best approach I was aware of is a manual loop like this:


I always wished there was a view with all genmodels so that I could select multiple genmodels and regenerate them with a single click. I had such a view in GenFw and even an incremental genmodel generator.

I bet you didn't know the default key binding Shift+Alt+G (M2+M3+G)? I didn't! Go figure:


A dialog opens that lists all genmodels in the workspace. The next page lets you select the sub models to be regenerated:


Before you switch to the second page be sure that all the genmodels selectedin page one can be opened with the genmodel editor without errors. Otherwise the wizard could indefinitely block the UI. Apart from this little lesson it works great and will spare me a lot of dumb effort in the future. Kudos to Marcelo for this neat (but somehow hidden) feature!

Wednesday, August 12, 2009

Eclipse Modeling Stammtisch

On Wednesday August 19th Ed and Ralph will be in Berlin and we thought it'd be cool to have an Eclipse Modeling Stammtisch together with you. Here's the invitation:

If you are a modeling newbie and don't understand this abstract syntax just drop me a note so that I can come up with an invitation in a general purpose language. Of course I'd use JET for this purpose :P

Don't forget to add yourself to our poll in order to help us finding an appropriate location!

Hoping to see you in a week...

Wednesday, July 15, 2009

Eclipse Code Camp – Modeling


You are interested to learn about Eclipse Modeling? You would like to optimize your EMF usage or learn about amazing add-on technologies like CDO or EMF data binding?

Then come to Munich in October and have a thrilling time with Ed and me! We're looking forward to meet you at the

Wednesday, June 10, 2009

Meet the Eclipse Directors in Berlin

I was asked to arrange for a community "Stammtisch" while the Eclipse board of directors is meeting in Berlin next week. It is the first time that the Eclipse board has ever met outside of the USA.

Everybody is invited to join us:

Date: Tuesday, 2009-06-16
Time: 7:00 p.m.
Restaurant: Bavarium
Location: Europa Center, Berlin
Registration: Doodle poll

The Eclipse Foundation will pay for the drinks and the room has capacity for 50 persons. There are no technical sessions planned!

Thursday, June 4, 2009

When the Whole is Less than the Sum of its Parts

I did not know that this scenario is called Reductionism in ancient literature! I only stumbled on it now when I tried to track down why my daily backups started failing recently. Hold your breath:


The other week I installed a new anti virus tool because it better integrates with my software firewall and the rest of that security suite. In fact it found some new potential infections but I did not care too much because detection is heuristics-based. To be safe I kept all those files in the quarantine folder. I even activated the auto-quarantine feature. Anti virus now looked like a good part of my system.


Now my daily backups: For a long time they also were a good part of my system but since last week they did not complete successfully anymore. The same meaningless error message every time. Not cool!


I found out the reason (well, Google helped a lot): The backup by default copies all changed files to a temporary folder. Including my quarantine folder! The new anti virus tool eagerly detects a new infection and moves the file back to the normal qurantine folder, while the backup process is trying to work with it. Bang!

I saw this thing in the computer history museum in Palo Alto ;-)

Amazing how complex and interrelated the problems of modern computer systems can be. My mother used to be kind of a luddite but nowadays she claims to have fun with the computer and the net. I wonder how she would cope with such stuff?


All this reminds me to the recent discussions about technological complexity and simplicity of the real world:

How to explain EMF?

Why is RCP, EMF, p2, databinding... so hard to learn?

If Only it Were That Simple

Friday, May 29, 2009

Target Platform Provisioning

For CDO and Net4j we used to have a special Ant script that downloads a well-defined set of dependencies and installs them into a target platform that is contained by the metadata section of the wokspace. The same script also cares to setup a well-defined API baseline. While this was handy in the absence of other mechanisms it always suffered from some issues:

  • Maintenance burden to keep the versions up to date. Since the automated build is designed differently this was redundant and prone of errors.
  • 3rd party bundles were taken from SpringSource which is not a p2 repository. The SpringSource bundles make heavy use of the "uses" manifest header attribute, often resulting in broken configurations.
Some time after reading Chris's blog about the new target platform provisioning I started to play with it and it really was easy. I came up with a simple target definition for CDO:


Initially I started with a "Directory" provisioner for the SpringSource bundles but then I decided to create an own p2 repository at SourceForge.net: Net4j and CDO Plus Updates. This can now be used to provision your IDE as well as parts of the CDO target platform. Pressing "Set as Target Platform" did its job without problems: In the end all bundles compiled without errors.

So, in the future I'd really like to use this great mechanism for provisioning my target platform but unfortunately there's a show stopper: The target definition carries explicit versions for all the configured features and there's currently no way to update them automatically. I'd really wish it was as easy as my IDE updates are nowadays but it turns out that, once the repositories offer newer versions, not only these are not picked up but the target definition editor even refuses to list the old features. I had to start from scratch and this is certainly no better than what we had before.

There's a bugzilla to track the addition of an update button in the target provisioner. I guess that would finally give me what I need to make use of the whole new target platform provisioning. Anyway, this is great stuff and I appreciate very much all the effort that has been spent so far. Thank you guys!

Tuesday, April 28, 2009

New Project Artwork

Yesterday I sat down, installed InkScape and worked on the new project logos for CDO and Net4j. Darn it: designing software and designing logos are two different things! Personally I liked this one:



But all my friends complained: "Too childish!!!"
I sat down again and tried something more honest.
Here is the new CDO project logo:



And here is the new Net4j project logo:


Sunday, April 26, 2009

Modeling goes Enterprise

I just finished the second part of my article "Modeling goes Enterprise - About EMF and CDO". It will be published in the Eclipse Magazin next month. Thanks to Sebastian Meyen and Hartmut Schlosser I'm allowed to make the example application, discussed in the article, available in the Eclipse CVS!

The splash picture was taken in my kitchen

The example is a set of applications (IDE, headless, 3x RCP, Servlet) used to support the business of the electronic restaurant "eDine", where they have touch computers at all the tables and at the bar and in the kitchen. Special RCP applications operate on a distributed shared EMF model which is provided by a headless CDO repository server.

Running the Example


1) Install the example
2) Start the server process
  • Start the "GastroServer" launch config. It creates a Derby database at "/gastro".
  • Watch the console output.

3) Populate the repository
  • Start the "GastroTestClient1" launch config. It opens a runtime IDE with generic CDO support.
  • Open the "CDO Sessions" view.
  • Add a new session (green plus button). Enter "tcp://localhost" and "gastro".
  • Open a new transaction (right-click on the session).
  • Import the /org.gastro.testclient/inventory.xml resource into "/eDine/inventory".
  • Commit the transaction (right-click on the transaction or just save the editor).


4) Start the RCP application for table 1 (and optionally for table 2)
  • Start the "GastroTable1" launch config. It opens an RCP application.
  • Browse through the menu card and select some offerings here and there.


5) Start the RCP application for the bar
  • Start the "GastroDepartment1" launch config. It opens an RCP application for the barkeeper.
  • Watch orders coming in.
  • Eventually click on order details to mark them SERVED and watch the order disappearing when completed.

6) Start the RCP application for the kitchen
  • Start the "GastroDepartment2" launch config. It opens an RCP application for the cook.
  • Eventually click on order details to mark them SERVED and watch the order disappearing when completed.


7) Send an order (if the RCP applications are all started, see steps 4-6)
  • In the table application open the second shelf pane and send the order.
  • Watch how the relevant order details "arrive" in the bar and kitchen applications...


8) Browse the menu card via Web
  • Start a web browser and point it to "http://localhost:9090/gastro"

Enjoy your meal! ;-)

Thursday, April 16, 2009

Brandenburger Tor at JAX 2009

I'm just preparing the slides for my talk at the JAX 2009 conference next week in Mainz, Germany:

Scale, Share and Store your Models with CDO 2.0

Wednesday, Apr. 22th, 2009
08:45 - 09:45

Monday, March 23, 2009

LongTalk[ ] cdo;

Only by accident I realized that my EclipseCon talk about the CDO Model Repository is allocated in two different rooms at the same time! I'm not yet sure how to manage this new challenge. The conference web schedule lists the CDO talk on Tuesday 11:10 am in room 206 and the printed programme allocates it in room 207. Fortunately both rooms are located side by side...

Those of you who attended my talks previously might notice that I recreated all the slides from scratch. I'm pretty confident that we'll manage to go on an interesting and diverting trip touching all the concepts and features that make CDO a great runtime platform for scalable and distributed models.


With CDO models go enterprise!
You can go there, too...

Wednesday, March 11, 2009

EMF on Server

I've been quiet for a while, mostly because of the mega refactoring that CDO is currently undergoing. Did you know that until now a CDO server did not have any dependencies on EMF? The following diagram summarizes what had been the status quo in this context for over two years:

As you can see, all EMF concepts had been converted to CDO concepts directly under the visible surface. It turned out that this approach had several drawbacks:
  • No generated EOperation logic on the server
  • No generated EDataType serialization
  • No EMF tools on the server (Compare, OCL, ...)
  • Backend integrators can not use EObject
  • Server extenders can not use EModelElement
So we decided to eliminate these restrictions by applying a two-step refactoring. The first step was to abandon CDOPackage completely and replace it with EPackage everywhere. This included replacements of CDOClass, CDOAttrbute and CDOReference as well. And CDOPackageManager was replaced by a new, very sophisticated version of CDOPackageRegistry. After one month of refactoring and testing the new status quo looks as follows:

In fact this was the biggest and most impacting refactoring since the complete re-write of version 0.7. Here are some numbers:
  • 69378 changed lines of code
  • 1736 changed files
  • 2.8 MB patch file size
  • 13% performance increase
The deployment of the new design will require re-creation of the backends, i.e. export data, re-create database, import data! Most clients will not be affected if they are properly coded against EMF APIs. The HibernateStore will be excluded from the builds for some time and then re-appear as a separate download to compensate p2 issues with missing, non-EPL dependencies.

Kudos go to Simon, who took over when I fell asleep, to Vik, who adjusted the UI and to Martin, who will adjust the HibernateStore. And apologies for the maintenance congestion that was caused by a locked HEAD.

After the merge to HEAD we'll be able to face the second step of the refactoring and make CDO-controlled EObjects available on the server:

This will open the door to some exciting new functionality on the server like:
  • Commit validation based on OCL
  • Common query based on OCL
  • Annotation-driven model mappings
  • Easier embedding into clients
Don't forget to block an hour for my CDO talk at the EclipseCon!

Friday, January 30, 2009

Can the fish in Ed´s aquarium bark?

Wow, our Hightech Webinar yesterday was a great success, given these numbers:

Attendance
110 registered – 25th highest out of 48 webinars
95 attended live – 16th highest out of 48 webinars
86.4% of registered attended live – 3rd highest out of 48 webinars

And a lot of fun, too, given these numbers:

Did you find this webinar useful?
91% (39) – Yes
2% (1) – Yes, but it was too technical
7% (3) – Yes, but it was not technical enough
0% (0) – No

I'd like to thank all of you for your interest that you showed by asking lots of questions. In fact so many that I could only answer very few of them during the webinar. For this reason I went through the chat transcript and compiled a reasonable question & answer list. Here we go:



Can the fish in Ed´s aquarium bark?

No, that was Amber.

I played around with EMF binary serialization, it really is compact & fast. So is this just BinaryResourceFactoryImpl then? Is the binary form platform independent?

Yes, BinaryResourceFactoryImpl. It words for Java on any platform.

Can we change the underlying data base to use something like Objectivity instead of relational DB?

Yes, Simon McDuff (CDO team member) is working on exactly that. Basically we are waiting for some IP clearance stuff to make it (the CDO storage adapter) open source. That's the beauty that the persistence vehicle is complete orthogonal. So you can put any type of backend behind it.

How is CDO doing the object-relational mapping? Is there JPA or JDO underneath or homebrewn?

The backend integration is completely decoupled from the repository framework. The default integration is our proprietary DBStore. Together with Martin Taal from the Teneo project we developed a Teneo/Hibernate integration. I heard that Teneo supports JPA, so yes, a CDO repository can work with JPA. For object-oriented backends you need no mapping at all. See the preceding question about Objectivity. And by implementing a handful of interfaces you can plug in your own backend integration.

So the CDO-Teneo integration is not available yet ''off the shelf''?

It is! We are currently working together with a possible new committer to augment the CDO/Teneo/Hibernate integration team and ensure that this component complies to the same high qualitiy standards as the rest of the CDO framework. Currently the CDO HibernateStore is integral part of the CDO SDK but we are considering to factor it out into separate downloads due to legal issues with the Hibernate dependencies.

Any advice for a mature open source ODB?

Due to lack of own experience, no. But we have https://bugs.eclipse.org/252255 to discuss this topic. Please note that we marked it P5 and HELPWANTED to indicate that we will not be able to address these kinds of integrations ourselves. A perfect opportunity to gain committer privileges !

Can I have multiple communication plugins available, i.e. AMQP?

Eike is working to separate out Net4J to better support other communication mechanisms. It would be nice to closely work together with extenders of these new APIs to ensure that they meet concrete expectations. Apart from this effort it should also be possible to integrate new transport technologies via Net4j. Fo this purpose Net4j has a strong separation of the physical transport layer and the application protocl layer (here: CDO protocol).

Is it possible to tunnel through HTTP, so HTTP on port 80 can go through firewalls for communication?

Yes, Net4j comes with an (experimental) HTTP transport layer implementation that supports asynchronous bidirectional communication through http connections.

Am I correct in understanding that a ViewSet is mainly useful when connecting to multiple different repositories?

Yes, we introduced the explicit notion of a CDOViewSet when we supported external references in the framework, i.e. references from one repository to another repository or completely different resource types. Each EMF RescourceSet always has an associated CDOViewSet (when used with CDO) but in the standard case this ViewSet will contain only a single CDO view or transaction.

Does each change increment the version of an object?

No. The version of an object is incremented at the end of a successful commit operation on a the underlying CDOTransaction or CDOXATransaction. In fact the version is part of the primary key of a CDORevision, so a new version is assigned with each new revision of an object.

When does the view acquire the latest version of an object? The first time you access the object, or every time you access the object?

Basically the first time you access an object. Sometimes earlier (configurable pre-fetching) and sometimes later (after remote invalidation).

What happens in case of a conflict (two transactions changing the same object)?

The most important reaction is that the model repository reliantly rejects the second commit attempt. Depending on the local configuration (session.options.setPassiveUpdateEnabled) you might receive early notification about pending commit failure (conflict state of some objects). All this is about detecting conflicts. Quite new is a pluggable mechanism for custom conflict resolvers. As an example we offer a resolver that reduces the conflict granularity down from object to structural features of an object. See transaction.options.addConflictResolver.

Can I access the same repository through different sessions too?

Yes, you can open arbitrary number of sessions to a single repository, even from a single client. But keep in mind that each session maintains a revision cache and should be considered somewhat expensive. Each session can have arbitrary numbers of views / transactions. The objects (empty data wrappers) provided by these views all share the revision instances of the session cache.

Did I understand Eike correctly that changing an object requires a Transaction, which is the only read-write view?

Yes.

Is Audit a ''mode'' of a repository or a view on the repository?

Both. A CDOAudit is a special CDOView on the client side that enables to look at consistent historical states of the whole object graph. As such it is a client side concept. For this to be possible the repository must be configured to support it. As such it is a mode of the repository. Third, the chosen backend (plus integration) must support this repository configuration. As such it is a capability of the storage implementation.

If I disable the audit mode, then no revision data is stored anymore, right?

Yes, if auditing is disabled in the repository, then no historical revisions are stored. Only current revisions. Please note that each storage implementation can have different capabilities with respect to switching auditing on or off. New: the DBStore can switch it off now!

So when audit is disabled in the server configuration and request an audit object, then what do I get? null or a view on the current revision (the only one available)?

If the repository is not configured to support auditing you will get an exception when you try to open an audit view on the client side. So you’ll never be able to hold references to old revisions.

Can I have custom views on the client editor based on different packages (models) I have in the repo? I assume there is a generic editor to handle all the different models I can have in the repo. I need to have different views on the editor based on different models.

Yes and yes. CDO supports multiple packages and multiple resources both in the client and in the repository. You can mix them as you want to. And the generic CDOEditor supports all of this, too.

Do you have references of production apps based on CDO?

Yes, we have. Although I am often surprised to learn that many companies use CDO for a long time before I even get aware of it through some newsgroup questions. I am planning to open a public poll to gather more feedback, stay tuned. We know of many applications in the modeling industry (tooling) as well as in space and aeronautics, automotive, defense, asset management, and so on. If you know of any applications please tell us about!

Why is the server config file not an EMF model?

The main reson is that formerly we had no other EMF requirement on the server side of CDO. This will change in the near future to better support custom EdataTypes and Eoperations in server-side queries. Together with our new Definition Framework (https://bugs.eclipse.org/246623) this will make a perfect fit to configure a CDO server.

Any parallels/differences to MS Oslo Repository (i.e. in philosophy/objectives)?

Ed Merks talked about Oslo in this blog. The idea of CDO is to support any repository, not just one specific one. I think that can make some aspects of Oslo much slicker.

Does the CDO user interface use standard properties viewer? So the Databinding frameworks can sit on top to create custom UIs and Views?

Yes, CDO is pretty much invisible for the rest of the application. Standards should always be usable.

What is the state of CDO Browser project?

We've recently added Common Navigator and Team Provider support. There is also EFS integration on the way (contribution). It is the main focus of the UI sub component to deliver high-quality and re-usable user interface components that make perfect use of the scalable core components of CDO.

In the demo, when you change something in one client, and it appears on the other client, what's the API like for handling that? Do you have to use listeners? Or does it just look like the model was changed by another thread?

Both, you receive EMF Notifications (depending on the local configuration with or without change deltas) and you also can listen to some special events sent by the server. See the FAQ for details.

Wow! Team Provider, cool! It would be kind of natural to have something like the compare view for conflicts. Can team integration be used to handle conflicts?

Team integration is very new and work in progress. But yes, it is our plan to make all the respective CDO core functionality available through the well-known Team support of the Eclipse DIE, including compare and merge. Consider also that while CVS has file level granularity, CDO can handle two clients updating different properties of an individual object. You can't get more fine grained than this...

I saw that a CDOResource can have a „resource path“. Does that mean the "/folder/company" string is processed and treated as an IPath or something anagolous?

A special obejct hierarchy is defined for that, CDOResourceNode (abstract), CDOResourceFolder and CDOResource. They form kind of a virtual file system for resources within a model repository. They can be navigated and queried just like normal objects (in fact they are EObjects). Each such CDOResourceNode has a unique path, but it is always presented as a String. You can convert it easily to an IPath.

Does CDO provide a Validation mechanism?

At the CDO client side you can apply any validation mechanism that you can get to work with regular EMF models. CDO does not offer own solutions in this area. On the server side you can hook your own vetoable ReadHandlers and WriteHandlers with a particular repository. In the future you will also be able to use EMF based technologies like EMF Query, Validation and OCL on the server side, together with your own validators written in Java.

Are there query facilities for querying the models in the repo?

We have a very flexible query framework that can support any type of query language and deliver query results synchronously as well as asynchronously from the server to the client. You can hook either backend-specific or backend-agnostic language handlers into a repository. We would appreciate the contribution of such query handlers. And we are working on the integration of a common query language (OCL).

Any thoughts on data migration? Data migration and data import from/to XMI?

Import and export to any other persistence style that is supported by EMF is also supported by CDO. We have examples for XML/XMI import and export. Automatic data migration, as needed after model evolution, is currently not supported, although we started discussion on this topic in https://bugs.eclipse.org/256856

How about locking, one client can lock the object so that the other clients not allow to change till it's unlocked? Is there any tree-locking facilities in CDO and/or EMF?

Yes and no. We have explicit locking on object level. You can acquire read and qrite locks one one or several objects at once. The contained sub tree of objects is not included! Locks are automatically released when the view/transaction is closed, optionally at commit time. This locking support is part of the CDO core.

Would it be possible to run the CDO server code within an app server - would that make sense at all?

Yes and yes. Each single component of CDO can run in OSGi, standalone or in any imaginable container. Embedding the repository into an JEE server makes particular sense, when the CDO client is a web application in the same container. Then you can use Net4js JVM connector to bypass socket transport. In the near future we will come up with even more direct connection methods (i.e. without Net4j in between).

Though it's called connected data objects, it there some way of using CDO in a kind-of offline mode?

Currently not. When the connection is terminated or breaks down the CDO session is automatically closed, along with all open views and transactions. But due to the tremendous demnad for and usefulness of an offline mode we have made this feature our current top priority. The problem itself is two-fold. Since demand loading will not work when offline we need to checkout partial copies of the central object graph. The ability to cache revisions in the local file system will also provide for even better scalability because will use this ability to page out dirty parts of local transactions. For the switch back to online mode we need a sync/merge mechanism for objects. This has recently been added to support the pluggable conflict resolvers of transactions.

Speaking of transformation, QVT/ATL over EMF/CDO should be possible, right? Would it perform well?

You should be able to use CDO backed models just like any other "normal" EMF model. CDO is effectively transparent so pretty much every normal EMF thing applies. Regarding performance, there is a lot that you can configure in CDO. See this wiki for details.

Which newsgroups to submit thoughts to?

Use the EMF newsgroup and prefix with [CDO]: See this wiki for details.

We need to save locks when user is offline, is that possible?

Currently, when a user is offline, the session is terminated (offline mode for a session is work in progress). Maintaining locks beyond the end of a session is currently not supported by CDO. Locks are automatically released when the view/transaction is closed, optionally at commit time.

Is there dynamic CDO?

Yes. You can register dynamic EPackages with a CDOSession and commit them to the repository. Note, that you can generally only register top-level packages with a CDO session. Nested packages are registered implicitely if they have a namespace URI.

Do I have to regenerate my models?

Currently yes, or you must use a dynamic form of your model. We are working together with EMF Core on a mechanism to support „legacy models“ (i.e. those that are generated, but not for CDO) in CDO. See https://bugs.eclipse.org/247226 for details. Please note that regeneration does not require the Ecore model to be changed! But the regeneration for CDO removes all member fields from the generated classes (reflective delegation) and your hand-written modifications that use these member fields (they should use their accessors!) would not compile anymore.

What about the new EMF index project and server side queries?

EMF Index will work on the EMF side not directly on the servery/repository side. But we are working closely with them to ensure that CDO can nicely fit into an index provider framework.

Are the CDO webinar and the webinar slides available online?

Yes, Lynn will make both available through Eclipse Live. And I’ll check the slides into the CVS and make them available through the CDO wiki.

Is there kind of transaction Rollback mechanism?

CDOTransaction and CDOXATransaction have rollback() methods.We even have save points which you can roll back to. There's a save point snippet in the webinar slides.

If it was just about storing EMF objects in an RDBMS, Teneo would be sufficient I'd think. So I was wondering what other requirements you could have for the whole "bus" thing?

For instance a distributed shared model or the client side scalability for really huge models. CDO provides a clever memory usage with garbage collector support and stuff like partial object loading, partial collection loading. In this sense CDO is like the virtual memory of EMF (Steve suggested: „Demand Paged Virtual Modelling!“).

Wednesday, January 28, 2009

Hightech Webinar!

Yeah, it's hightech what we're working on. And it's definitely hightech what we're working with for this purpose:

My new hightech landline headset

During the tests for our CDO Webinar on Thursday with Ed and Lynn it turned out that Skype produces awful feedbacks which requires me to use a landline phone with a headset. Darn, none of my phones has got a socket for a headset! But, as you can see, I'm used to solving problems.

A day later, all of a sudden, my keyboard startet talking to me! Just rubbish, like a baby: rdeeeeeeeeIIIIIIII. And didn't listen to my commands anymore. Gosh, darn it! What a luck that I found an old keyboard that I can use for the Webinar (I put the baby not too far, so that we can try a nicer conversation later). I'll better have some backup mouse devices at hand, too...

Now everything should be prepared and I hope to see many of you tomorrow. You can win a copy of the second edition of the EMF book by attending:


Don't forget to register for the Webinar!