You can download the code for this example here: OnyxDevTools/onyx-database-samples/remote-persistence-manager.
A Remote Persistence Manager Factory is used to connect to a scalable high throughput database. The Remote database is used to store data in a centralized location and provide access to that data among clients.
Much like the embedded database the remote server automatically caches high frequency data in order to provide great performance. Onyx Remote Database Server provides a low latency server that is capable of providing high frequency and fault-tolerant network IO.
Using a proprietary serialization mechanism reduces the network bandwidth and requires less processing which allows Onyx to provide superior throughput.
By declaring your entities in a separate project you only have to maintain one model and you can add the data model as a dependency for both the server and the client
The main method will configure and create a running instance of the database server.
Navigate to the queryRootDirectory directory of the database server project, and run the following command:
Now that you have an instance of the PersistenceManager you can use it to save, update, query and delete com.onyxdevtools.entities.
By default Onyx Database adds a JVM shutdown hook upon the termination of the process. It is always a good idea to manually call close when you are finished with the database connection in order to prevent potential data loss.
Our goal is to bring about change by enabling people to use simple and quality software in order to make sad engineers happy.
Copyright ©2017 Onyx Development Tools, LLC. All rights reserved.