Trying CQRS / ES with Java

462 views
Skip to first unread message

Rodolfo de Paula

unread,
Mar 14, 2014, 9:37:13 PM3/14/14
to ddd...@googlegroups.com
Hello 

I have been developing https://github.com/rodolfodpk/myeslib just for learning and having fun and now I would be glad to have any feedback about it: terminology, concepts, design, code, bugs, etc.

Thanks,
Rodolfo

@yreynhout

unread,
Mar 15, 2014, 3:42:41 PM3/15/14
to ddd...@googlegroups.com
Sorry, I don't do java, unless it's in a cup with water.

Rodolfo de Paula

unread,
Mar 15, 2014, 5:33:57 PM3/15/14
to ddd...@googlegroups.com
Hello Yves

Yes, It is very dificult to get feedback since probably 90% of DDD CQRS ES guys are from C# world and the remaining are exploring it in Scala, Clojure, Haskell..

I could write it in Scala and probably will but at first I wanted to have something in plain Java in order to present to my pairs at work.

Altair

unread,
Mar 16, 2014, 5:23:16 AM3/16/14
to ddd...@googlegroups.com
Ho Rodolfo.

We are using Axon Framework for 1 year in one Bounded Context.

Really good.

--
You received this message because you are subscribed to the Google Groups "DDD/CQRS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dddcqrs+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Greg Young

unread,
Mar 16, 2014, 7:15:26 AM3/16/14
to ddd...@googlegroups.com
Have you looked at axon?

Sent from my iPhone

dm3

unread,
Mar 16, 2014, 10:39:07 AM3/16/14
to ddd...@googlegroups.com
Your code seems fine. I'm not sure what kind of comments you are looking for. You can glance the common patterns for CQRS/ES in the Axon framework sources https://github.com/AxonFramework/AxonFramework.

Not quite sure why you decided on using Camel, but doesn't really matter.

Rodolfo de Paula

unread,
Mar 16, 2014, 11:16:18 AM3/16/14
to ddd...@googlegroups.com
Yes, a couple of years ago I took a look at Axon but never really tried it. I will give a try.

Rodolfo de Paula

unread,
Mar 16, 2014, 11:26:19 AM3/16/14
to ddd...@googlegroups.com
I do expect any feedback and "Your code seems fine"  is already very motivating ;) 

I plan to improve the documentation and then better explain what is the role of Camel and others things I'm using.

Regarding Axon, it has improved a lot since I saw it, so I will certainly try it.

Duncan DeVore

unread,
Mar 16, 2014, 12:05:02 PM3/16/14
to ddd...@googlegroups.com
Hi Rodolfo,

If your interested in doing CQRS / ES on the JVM, I highly recommend you look into Akka-Persistence. I've worked with the framework from it's beginnings when it was known as Eventsourced. It will handle your ES concerns quite gracefully. As for CQRS, we implemented that through design. We have separate read and write concerns running on their own JVM's that are eventually consistent via Akka Remote messaging. This configuration has been in production for a large scale distributed cloud app for about 9 months now, and has exceeded our expectations in performance and stability. It's all based on Akka, Eventsourced / Akka-Persistence, Scala, Mongo and Spray.io. 

Here' is a link to a small example that you may find useful. This example uses Command Sourcing rather than Event Sourcing, and for brevity sake run's on a single JVM. We intend to release an Event Sourcing example shortly. The Employee.scala source represents the write-side while the Benefits.scala represent the read side. In the real world your read and write concerns would run on separate JVM's and be eventually consistent via Akka remote messaging.

Cheers,

The preceding email message may contain confidential information of Viridity Energy, Inc. It is not intended for transmission to, or receipt by, any unauthorized persons. If you have received this message in error, please (i) do not read it, (ii) reply to the sender that you received the message in error, and (iii) erase or destroy the message.

Greg Young

unread,
Mar 17, 2014, 8:06:01 AM3/17/14
to ddd...@googlegroups.com
offlist:

There is a full akka client for EventStore that will be plugged into akka.persistence soon to allow for a HA solution for it. You can checkout the akka code if you want here (the adapter should be pretty easy to write even if we have not gotten to it yet). https://github.com/EventStore/eventstorejvmclient

Greg


--
You received this message because you are subscribed to the Google Groups "DDD/CQRS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dddcqrs+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Le doute n'est pas une condition agréable, mais la certitude est absurde.

Rodolfo de Paula

unread,
Mar 17, 2014, 6:46:38 PM3/17/14
to ddd...@googlegroups.com
Thanks, Dunkan

I think my main motivation was to use Oracle as an Event Store. I mean, I really want to develop a solution at work with CQRS / ES (there are so many opportunities that fit...)  but I'm afraid I could not use Mongo for our write concerns. My product owner will only feel secure if our events are stored within Oracle. We can use Mongo but mostly for non critical use cases. So that's why I thought I could achieve something viable faster than trying to hack a Oracle journal plugin for Akka Persistence. And since I had to be "conservative" by keeping with our legacy database, I also decided to keep with Java and other things my team is used to. Anyway, at least I have been learning a lot in the development process. Certainly there are much more to learn with Akka Persistence, I will look forward.

Cheers

Duncan DeVore

unread,
Mar 18, 2014, 2:54:57 PM3/18/14
to ddd...@googlegroups.com
Hi Rodolfo,

Completely understand. I hope to eventually release a JDBC based journal but that won't be for a while. As a side note Akka-Persistence does have a Java API.

Cheers,

kukgini

unread,
Apr 6, 2014, 1:37:36 AM4/6/14
to ddd...@googlegroups.com
It's build on JDK 1.7. 
it would be helpful downgrading to 1.6 because of my MacOS X still remains in 1.6.

sorry about poor english. i am using ESL (English as Second Language)

2014년 3월 17일 월요일 오전 12시 26분 19초 UTC+9, Rodolfo de Paula 님의 말:

Rodolfo de Paula

unread,
Apr 7, 2014, 2:53:24 PM4/7/14
to ddd...@googlegroups.com

I plan to eventually move forward to 1.8, but not to downgrade to 1.6, sorry.

Anyway, you can install 1.7 on your mac without removing 1.6 , keeping multiple versions     

I have both 1.7 and 1.8 on my Mac.  Just in case, may be this can help you. 

Ramon Buckland

unread,
Apr 7, 2014, 3:47:00 PM4/7/14
to ddd...@googlegroups.com
And of course - another to add to the pile 

This is an akka-persistence implementation. io-straigt-fw.. it includes a bunch of helper classes and utility stuff - with some sample code for a working application.


I am currently working on some more samples - one for Play and another for Spray. 
This was my core code split out from an original version using eventsourced , as Duncan describes below - eventsourced is now ported over to be akka-persistence.

enjoy your researching! 


--
Ramon Buckland
“You are never too old to set another goal or to dream a new dream” - C.S. Lewis




Rodolfo de Paula

unread,
Feb 11, 2015, 12:11:32 PM2/11/15
to ddd...@googlegroups.com
Hello guys

Just in case, here is the new version:


It evolved from myeslib, but it's smaller and more focused.
Reply all
Reply to author
Forward
0 new messages