Skip to content

nmervaillie/SdnClusterSample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

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

About

A project demonstrating a setup of a Spring Data Neo4j for a Neo4j causal cluster

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published