Am 27.01.15 um 17:09 schrieb Stefan Seifert: > we currently evaluate to integrate a Couchbase NoSQL database [1] into a > sling resource tree. as a starting point i had a deeper look on the MongoDB > resource provider [2], because the concept is quite similar. > > some thoughts on this: > > 1. what is the status of the mongodb provider? is someone using it already in > production? looking at the code it seems to be not threadsafe concerning the > CRUD handling with non-synchronized hash maps.
Afaik, there are people using that code slightly modified (not sure what the changes are) in production. I think the impl is thread safe as a resource provider by itself must not be thread safe. But if it's not, we should fix it. > > > 3. the resource provider mixes up the in-memory CRUD handling with keeping > maps of changed/deleted resources, and the mapping to the NoSQL structure. if > these two aspects would be separated the former could be reused for all NoSQL > databases and the latter is responsible only for the flat list > resource-to-document mapping and will be different for each NoSQL database. > bonus: the thread-safety of the CRUD handling has to be implemented only > once, not once for each resource provider. > additional logic like type mapping values to strings, generic value map > implementations, automatic tree creation etc. could be shared between all > NoSQL providers. > Yes I heard this suggestion from several people already :) So +1 for refactoring. > 4. an open point is whether to support binary data as well, or to leave it > out in the first phase. storing binary data may be problematic for some NoSQL > databases, requiring a separate storage concept for this. the mongodb > resource provider currently does not support binary data. > I guess as a first step, not supporting binaries is fine. In general it would be cool to have some more/better NoSQL support in Sling to attract devs using these storages. Regards Carsten -- Carsten Ziegeler Adobe Research Switzerland [email protected]
