cancel
Showing results for 
Search instead for 
Did you mean: 

Extend Node Service

llicon
Champ in-the-making
Champ in-the-making
I have a requirement, that stands that I need to store node information in different MySQL DBs. Lets say I have nodes of type A, B and C. so A nodes have to be stores in A's MySQL, and so on finally other kind of nodes that are not A, B or C have to be stored in default alfresco's MySQL.

I have a couple ideas, and I need to know which is more factible, easy and which makes more sense.

1) Extend node service. the new node service will verify the node type and will have more than one DAO. So it will know where to store the node.

2) Create multiple node services and add them to the service registry (not sure if this is possible). This way I have different node services that I can use from my custom code, but I don't know if I'm going to break alfresco if I have more than one node service.

3) Create a node DAO proxy and set it to node service. This way the node service will not know where the nodes are stored, and the proxy will have the logic to know which DB to use to retrieve the node.

Your feed back will be appreciated!
1 REPLY 1

mrogers
Star Contributor
Star Contributor
I'd strongly advise you to reconsider and explore your requirements more.    Possibly have one normal database and then ETL the subset of the node data?

You are going to have to use distributed transactions for your multiple databases.    It can be done, but its not a casual decision.  

And nodes are not defined in isolation,  they won't move neatly move from one database to another.   There are things like associations which obviously can't link to nodes on different databases.    You will probably need a "placeholder" node in the master database.