6 Replies Latest reply: Jan 17, 2013 7:05 PM by Randall Hauch RSS

Custom connectors with ModeShape 3

Ivan Vasyliev Newbie

Hello,

 

I would like to use ModeShape 3 to access custom content managment system (built in .net), with ModeShape 2 I see that there is connector framework for such things.

Could someone point me to the right direction for ModeShape 3?

 

Thank you in advance.

 

Regards,

Ivan

  • 1. Re: Custom connectors with ModeShape 3
    Ivan Vasyliev Newbie

    Ok, after reading posts on this forum it looks like CacheLoader is the way for ModeShape 3.

  • 2. Re: Custom connectors with ModeShape 3
    Randall Hauch Master

    ModeShape 3 distinguishes between storing content owned by ModeShape vs. accessing content from an external system. Using CacheLoader is the correct way for extending the kind of storage used by ModeShape to store owned content, but it's probably practical to implement new CacheLoaders to talk with only generic value stores that can store our internal representation (in BSON format) of the values. Any CacheLoader impl that converses with an external system that uses any other data form will need to translate the internal representation to something the external system (e.g., your content management system) will understand, and the reverse translation when CacheLoader is to read the data.

     

    So implementing a CacheLoader may work, but we think we can make it easier to access content from an external system with a new connector framework at a higher level in the ModeShape architecture (see MODE-1513 and Next generation federation requirements). Unfortunately, this has slipped out of 3.0 and has become the primary feature for 3.1. (We could keep it in 3.0, but then we'd just be slipping the 3.0.0.Final release and delaying its use for people that don't need federation.)

  • 3. Re: Custom connectors with ModeShape 3
    Ivan Vasyliev Newbie

    Thanks, this meets my observations - I was exploring CacheLoader sources in Infinispan and it looks more like some API for internal storage with forced by framework internal data structures (just like you described). How to map security stuff, for example, looks like out of scope of Cache Loader API

     

    So, I assume the better way for my case can be - wrapping my fancy .net based cms with CMIS api, and then plug it into ModeShape 3.1 for federation.

     

    BTW, what is the timeline for 3.1?)

     

    Regards,

    Ivan

  • 4. Re: Custom connectors with ModeShape 3
    Randall Hauch Master

    So, I assume the better way for my case can be - wrapping my fancy .net based cms with CMIS api, and then plug it into ModeShape 3.1 for federation.

    We already have a feature request for a CMIS connector (MODE-650). Assuming that a general-purpose CMIS connector would be helpful (if not as-is then as a starting point for a customized connector), I've retargeted it from 'Future' to 3.1. Perhaps when the time comes, you might consider helping out. (If so, watch that issue and add a comment offering help; we'll get back to you when we're working on the SPI.)

     

     

    BTW, what is the timeline for 3.1?

     

    A rough (but conservative) guess for 3.1 is roughly 8-12 weeks after 3.0.0.Final, so roughly mid-fall. I'd prefer it to be 6 weeks, but I'd rather estimate it take longer.

  • 5. Re: Custom connectors with ModeShape 3
    Ivan Vasyliev Newbie

    Well, in my "wrap with CMIS API" excersise I went route using modeshape 2.x and webdav connector.

     

    I have few sources which I would like to share (this is temp location) https://www.yousendit.com/download/QlVoanZxeFg1bmgzZU1UQw

    • webdav connector - I took filesystem connector and reworked it operate over webdav. Features/issues observed:
      • webdav-servlet does not correctly handle "copy" request with ' ' in path
      • webdav client I used(sardine) is slow on write (root cause somewhere in apache http client, screenshot near pom.xml in module)
      • resource name filtering commented out
      • store properties using webdav "patch" is not implemented
      • security propagation is not being worked out
      • features to add:
        • RFC 3253 (DeltaV - Versioning Extensions to WebDAV)
        • RFC 5323 (WebDAV SEARCH; previously DASL - DAV Searching and Locating)
    • POC with apache chemistry(MODE-295?). Issues observed:
      • met issues with chemistry-jcr integration: CMIS-523, CMIS-557
      • met issues with search by ID in filesystem/webdav source: MODE-1232 - The connector still does not handle finding nodes by identifier
        • workaround added, see : JcrRepositoryDecorator.java, JcrServiceFactoryDecorator.java   

     

    And the questions I have, before I'll move forward:

    • Is webdav connector valuable? What it will take to make it available in the list of base modeshape connectors?
    • Are there any plans for MODE-295? My fixes to chemistry-jcr integration are a bit hacky, because of my expertise with jcr in general.
  • 6. Re: Custom connectors with ModeShape 3
    Randall Hauch Master

    ModeShape 3.1.0.Final (re)introduced federation and connectors. The Connector SPI is quite different, and we'll work on describing the whole system in our documentation over the next few days. But in the meantime, have a look at:

    • the file system connector - This is a fairly trivial implementation. It has very similar features compared to the 2.x connector, but is implemented in a completely different (but we think simpler) way.
    • the Git connector - This is actually a really interesting connector, because it maps maps functionality -- like getting the history for a commit -- to a node structure that JCR clients simply navigate. It is read-only, however, so all it does is browse the branches, tags, commits, and the files/folders in each.

     

    See also our blog post on the subject.

     

    We're going to start work on a CMIS (Apache Chemistry) connector (MODE-650), and we have created issues for the JDBC metadata connector (MODE-1707), a connector to a remote ModeShape repository (MODE-1718), and even a JDBC data connector (MODE-202). We're not sure about converting or rewriting the SVN connector. Anyone interested in working on any of these?

     

    I could also see a WebDAV connector that would be very similar to the file system connector.

     

    BTW, ModeShape 3.1.0.Final also has CMIS API support (MODE-295). Give it a whirl; it's still tech preview, but we want people to use it.