cancel
Showing results for 
Search instead for 
Did you mean: 

Document Storage using Mongo DB ?

js2
Product and Topic Expert
Product and Topic Expert
0 Kudos

I've read that Mongo DB is used for the document storage service when running a NWCloud app on your local machine, but what about the real document service on NWCloud - is that also Mongo DB?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Yes, it is MongoDB too. It is operated by the NWCloud crew. So, unlike the local case, you don't need to do anything for setting it up. Everything you should care about is the OpenCMIS API and the quota of your repository.

js2
Product and Topic Expert
Product and Topic Expert
0 Kudos

Thanks Kaloyan.

The OpemCMIS api looks like it works as if it's a filesystem. I'd like to try and use the java driver for mongo db to connect to it directly.

However it looks as though mongo is hidden behing the cmis service:

"

String uniqueName = "com.foo.MyRepository";

      // Use a secret key only known to your application (min. 10 chars)

      String secretKey = "my_super_secret_key_123";

      Session openCmisSession = null;

        InitialContext ctx = new InitialContext();

        String lookupName = "java:comp/env/" + "EcmService";

        EcmService ecmSvc = (EcmService) ctx.lookup(lookupName);

      try {

        // connect to my repository

        openCmisSession = ecmSvc.connect(uniqueName, secretKey);

"

Would be good if we could directly connect with the java driver and essentially insert json into the db as mongo is intended for...

--Jason.

Former Member
0 Kudos

What we officially provide us a product feature is a standard-based API for storing content on the cloud. It is an implementation detail that we have chosen MongoDB as the backend. Providing low level access to the MongoDB backend is quite different from this. It would be additional investment, because we should make sure that aspects like security and efficiency are considered carefully.

It would be helpful if you provide more details why you need to have a direct connection to MongoDB. Is it only for bulk import of content?

js2
Product and Topic Expert
Product and Topic Expert
0 Kudos

Nothing important - nor is there any business requirement. Simply *playing* and learning.

Most mongo db usage that I've seen in other environments is by way of the standard drivers and ORM's which allow some great unstructured content to be used in the db. But as you mention, SAP have decided to only expose the CMIS api here on NWCloud.

If there ever was a use-case for mongo I could use the Connecctivity service to connect to a mongo db provided by MongoHQ (as an example) which offers a REST api. I've done this when playing with Ruby on another PaaS.

Thanks for the responses.

Answers (0)