lunedì 16 maggio 2016

BlazingCache 1.8.0 is out


BlazingCache,  is a very "simple" but powerful Distributed Cache, designed with the goal to coordinate many local caches in a cluster of cooperating JVMs.

At Diennea we have lots of JVMs hosting our customers’ tasks, the load of each being assigned only to a little portion of the whole cluster (look at Majordodo for instance). In this case, data locality is fundamental so that it is better to cache such data as nearest as possible to the code processing it.

BlazingCache aims at coordinating many local caches, ensuring that every change to data is propagated to every other node which holds data.

A single BlazingCache coordinator server can handle hundreds of client with a minimal setup

What's new on 1.8 ?


With 1.8.0 release BlazingCache introduces the ability to keep direct references to local Java plain objects.
 
In its initial design, BlazingCache only stored byte[] objects and the Client had always to serialize/deserialize its own model objects.
The original motivation for storing only byte[] is that this way the Client is always forced to clone cached objects, avoiding side effects due to modifications of shared objects.

The key to this new feature are the new putObject/fetchObject methods:


    try (CacheClient client1 = CacheClientBuilder
                .newBuilder()               
                .mode(CacheClientBuilder.Mode.LOCAL)
                .build()) {
            client1.start();
            client1.waitForConnection(10000);

            MyBean myBean = new MyBean();
            client1.putObject("key", myBean, 6000);
           
            MyBean myBean2 = client1.fetchObject("key");
           
            assertSame(myBean,myBean2);
     }


Check out documentation at https://blazingcache.readme.io/


Nessun commento:

Posta un commento