This is the manual for older MicroStream versions (Version < 5.0).
The new documentation (Version >= 5.0) is located at:
The MicroStream Storage isn't a typical database server with administrative tooling and stuff like that. It is just a Java library which runs embedded in your application. The storage data layer, per default the file system, contains the serialized and persisted data. But it is not really accessible, or more precise, human-readable. Nor do we provide a query language to access the storage data.
The Java objects, which reside in memory, are easy to inspect and traverse, e.g. with a debugger.
But for various purposes, like monitoring, the requirement to read the actual stored data has come up.
Since version 3.0 a REST interface for the storage data is included. It enables you to access the data via REST calls or a convenient user interface.
It is made up of the following modules:
This is the manual for older MicroStream versions (Version < 5.0).
The new documentation (Version >= 5.0) is located at:
GET
[instance-name]/root
Returns the name and object id of the current storage root element.
GET
[instance-name]/object/:objectid
Returns description and values of a distinct object.
Name | Type | Description |
---|
GET
[instance-name]/dictionary
The type dictionary as plain text.
GET
[instance-name]/maintenance/filesStatistics
Statistics of the used storage files and channels.
This is the manual for older MicroStream versions (Version < 5.0).
The new documentation (Version >= 5.0) is located at:
Based on the REST API we provide a client, which serves a convenient web user interface to browse through the storage data.
It is a runnable jar which starts a simple web server which then can be accessed by a browser of your choice.
To download it use maven
or this direct link:
Start the client. The port parameter is optional, default port is 8080.
Now you can browse through the data of the storage:
Or view the statistics:
Name | Type | Description |
---|
Then just open in your browser, select the base URL of the REST service and click connect.
ArtifactId
Description
storage.restadapter
Adapter for low-level storage data externalization. Used by the REST service to adapt to a MicroStream Storage.
storage.restservice
Abstract REST service interface, which uses the REST adapter to access low level storage data.
storage.restservice.sparkjava
REST service implementation which utilizes SparkJava and provides REST endpoints.
storage.restclient
Abstract REST client interface, which serves as a Java wrapper for the REST API.
storage.restclient.jersey
REST client implementation which utilizes Jersey as a webservice framework.
storage.restclient.app
Executable client app with web user interface, which connects to a REST service.
valueLength | integer | Limit size of returned value elements, e.g. String values. Default is unlimited. |
fixedOffset | integer | Fixed size members start offset, default is 0. |
fixedLength | integer | Amount of returned fixed size members, default is unlimited. |
variableOffset | integer | Variable size members start offset, default is 0. |
variableLength | integer | Amount of returned variable size members, default is unlimited. |
references | boolean | Determines if top-level references of the object should be returned as well. |
objectid | integer | The requested object's id |
This is the manual for older MicroStream versions (Version < 5.0).
The new documentation (Version >= 5.0) is located at:
First of all we have to connect a storage to a REST service.
Just add the REST service implementation to your dependencies, the logger is optional.
Now use the resolver to connect the service to a storage, start it, and you're good to go.
1) An example storage manager 12) Create the REST service, 13) and start it.
That's all you have to do to open the REST endpoints to access the storage data.
The base URL of the opened endpoints is per default: http://localhost:4567/microstream/
Internally, there is a REST adapter which opens access to the low-level storage data. This is used by the REST service layer, which is an abstract service interface. The default implementation of it, which uses Sparkjava, is used to open the REST endpoints. We just have to use this one to get started.
If you want to change the default port (4567) or instance name (microstream) it can be done by using the rest service implementation directly. The spark service can then be customized by your liking.
This will change the base URL to http://localhost/my-name/