In-Memory Caching and Syncronization with Database Data in Mayocat

20 views
Skip to first unread message

Amal Saha

unread,
Jun 19, 2015, 10:05:22 AM6/19/15
to mayoca...@googlegroups.com
Hello, 

I see the both DBIABCStore and MemoryABCStore implement the ABCStore interface. For example, TenantStore interface is implemented by MemoryTenantStore.java and DBITenantStore.java classes. The MemoryABCStore.java is documented as in-memory implementation of the interface ABCStore. Here ABC may be Tenant, Product, etc. 

Does that mean that automatically Mayocat has implemented an in-memory caching solution? If yes, is there a way to invalidate or synchronise the cache? Will jDBI runtime automatically take care of synchronisation between "memory store" data (data managed by MemoryABCStore)  and "database store" data (data from database thru JDBIABCStore)? Here ABC may be Tenant, Product, etc.  

Thanks and Regards,
Amal   



Jerome Velociter

unread,
Jun 19, 2015, 10:14:51 AM6/19/15
to Amal Saha, mayoca...@googlegroups.com
Hi Amal,

No, the memory stores aren't initially intended for caching ; but as
(somehow) functional stubs in order to write integration REST tests.
They are not used as of today.

Regarding in-memory caching, so far no work has been done in this area
(except for tenant configurations because constructing their
configuration objects is somewhat expensive as we are merging JSON
objects - see https://github.com/mayocat/mayocat-shop/blob/master/platform/configuration/default/src/main/java/org/mayocat/configuration/internal/DefaultConfigurationService.java
- it uses a Guava cache for now, meaning it's not suited as a
distributed cache). Store caches would be interesting ; for the moment
I'm trying to keep mayocat fast and scalable without them. I would
investigate something like infinispan for implementing them.

Best regards,

Jérôme.
> --
> You received this message because you are subscribed to the Google Groups
> "mayocat-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mayocat-user...@googlegroups.com.
> To post to this group, send email to mayoca...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mayocat-users/8e35d381-f11d-4b6c-b6c4-3c0d959ff9ef%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages