-
Notifications
You must be signed in to change notification settings - Fork 1
Use Neo4J backend #19
Comments
The question is also: Do we drop the in-memory representation of the SUT model as soon as we have the DB backend? |
Use an embedded database and the Java API.
Use an embedded database and the Java API.
We use converters and OGM annotations instead of converting SutStates and Actions manually. Open sessions for all state machines and create transactions for the sessions.
It was only necessary for a standalone REST service.
Regarding the node content, BLOBs seem to be an anti-pattern:
This is also what @martin-v suggested, to only reference the state in Neo4j and store the actual data somewhere else, e.g., a key-value store. The question is: How can we deterministically derive a unique ID from the state data that can be used as a reference. This also heavily depends on the upcoming artifact storage. For now, we decided to go with a filtered textual representation of the state in Neo4j. |
Use an embedded database and the Java API.
We use converters and OGM annotations instead of converting SutStates and Actions manually. Open sessions for all state machines and create transactions for the sessions.
It was only necessary for a standalone REST service.
We have to use Scala 2.11.x neo4j/neo4j#8832 For visualization we could use the desktop tool or convert the graph into a .dot file: https://gist.github.com/peterneubauer/2652082 |
Use an embedded database and the Java API.
We use converters and OGM annotations instead of converting SutStates and Actions manually. Open sessions for all state machines and create transactions for the sessions.
We use converters and OGM annotations instead of converting SutStates and Actions manually. Open sessions for all state machines and create transactions for the sessions.
It was only necessary for a standalone REST service.
We do not need converters anymore. Store hash values only.
Sessions are not thread-safe in Neo4J. Therefore, we have to create a new session per transaction. Simplify the transactions and name all the properties.
Otherwise the conversion by OGM throws an exception.
Side note: Neo4j is licensed under GPLv3. So if we use Neo4j, we have to check what surili components need a compatible license. |
From https://neo4j.com/licensing/:
Sounds good, but the questions is also does the CE include everything we need? |
https://neo4j.com/subscriptions/#editions Maybe better abstraction with http://tinkerpop.apache.org/ |
- Store Neo4J databases in a directory. - Remove execution counter to simplify code. - Reuse the sutState and action messages when creating identifiers. - Simplify tests and reuse them for Neo4J.
Neo4JConfig allows different implementations. GuiStateMachineApi must be implemented for embedded databases/Bolt. We cache the session factories which is required for embedded databases.
Documented advantages vs disadvantages. Simple database like PostgreSQL or SQLite would be sufficient. If we really need advanced features from Neo4J, we can still use it in the future. |
See #5 for the investigation of GraphDBs.
Neo4J allows transactions which provide concurrency support.
It can also visualize the state machines/graphs.
Labels group nodes together, so a SutState is not really a label.
An action type can be a label.
Some information about OGM:
We store only the hashes and some additional information of the SutStates and actions in the graphdb.
Otherwise, it would be an antipattern.
Note that we need to use the Bolt protocol to utilize most of the tools for visualization and management.
Embedded databases are useful for storage only.
Open questions:
The text was updated successfully, but these errors were encountered: