Announcement Announcement Module
Collapse
No announcement yet.
Spring + XML Database Connector Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring + XML Database Connector

    Hi,

    I've written a couple of XQJ (XQuery API for Java) implementations.

    For those that are unaware, XQJ is to XQuery and XML Databases/Datastores as JDBC is to SQL and Relational Databases.

    I spoke at XML Prague in February about enabling XML Databases to act as POJO stores [1] where an XML Database deals solely with XML Documents and Java deals solely with POJOs, but talk together pretty seamlessly.

    I see there is a MongoDB Connector for Spring which looks cool. I would like to do something very similar for XML Databases, e.g. MarkLogic Server.

    Could anyone give me guidance on where to start on such a project?
    What should I take into consideration?
    Would anyone like to help on such a project?

    I saw the Spring Data Document API appears very much geared up for MongoDB. I could create a similar set of interfaces if needs be. I am completely open to any suggestions, ideas and help.

    Kind Regards,

    Charles
    http://www.xqj.net/

    [1] http://www.cfoster.net/news/xml-prague-2012.xml

  • #2
    That's quite a cool idea and we're open to every kind of community contribution. We actually got rid of the Spring Data *Document* thing for now as we don't really have support for anything other than MongoDB currently. So you actually find all of the code and documentation under spring-data-mongodb.

    Having that said Spring Data Commons is probably the API you should have a look at as it serves as the foundation of the JPA, MongoDB and Neo4j modules and thus stores of a variety of kinds already. Here are the part's that I think might make sense to look at:

    1. The MappingContext - pretty much allows to gather metadata about the domain classes. Have a look at the MongoDB based implementation for inspiration. Feel free to come up with annotations similar to the ones in MongoDB. If there's overlap or similarities we can discuss refactoring some of them out into a new spring-data-document submodule but I think this is something to be considered a second step. First, make it work for you

    2. CRUD repositories - have a look at the repositories abstraction and how one can use the namespace to simply create interfaces for the repositories and let Spring Data provide the implementation proxy.

    3. Query derivation - pretty much based on top of 2. but usually requires extra effort to implement the query derivation mechanism (although most of it is in Spring Data Commons).

    As I said in general, Spring Data Commons is your foundation, Spring Data MongoDB should be the inspiration of how you can implement a document store integration on top of SD Commons. Feel free to simply implement your store integration right next to the MongoDB module (copy code if needed) and we might extract commons stuff later on. Premature abstraction is the root of all evil

    Comment

    Working...
    X