Learn All about the New Neo4jClient for .NET Developers

[As community content, this post reflects the views and opinions of the particular author and does not necessarily reflect the official stance of Neo4j.]

Today is a great day for .NET developers who use Neo4j: The Neo4jClient is back in action!

The Past


For those in the know – the main .NET client for Neo4j is Neo4jClient. It was developed by Tatham Oddie for the last few years and had reached a nice stable point. But recently, Tatham has had to take a more off-hand role – something called ‘LIFE’ has happened 🙂 – so I, Chris, (Hello!) have taken over the management of the Neo4jClient.

The Now


The last Neo4jClient version prior to my taking over was 1.0.0.665 – which was stable and included a large amount of Cypher functionality, but was crucially missing Transaction support. As luck would have it the Transaction code (written by Arturo Sevilla) was sitting in a pull request.

The first release since the 1.0.x releases was renumbered to 1.1.0.1, inside this – we had a bumper crop of additions.

  • Transaction support
  • Auth support
    • You no longer need to use a custom HttpClientWrapper to do more complex operations; you can now pass in the details in the constructor.
  • CollectAs updates
    • No longer returning Node> but just IEnumerable
The next release, 1.1.0.2 added:

  • Ability to specifiy the Parser Version as free text (rather than just as a version number)
Next up – 1.1.0.3:

  • Put the full Query Text (Debug) into the OperationCompletedEventArgs
Followed closely by 1.1.0.4:

  • OperationCompleted is now raised whenever an operation completes – including when an exception occurs.
aaand – 1.1.0.5:

  • Any custom JsonSerializers are now passed properly in the Transactions

The Future


Pull requests are always checked out, and I’m working my way through them, at the moment there are two outstanding, but as one of those isn’t complete yet, there’s only one, and I’m waiting for feedback on it.

In terms of an official roadmap, my general plan is to keep it in sync with Cypher, and look at how to fit the Bolt (the new Neo4j binary protocol) serializer into it, which I think will be no small task, but I’m certain we can get there. Ideally, I want people to connect as now, and say they want to use Bolt instead of REST and have no code changes with regards to the Cypher parts.

There are other things I’m hoping to bring in too. I’d like to get some good LINQ integration to give a similar footing to other databases (notably SQL Server via Entity Framework). It’d also be great to get more integration (better?!) with PowerShell, to allow the Windows world to interact with Neo4j in the way it’s used to.

Your Feedback


It’s great to get Neo4jClient back on it’s feet and running again, and it’d be even greater to get feedback from you – the users – in terms of the current features, or even better new features. The more feedback, the better – good and bad – it all helps to get the client to be where it needs to be.

If you want to collaborate – just go for it! If you’ve got an idea but you don’t want to work on it unless you’re sure it’ll be considered, or you just want to ask a question – add it as an issue to the GitHub page or feel free to email/tweet me and I’ll help in any way I can.

To that end, I’d also like to have a good look at the whole environment for .NET development against Neo4j:
    • How have you found it on Windows Azure?
    • Does the Neo4jClient help/hinder?
    • Are there things you just wish you could do?
Just let me know and I’m sure we can work it out!

References


    • Source for the project can be found on GitHub
    • Documentation which is being updated to match the current state
    • The client is on Nuget, and you should ideally use the Package Manager to get the client.
    • Stack Overflow is the best place for initial questions, response is usually within 24 hours, you can also use the Issues page on GitHub if you want.
    • Official Neo4j page for .NET Development
    • Example Project
    • I blog about it on my own page
    • You can follow me on Twitter – I try to keep releases on there

–

UPCOMING WEBINAR: Graph Databases for Python Users

Register for this week’s webinar on 24 September 2015 at 9:00 a.m. Pacific (18:00 CEST) to learn how to combine the compact syntax of Python with the flexibility of an open source, schema-less graph database Neo4j to build a data scientist’s optimal open source stack, presented by Data Scientist Nicole White

Save My Seat at the Webinar

 

Keywords:  


About the Author

Chris Skardon, Owner, Tournr

Chris Skardon Image

Chris Skardon is the owner of Tournr and is a .NET developer in charge of maintaining the primary .NET client for Neo4j (a.k.a. the Neo4jClient).


3 Comments

Hi Chris,

This is great news. I’m currently using the .NET client in anger and it provides a much cleaner interface than having to hand-code Cypher queries; so re-starting development and support of this application is excellent news.

My only bug-bear with .NET development against Neo is that it’s difficult to test because all queries end up hitting the real database (even if it is local). Java developers are lucky that they have ‘ImpermanentDataBase’ and so can bring up an in-memory version of Neo – I’d really like to see this in the .NET world!

Damian

Chris says:

Hey Damian,

I agree – an in-memory version would be awesome, the problem with in-memory is getting that to run in a .NET environment, which given things like the JVM is nigh on impossible. Anything we use to attempt to run Neo4j on .NET will be a translation of some variety – which in it’s nature will mean you’re not *actually* testing against a DB, so the tests vs live results might well be different.

Testing against an actual DB instance for integration tests will continue to be a pain I’m afraid – you can test you’re generating the right Cypher though, which for a lot of cases is OK (though I admit no-where near as good as an in-memory version would be).

By all means drop me an email and we can have a chat about it and see if there are things that can be added to make testing better!

Ta!
Chris

S Catmull says:

This is great news. Would love to see that LINQ functionality. We were just having an architecture discussion about the interplay between ODATA, LINQ enabled providers and EntityFramework for our key software product.

Leave a Reply

Your email address will not be published. Required fields are marked *

Subscribe

Upcoming Event

 


Have a Graph Question?

Stack Overflow
Slack
Contact Us

Share your Graph Story?

Email us: content@neo4j.com