Home » Java » Enterprise Java » Undo feature with Neo4J & Enterprise Java

About Sebastian Daschner

Sebastian Daschner
Sebastian Daschner is a self-employed Java consultant and trainer. He is the author of the book 'Architecting Modern Java EE Applications'. Sebastian is a Java Champion, Oracle Developer Champion and JavaOne Rockstar.

Undo feature with Neo4J & Enterprise Java

I’ve created an example how to implement an undo feature in a Quarkus application that uses a Neo4J database. From a user perspective, an undo action might look little spectacular, but once you know what needs to be taken into account on a database side, it’s everything but trivial. Especially in graph databases, we need to take the relationships into account.

In a previous video, I showed to how integrate Neo4J in a Quarkus application. This example is based on that coffee shop application.

This example is a proof of concept, a starting point on how such a feature can be implemented. The code is based on the Neo4j Streaming Data Integrations plugin, which runs in our Neo4J instance and emits Change Data Capture (CDC) data representations. In our example, we don’t stream CDC events, but rather persist the transaction data in separate :Action nodes directly in the graph, which can be used for the future undo action.

You find the source code to all examples below.

Resources

You can try out the example yourself. The following repositories contain the updated Quarkus application and the Neo4J plugin that runs in your database instance:

Happy undoing!

All opinions are my own and do not reflect those of my employer or colleagues.

Published on Java Code Geeks with permission by Sebastian Daschner, partner at our JCG program. See the original article here: Undo feature with Neo4J & Enterprise Java

Opinions expressed by Java Code Geeks contributors are their own.

(0 rating, 0 votes)
You need to be a registered member to rate this.
Start the discussion Views Tweet it!
Do you want to know how to develop your skillset to become a Java Rockstar?
Subscribe to our newsletter to start Rocking right now!
To get you started we give you our best selling eBooks for FREE!
1. JPA Mini Book
2. JVM Troubleshooting Guide
3. JUnit Tutorial for Unit Testing
4. Java Annotations Tutorial
5. Java Interview Questions
6. Spring Interview Questions
7. Android UI Design
and many more ....
I agree to the Terms and Privacy Policy
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments