Hi Team,

Is there any *good patterns/suggestions* to implement CRUD operations
with *geode
as front facing* and later to populate updates back to database?

I am looking for entries into geode region with i*ncremental versions +
conflict management if multiple users updating* and *audits* with
*version+revision+operationType *

In past, I had done that using database as front facing using hibernate
envers and JPA and then publishing events to GEODE.

If I go for *GEODE as front facing*, I might think for below wiring
together but but that's just initial mind mappings.

> Async Event Listener to push updates to database and audit regions
> GemfireLockRegistry in spring integration for making sure versions are
incremental only
> Manual version + revision management based on lock on entry using
GemfireLockRegistry

*Example:*

*Regions:*
1. Event (Region<String,PdxInstance>)
*Incoming Data*
{ "eventId" : "e1" , "source" : "S1" , "t1" : 123 , "t2" : "LIVE" ,
"updatedBy" : "user1"}

Region should store it as,
*key*="eventId" -> *value* = { "eventId" : "e1" , "source" : "S1" , "t1" :
123 , "t2" : "LIVE" ,  "updatedBy" : "user1", *"version" : 1, "date" :
"2018-10-10 00:00:00"* }

[Incoming JSON data changes too frequently with respect to schema, so I
chose PdxInstance as value for schema-free json documents]

2. EventAudits (Region<String, PdxInstance>)
*key* = eventId -> *value* = [{ "eventId" : "e1" , "source" : "S1" , "t1" :
123 , "t2" : "LIVE" , "updtedBy" : "user1","operation" : "CREATE",
"version" : 1 , "rev" : 1}]

Thanks & Regards,
- Dharam Thacker

Reply via email to