ObjectDB ObjectDB

Embedded mode usage question

#1

Hi there !

We're currently considering to try object db as a an embedable database for one of our microservices. The microservoice itself must be completely self-contained and must not depend on external software such as RDMS, requiring additional installation and support. However, this microservice will be a multi-threaded, multi-user web service and we did not get a complete understanding from your site/docs whether the object db embedded mode is intended for single-user / single thread access only or not. Is it ok to use object db in an embedded (non server) mode for a web app or web service, accessed by a number of end-users (consumers).

 

Thanks,

Dmitri

 

edit
delete
#2

You can use ObjectDB in embedded mode to serve a multi threaded web application.

This is demonstrated for example on this tutorial.

For real concurrent multi threading you just have to use a separate EntityManager for every thread (e.g. EntityManager per request in a web application, as demonstrated in that tutorial), and actually there is no difference between client-server mode and embedded mode in your code. Both modes support multi threading.

ObjectDB Support
edit
delete
#3

That's the great news, thanks for a quick reply !

Will definitely give it a try then in our service POC.

 

Thanks and have a nice day,

Dmitri

 

edit
delete

Reply

To post on this website please sign in.