Thursday, 23 February 2017

Node.js client 0.4.0 released with encryption and cross-site failover

We've just released Infinispan Node.js Client version 0.4.0 which comes with encrypted client connectivity via SSL/TLS (with optional TLS/SNI support), as well as cross-site client failover.

Thanks to the encryption integration, Node.js Hot Rod clients can talk to Hot Rod servers via an encrypted channel, allowing trusted client and/or authenticated clients to connect. Check the documentation for information on how to enable encryption in Node.js Hot Rod client.

Also, we've added the possibility for the client to connect to multiple clusters. Normally, the client is connected to a single cluster, but if all nodes fail to respond, the client can failover to a different cluster, as long as one or more initial addresses have been provided. On top of that, clients can manually switch clusters using switchToCluster and switchToDefaultCluster APIs. Check documentation for more info.

On top of that, we've applied several bug fixes that further tighten the inner workings of the Node.js client.

If you're a Node.js user and want to store data remotely in Infinispan Server instances, please give the client a go and tell us what you think of it via our forum, via our issue tracker or via IRC on the #infinispan channel on Freenode.

Infinispan 9.0 CR2 is out!

Dear community.

We are one step closer to the final release of Infinispan 9: we gladly announce the release of Infinispan 9.0.0.CR2.

The highlights of this release are:

  • Many dependencies have been upgraded to the latest and greatest:
    • JGroups 4.0.0.Final
    • Apache Lucene 5.5.4
    • Hibernate Search 5.7.0.Final
    • Protostream 4.0.0.Alpha7 
  • Transactional caches changes:
    • Removed asynchronous configuration since it won't be supported anymore.
    • Introduced EmbeddedTransactionManager: a basic transaction manager implementation.
  • Query now supports java.time.Instant natively
  • Changes in the configuration;
  • Significant performance improvements for embedded and client/server mode;
  • And finally, quite a few bug fixes preparing us for the final release !

You can read all about these in the release notes.
Keep an eye on the upgrade guide and start prepare your project for the final Infinispan 9 release.

So, please head over to the download page and try it out. If you have an issue, please report it in our bug tracker, ask us on the forum, or join us for a friendly chat on the #infinispan IRC channel on Freenode.

Regards,
Infinispan Team.

Wednesday, 15 February 2017

Spring Boot Starters 1.0.0.Beta1

I'm happy to announce Spring Boot Starters 1.0.0.Beta1.

The changelog includes:

  • Fixed hotrod-client.properties path (now it uses classpath:hotrod-client.properties) 
  • ISPN-7468 Added Spring Cache automatic discovery and creation 
  • Fixed typo in artifact name 
  • Upgraded to the latest artifact versions 
  • Removed deprecated classes from tests
Grab them while they are hot!

Friday, 10 February 2017

Infinispan 9.0.0.CR1

Those busy hackers over in the Infinispan dungeon have brewed up a new release, and it is the first candidate on the road to the final 9.
Infinispan 9.0.0.CR1 (codenamed "Ruppaner") includes a number of fixes and component upgrades over the last Beta release. You can read all about these in the fixed issues
 
We have also done a lot of work to restructure the user guide, upgrade guide and server admin guide to make it easier to find the answers you need.

So, please head over to the download page and try it out. If you have an issue, please report it in our bug tracker, ask us on the forum, or join us for a friendly chat on the #infinispan IRC channel on Freenode.

Prost,
Your friendly Infinispan team

Wednesday, 8 February 2017

Hotrod clients C++/C# 8.1.0.CR1 released!

Dears,

we're pleased to announce that 8.1.0.CR1 release for C++/C# clients is out! Downloading the code you'll find these changes (and may more):
  • C++11 instead of the old portable custom classes
  • less bugs
  • more safety through TLS client authentication
We're getting closer to a final release, more updates on what's going on here:



Enjoy!

Tuesday, 24 January 2017

Infinispan 9.0.0.Beta2 and 8.2.6.Final are out!

It's release day at Infinispan HQ and we've just released a couple of new versions:
  • Infinispan 9.0.0.Beta2 includes:
    • New:
      • Multi-tenancy support for Hot Rod and REST endpoints improve Infinispan Server experience on OpenShift.
      • Transactional support for Functional API (thx Radim!)
      • Internal data container changes, see Will's blog posts (here and here) for more info.
      • Off-heap bounded data container has been added.
      • ElasticSearch storage for indexes.
      • Multiple additions and enhancements to the management console.
      • Further performance improvements.
    • Backwards compatibility:
      • Binary and mixed JDBC cache stores have been removed. To migrate data over, use the JDBC cache store migrator.
      • Dropped default cache inheritance.
    • Full release notes.

Cheers,
Galder

Monday, 23 January 2017

Data Container Changes Part 2

Before the end of the year I wrote a blog post detailing some of the more recent changes that Infinispan introduced with the in memory data container.  As was mentioned in the previous post we would be detailing some other new changes. If you poked around in our new schema after Beta 1 you may have spoiled the surprise for yourself.

With the upcoming 9.0 Beta 2, I am excited to announce that Infinispan will have support for entries being stored off heap, as in outside of the JVM heap. This has some interesting benefits and drawbacks, but we hope you can agree the benefits in many cases far outweigh the drawbacks. But before we get into that lets first see how you can configure your cache to utilize off heap.

New Configuration


The off heap configuration is another option under the new memory element that was discussed in the previous post. It is used in the same way that either OBJECT or BINARY is used.  You can use either COUNT or MEMORY eviciton types, the example below shows the latter.

XML


DECLARATIVE

As you can see the configuration is almost identical to the other types of storage. The only real difference is the new address pointer argument, which will be explained below.

Requirements


Our off heap implementation supports all existing features of Infinispan. There are some limitations and drawbacks of using the feature. This section will describe these in further detail.

Serialization


Off Heap runs in essentially BINARY mode, which requires entries to be serialized into their byte[] forms. Thus all keys and entries must be Serializable or have provided Infinispan Externalizers.

Size


Currently a key and a value must be able to be stored in a byte[]. Therefore a key or value in serialized form cannot be more than just over 2 Gigabytes.  This could be enhanced possibly at a later point, if the need arose.  I hope you aren't transferring this over your network though!


Implementation Details 


Our off heap implementation uses the Java Unsafe to allocate memory outside of the Java heap. This data is stored as a bucket of linked list pointers, just like a standard Java HashMap. When an entry is added the key's serialized byte[] is hashed and an appropriate offset is found in the bucket. Then the entry is added to the bucket as the first element or if an entry(ies) is present it is added to the rear of the linked list.

All of this data is protected by an array of ReadWriteLock instances.  The number of address pointers is evenly divisible by the number of lock instances.  The number of lock instances is how many cores your machines doubled and rounded to the nearest power of two.  Thus each lock protects an equivalent amount of address spaces.  This provides for good lock granularity and reads will not block each other but unfortunately writes will wait and block all reads.

If you are using a bounded off heap container either by count or memory this will create a backing LRU doubly linked list to keep track of which elements were accessed most recently and removes the least recently accessed element when there are too many present in the cache.

 

Memory Overhead


As with all cache implementations there is overhead required to store these entries. We have a fixed and variable overhead which scales with the amount of entries. I will detail these and briefly mention what they are used for.

Fixed overhead

As was mentioned there is a new address count parameter when configuring off heap. This value is used to determine how many linked list pointers are available. Normally you want to have more node pointers than you have entries in the cache, since then chances are you have one element in each linked list.  This is very similar to the int argument constructor for HashMap.  It is also rounded up to the nearest power of two.  The big difference being that this off heap implementation will not resize.  Thus your read/write times will be slower if you have a lot of collisions. The overhead of a pointer is 8 bytes, so for approximately one million pointers it will be 8 Megabytes of off heap.

Bounded off heap requires very little fixed memory, just 32 bytes for head/tail pointers and a counter and an additional Java lock object.

Variable overhead

Unfortunately to store your entries we may need to wrap them with some data. Thus for every entry you add to the cache we store an additional 25 bytes for each entry.  This data is used for header information and also our linked list forward pointer.

Bounded off heap requires additional housekeeping for its LRU list nodes.  Thus each entry adds an additional 36 bytes above the number above. It is larger due to requiring a doubly linked list and having to have pointers to and from the entry and eviction node.

Performance


The off heap container was designed with the intent that key lookups are quite fast. In general these should be about the same performance. However local reads and stream operations can be a little slower as there is an additional deserialization phase required.

Summary


We hope you all try out our new off heap feature! Please make sure to contact us if you have any feedback, find any bugs or have any questions!  You can get in contact with us on our forum, issue tracker, or directly on IRC freenode channel Infinispan