Our story has two protagonists: MongoDB and EMF. The first one is defined as a cross-platform document-oriented database program, which supports JSON-like documents. The other stands for Eclipse Modeling Framework, and, as the name suggests, is a framework for creating models, generating code out of them, and much more.
What do these two have in common? Well, most of the times, when you create your model instances you also would like to store them somewhere, right?
In this talk I will present an open-source project, developed at Data In Motion Consulting GmbH, which allows these two worlds to be combined, in order to store and retrieve EMF object into and from a MongoDB.
After describing how to configure a MongoDB client and a Mongo database in OSGi, which is used under the hood, we will discuss how to store EMF objects into a MongoDB and, then, how to retrieve them back, by means of queries and projections.
This talk is addressed to whoever is curious and wants to see an example of both an Eclipse framework and OSGi in practice, or is used to work with either MongoDB or EMF, and could benefit from a ready-to-use way to combine them!