I would like to know if an application server is needed to give multiple users access to the same Microstream database at the same time ?
Asked
Active
Viewed 182 times
1 Answers
1
You don’t need an application server, but you can use one to realize multiple users access. Microstream itself is designed to provide object graph persistence for a single java process. That process owns the storage and its data exclusively. So you don’t give multiple users direct access to the data. It’s the applications responsibility to realize the multiuser access.

MSHG
- 259
- 1
- 4
-
Is it then enough to work like the BookStore-Demo, with synchronized(this) ? How does it make sure that, if one user enters a new record, the other users are updated ? – Hans Roose Sep 23 '22 at 08:35
-
A simple synchronized should work. An important point is that you must prevent any concurrent modifications of the Object-Graph while Microstream processes it (during the store operations). The bookstore demo itself uses a more advanced synchronization. Regarding the update: Microstream is not really involved here. Everything is done on the Object-Graph in memory. Microstream just allows you to persist that graph and update the persistent state on demand. – MSHG Sep 30 '22 at 10:19