Create new types ?

Is possible create new types using opencmis with the Nuxeo or just putting xsd with extensions and restarting the tomcat server ? Restart the server is a big problem for me.

http://chemistry.apache.org/java/opencmis.html

I also don´t want use the Nuxeo Studio for do that.

0 votes

2 answers

1740 views

ANSWER



I believe document types can now be reliably hot deployed. It should not be too hard to modify nuxeo-chemistry to use the nuxeo-core SchemaManager to dynamically register new types. The challenge is persisting the new dynamically-registered types so that they get re-registered upon restart.

1 votes



@rg1 I just want to confirm some steps:

1 - The Schema used in dynamic types are on database. Do I need to create the table and the columns by my own or there already is something to do that ?

2 - The new dynamically-registered types are on memory on SchamaManager. Do I need to get the payload from WSDL CMIS service and transform it to SchamaManagerType ?

3 - Do I need to re-register all dynamic types on memory again ? If so, Do I need to create some way to save all dynamic types in some place like content store ? So when the Nuxeo restarts it persist this again on SchemaManager on memory.

Thats it ?

Regards,

09/24/2013


Nuxeo can dynamically create new types (because that's actually what's used internally to create the types when Nuxeo starts), but we don't really support that because, as @rg1 said, there's no mechanism to persist them and take them into account at the next server restart. So even if we implement some optional CMIS 1.1 features, this won't be among them.

We don't have this feature because we haven't seen a demand for it. Creating types is usually done by expert people and rarely done in the life of the server. It needs testing and care.

If the need is to be able to add types to a server (basically upgrade the application) without service interruption, then Nuxeo in cluster mode (and restarting one node after the other) is the proper answer.

0 votes



rg1
Florent, one caveat. I suspect forthcoming, off-the-shelf CMIS 1.1 apps may come with installers that want to dynamically register new types. These applications will not want to ship with custom configuration modules unique to each CMIS vendor.

Furthermore, a related Nuxeo Answers Question describes a similar use case with a requirement to dynamically register jobs with the Scheduler Service.

In order to support these types of use cases, has Nuxeo ever considered supporting the dynamic creation of extensions points that could be stored as XML documents within the Nuxeo content repository? During startup post-processing, Nuxeo might read and register these dynamically created extension point documents. If this mechanism were in place, dynamic CMIS 1.1 type creation could be supported by persisting a dynamically-created extension point document in a reserved location in the content store. Thoughts?

09/17/2013

Yes we've considered that, and it's a good way to solve the problem. Maybe not in the content repository but this remains to be determined. There has never been a pressing enough need to implement it though.

Regarding the apps you describe, given that type creation is brand new and optional, I doubt they'll be working with most mainstream repositories (some of which just can't create types dynamically anyway).

09/19/2013

I agree with @rg1, some applications want to work like a HUB of DAMs, the CMIS Protocol make all repositories looks like a Database, so now is very easy to work that way. We dont want create a DAM or ECM, we just want use one and make the users from our application be free to choose the DAM they want. But CMIS 1.1 is kind recent, so @Florent Guillaume is right to.
09/19/2013

@Florent Guillaume, you asked to put this information here, so here is :).

When I use Nuxeo Studio, how Studio persist the new Type ?

Regards,

09/24/2013

Nuxeo Studio is an external configuration tool that generates a full Nuxeo bundle (plugin). This bundle is then downloaded by Nuxeo, and seen on next Nuxeo restart (or hot-reload).
09/25/2013