In actual scenarios, it is necessary to use the multi-user and multi-IP online interface to access, and there will be frequent creation of Bolt connections. Will it affect the performance of the Galaxybase graph database?
>Solution :
- The driver itself supports creating and closing, but it is still necessary to understand the concurrency and usage frequency of the actual scene; it has been verified locally that it can be executed normally when it is repeatedly created 1000 times.
Disadvantage: When the driver creates a connection, it needs to authenticate with the server, so the first connection will be time-consuming. And when driver.close, the client needs to recycle resources, which will be time-consuming.
Suggestion: When the service calls the driver, it can set up a cache layer according to the user id (user id->driver mapping, if there is a cache driver, it will be used directly, and if there is no cache driver, it will be created). - In the subsection
Cypher rest callin theGalaxybase RESTful API documentation, it is described how to call the cypher statement through the rest.
Advantages: No need to create a driver, as long as there is a token, it can be called.
Disadvantages: But because it is a rest interface, the return value is json, and the result needs to be processed again.