Re: ClientCache / PDX best practice

2017-03-28 Thread Jacob Barrett
On Tue, Mar 28, 2017 at 11:43 AM John Blum wrote: > that you use, say, the *Composite* Design Pattern > [1] to "compose" a > collection of PdxSerializer implementations that are specific to each type > of POJO. This is even preferable over having

Re: ClientCache / PDX best practice

2017-03-28 Thread Michael Stolz
I think you may be confusing ClientCache with Region. The Region is the abstraction similar to Named Cache in several other projects or Table in a database. -- Mike Stolz Principal Engineer, GemFire Product Manager Mobile: +1-631-835-4771 On Tue, Mar 28, 2017 at 10:47 AM, Olivier NOUGUIER < oliv

Re: ClientCache / PDX best practice

2017-03-28 Thread Olivier NOUGUIER
Thank you all for the answers ! @Udo to give you an idea of what I is about you can take a look at java test [0] or even simpler scala [1]. I've made many test, Composite PDX serializer, Custom and even a magical one generated at compilation time [2] with Shapeless [3] (scala only feature). But

Re: ClientCache / PDX best practice

2017-03-28 Thread John Blum
I should also add that using the *Composite* Design Pattern is preferable over a single, "bloated" PdxSerializer implementation (which I see all too often in user applications) handling multiple domain object types (), particularly when the ReflectionBasedAutoSerializer is not, or cannot be used.

Re: ClientCache / PDX best practice

2017-03-28 Thread John Blum
+1 to what Udo stated; additionally.. It is also advisable, if you required more fine grained control over the serialization of your POJOs (i.e. necessarily more than the ReflectionBasedAutoSerializer

Re: ClientCache / PDX best practice

2017-03-28 Thread Udo Kohlmeyer
Hi there Olivier. It is hard to say what you are trying to do... but to answer your question... The typical approach is to start a clientcache which spans lifetime of the client application. It is not something that I would want to start/stop as the mood strikes. As for generic PdxSerializer

ClientCache / PDX best practice

2017-03-28 Thread Olivier NOUGUIER
Hi, In a reactive extension to connect Apache Geode with akka-stream in alpakka community project [0], I don't know how to use ClientCache in an efficient way. Given: - 2 Pojos: Animal and Person - 2 Regions for each Should I use 2 ClientCaches with 2 custom PDXSerializer or only one Cli