cancel
Showing results for 
Search instead for 
Did you mean: 

A hybrid RDMBS/Alfresco model?

eddie
Champ in-the-making
Champ in-the-making
Hi,

For a while now, I have tried to get my head around a possible usage scenario for Alfresco, but not quite been able to articulate what my intentions were. This post inspired me to give it a shot.

I have a RDMBS data model and a corresponding Java domain model mapped together using a Hibernate persistence model. The Hibernate model is 1:1 with the RDBMS model, using repositories to populate the domain model. For simplicity, let’s assume this is an address book type application with persons, organizations and related information (contact details, addresses, etc.).

Now, I would like to add additional capabilities for this data. For instance, I would like to create a taxonomy and apply on my data, have fine-grained access control, and use my data objects in workflows. Enter Alfresco repository services. Here’s the idea: I want to define a custom content model in Alfresco which references my data objects. I would then be able to leverage the Alfresco repository services to add metadata like taxonomies and ACLs.

I need to keep my data in the RDBMS, as the system serves several applications. Therefore, the content model could in essence just contain just an ID for the RDBMS object with associated metadata handled by Alfresco, implemented as aspects. With the given ID stored in Alfresco content model, I would use my existing Hibernate/domain model to create a PersonService that could fetch the RDBMS info and decorate it with Alfresco metadata, including a check to see if the user has permissions to access the RDBMS data via the Alfresco Permission Services.

One of the usage scenarios would be an application with the ability to tie together documents (unstructured information) with RDBMS data, for instance a share site that shows both my address book Persons and a number of forms that these persons have filled out.

My main concern is the complexity associated with this, but also performance. I suppose the latter could be alleviated by not imposing complex relations in my content model, and only model the “entities” (in DDD terms). Ie. my content model would not know about person relations to organizations, this information would be retained in the RDBMS model.

I hope you made it this far, and that my intentions are somewhat clear.

Would anyone have an indication as to whether this “hybrid” approach is viable? I am on the verge of doing a small spike/PoC, but would appreciate your opinions and experience on this.

Best regards,
Søren
1 REPLY 1

eddie
Champ in-the-making
Champ in-the-making
To answer my own question: The proposed hybrid approach was abandoned due to the complexity involved in splitting up data and it's metadata into different locations. Instead, we settled on a looser coupling between structured and unstructured data, ie. saving references to documents in structured data and vice versa for the Alfresco Repo.

This implies that there is a way to reference the structured data, so a generic service layer must be constructed on top of structured  data. An obvious choice would be a RESTful interface in order to integrate it  in the Surf client layer. The content model can be used to impose constraints on references.

So, there will be no using repository services directly on structured data. Too bad, but the advantage is that the dependency between systems is greatly reduced.

best regards, Søren