bryanhunt / mongo-emf Goto Github PK
View Code? Open in Web Editor NEWMongoDB - EMF Binding
Home Page: https://github.com/BryanHunt/mongo-emf/wiki
MongoDB - EMF Binding
Home Page: https://github.com/BryanHunt/mongo-emf/wiki
The MongoInputStream#read() returns '0' which causes an infiity loop when EMF Edit Framework makes a HEAD request.
returning -1 solves the problem
MongoDatabase should have the following helper functions for creating URIs:
URI createCollectionURI(String collection)
URI createObjectURI(String collection, String id)
I want the new query work to go into org.eclipselabs.mongo.emf.query, so I'm going to rename that bundle. Same goes for org.eclipselabs.emf.query.
MongoDatabase should have a default constructor that defaults the database name to "junit"
In case you have an URI with a fragment, the fragment needs to be trimmed too in MongoUriHandlerImpl#getCollection (line 136) to find the database provider in the mongoDatabaseProvider map.
The bundle name for org.eclipselabs.mongo.junit should include emf as a qualifier, so I think it should be renamed to org.eclipselabs.mongo.emf.developer.junit
Tagged reading support was added to the MongoDB driver before it was intended to be released and does not work properly. The MongoDB folks are going to remove support from the next minor version of the driver and eventually add it back in when MongoDB supports tagged reads with sharding. The code is still there, just commented out.
Hello,
I've moved Workspace Mechanic to git, and so, the update site location had to change as a side-effect. GIve http://workspacemechanic.eclipselabs.org.codespot.com/git.update/mechanic a try, as listed on your main page.
It would be handy to have an option to cascade delete cross-document containment references. In a client / server environment, the server can do the deletes much faster than the client. The client would then do a cascade unload to clear out it's local cache.
Plugin org.eclipselabs.mongo requires version 2.6.3 of com.mongodb:
Require-Bundle: com.mongodb;bundle-version="2.6.3"
But the version of com.mongodb from the workspace is 2.5.2:
Bundle-SymbolicName: com.mongodb
Bundle-Version: 2.5.2
Which should it be? And shouldn't you use Import-Package anyway instead of Require-Bundle?
EObjects saved with mongo-emf are persisted in a single mongoDB collection. If the EObject is a parent container of sub objects and this EObject is saved with mongo-emf the child EObjects are stored as subdocuments to the parent within a single document contained in a single mongoDB collection.
Depending on application performance requirements, ECore models may need to be saved to different resource collections on a Mongo DB. Currently, client code is required to manage this normalization of data, by saving and reading the subobjects to and from different collections. This is done using different resource uris for each of the child EObject targeted for a different collection.
Can this deployment wiring be automated? Can a generalized solution be offered for configuring MongoDBURIHandlerImpl so that saving of parent EObjects graphs will result in the saving of some or all of the EObject child objects to one or more different collections?
When a InputStream is created (in MongoInputStream) with a query on the URI, all the collection is loaded at ressource creation time (line 93-94), which can be long in case of a query returning huge amount of elements.
With huge (several milions of elements), the EList performances are very poor (and not linear).
It would be nice to delegate this to the QueryEngine in order to permit a on demand load of the collection with eventual caching.
Thanks in advance for your comments and eventually proposals
Configuration of the Mongo instances should be possible through ConfigAdmin. I propose restructuring the code to take better advantage of declarative services and service configuration. IMongoDB will be refactored into IMongoFactory and the service will become a factory for instances of Mongo.
The changes should be structured such that users will still be able to use the code outside of an OSGi container.
Hi
It would be great if there was maven dependencies of mongo-emf.
Thanks and regards
If you create a query and happen to forget to put the value in ' ' (singleAttribute==4d), you will get back all entries in the collection.
It would be nice if all of the OSGi services used DS. Using DS can create some challenges with JUnit testing, so we will need to provide a nice way to make sure all services have been created prior to running any unit tests.
There two require bundle directives:
org.eclipse.xtext.xbase.lib;visibility:=reexport,
org.eclipse.emf.ecore.xcore.lib;visibility:=reexport
They doesnt seem to have any use in the API.
It would be nice to support the EMF ID attribute. If the ID flag is set on an attribute, then map the value of that attribute to the MongoDB _id key. Consideration needs to be given to the query engine since it would have to map the ID atribute name to _id.
The plugin already handles all the native mongo database data types, however, it is sometimes required to have customer converters to convert types or objects to/from mongo storage. For example the java.util.Calendar class (and therefore java.util.GregorianCalendar) is not handled by mongo natively, but it still needs to be stored. Some my want to store it as a long value, others as an ISO8601 string. Providing a custom data type conversion mechanism will enable the user of the plugin to decide how data is stored in mongo.
Extract the core features of the plugin to an API that can be used generically to convert EObjects to DBObjects and vice versa.
By doing this it will enable users of the conversion library to use the code in their own persistence frameworks, and allow converted objects to be customized individually before persistence. This would also have the side effect of removing the dependency on the IMongoDB object for those using the code outside of OSGi, and let users handle persistence in their own way.
he model for the unit tests started out ok, but now, it's confusing as to what is containment vs non-containment vs cross-document containment, etc. The model needs to be refactored so that the reference names reflect what is really happening. The refactoring should include the use of the MongoUtil functions.
Since we are working on a new query engine, the existing query unit tests need to be moved to their own bundle. The old query engine will be deprecated and eventually removed for 1.0.
The eClassCache passed to the builder is never used by the builder.
More advanced query languages provide the ability to select which fields in a document are returned from a MongoDB query.
Currently the IQueryEngine provides a return type of DBObject. This is sufficient to find documents in a collection, with DBCollection.find(DBObject ref) but in order to select which fields of the documents are returned a second DBObject must be returned - DBCollection.find(DBObject ref, DBObject fields).
Change IQueryEngine to support returning a second DBObject.
This will affect the client usage of IQueryEngine in the MongoInputStream class.
The current code
if (!reference.isTransient() && eObject.eIsSet(reference))
buildReference(eObject, dbObject, reference);
doesnt take care about bi-directional references. This causes errors when you use EOpposites.
This code fixes the problem
if (!reference.isTransient() && eObject.eIsSet(reference)
&& !(reference.getEOpposite() != null && reference.isContainer()))
buildReference(eObject, dbObject, reference);
If you change the JUnit bundles require bundle on org.hamcrest.core to import package, you have to add org.hamcrest.core to PDE's Automated Management of Dependencies list to get the code to compile, and even then, the unit tests will not run because the import org.hamcrest cannot be found. I've opened a bugzilla against PDE to track the problem.
Authentication is rather broken. While investicating the problem, I found that the design does not support per database authentication, only per server authentication. I will refactor IMongoProvider and IMongoLocator into IDatabaseProvider and IDatabaseLocator to properly support per database authentication.
The bundle query.mongodb does not exist in the repository http://bryanhunt.github.com/mongo-emf/releases/0.8.0/index.xml.gz
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.