cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Neo4J with multiple processes for the same Graph

sonsi
Node Link

Hi,

I have two services which each of the has the ability to update the same Graph.

One of them is longer than the other. Sometimes they might try to run together. 

My code for connecting is the same - 

public void Connect()
{
if (!_client.IsConnected)
{
_client.ConnectAsync().Wait();
}
}

Issue is, when the longer service is working, it's connected, and the second one gets stuck on the wait, even when the long one finishes.

I assumed the 'wait' should do the trick. I thought about adding a validation before getting the lock, with some sort of sleep and a recursive call when graph is locked, but found no API for it.

What's the solution in this case? I'd appreciate some guidance. Thanks!

1 REPLY 1

Which C# driver are you using (in which version)?