Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nmervaillie/sdnclustersample
A project demonstrating a setup of a Spring Data Neo4j for a Neo4j causal cluster
https://github.com/nmervaillie/sdnclustersample
clustering neo4j spring spring-boot spring-data-neo4j
Last synced: 5 days ago
JSON representation
A project demonstrating a setup of a Spring Data Neo4j for a Neo4j causal cluster
- Host: GitHub
- URL: https://github.com/nmervaillie/sdnclustersample
- Owner: nmervaillie
- Created: 2017-09-29T00:42:36.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-30T16:01:07.000Z (over 7 years ago)
- Last Synced: 2024-11-18T13:57:30.226Z (2 months ago)
- Topics: clustering, neo4j, spring, spring-boot, spring-data-neo4j
- Language: Java
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This project illustrates some setup and practices when using Spring boot and Spring Data Neo4j with a causal cluster.
This includes:
* The use of multiple URIs for initial connection on core members of the cluster
* The read only transactions that allow routing requests to replica servers
* Setup of detection of stale connections through connection testing
* Application level retry mechanisms (see comments in UserService)More detail is available in the [documentation](http://neo4j.com/docs/ogm-manual/current/reference/#reference:ha).
There are REST 2 endpoints:
* `GET /users` : retrieves users using a read only transaction, hitting replica servers if they are available instead of core servers.
* `POST /users` : creates a user. Retry the operation if the cluster in not available. Check the notes in `UserController` for additional info.To run the example :
- start a cluster (see the script `start-neo-cluster.sh` : it starts a cluster with docker)
- run the spring boot application as usual