Over a million developers have joined DZone.

GridGain 6.1.0 Is Released with Support for JDK8 and Geo-Spacial Indexes

· Database Zone

Build fast, scale big with MongoDB Atlas, a hosted service for the leading NoSQL database. Try it now! Brought to you in partnership with MongoDB.

I am pleased to announce that GridGain 6.1.0 has been released last week. This is the first main upgrade since GridGain 6.0.0 was released in February and contains some cool new functionality and performance improvements:

Support for JDK8

With GridGain 6.1.0 you can execute JDK8 closures and functions in distributed fashion on the grid:

try (Grid grid = GridGain.start()) {
  grid.compute().broadcast((Runnable & Serializable)() -> 
      System.out.println("Hello World")).get();

Geo-Spacial Indexes

GridGain allows to easily query in-memory data in SQL using in-memory indexes. Now you can extend SQL to geo-spatial queries. For example, query below will find all points on the map within a certain square region:

Polygon square = factory.createPolygon(new Coordinate[] {
   new Coordinate(0, 0),
   new Coordinate(0, 100),
   new Coordinate(100, 100),
   new Coordinate(100, 0),
   new Coordinate(0, 0)

    createSqlQuery(MapPoint.class, "select * from MapPoint where location && ?").

Near Cache in Atomic Mode

Prior to 6.1.0 GridGain supported near cache only in transactional mode. Starting with 6.1.0 near cache support was added to atomic mode as well.

Near cache allows for client-side caching (vs traditional server side caching) and renders significant performance improvements in some cases.

Fair Affinity Functions

Many know that Consistent Hashing provides a consistent distribution of data within a cluster that is resilient to server failures, but not many know that consistent hashing is not very fair. The discrepancies in distribution can be up to 20% which means that some servers will end up with 20% more data than others. This may create uneven load distribution when running cluster-enabled computations or queries.

GridGain 6.1 added two more affinity functions in addition to consistent hashing: Rendezvous and Fair.

Rendezvous affinity function works faster than consistent hashing and for smaller topologies (under 10 servers) provides a pretty fair distribution. One of the nice features here is that cache key affinity survives full cluster restarts. This means that you can back up data to disk and then reload it on restart knowing that all keys are still mapped to the same node.

Fair affinity function provides absolutely fair cache key distribution with all grid nodes holding absolutely equal amount of keys at all times. However, fair affinity function may change key-to-node assignment upon full cluster restarts.

Other Enhancements

Other fixes and enhancements involve improvements to multicast protocol for discovery and significant performance improvements for distributed cache queues.

You can download GridGain 6.1 here.

Now it's easier than ever to get started with MongoDB, the database that allows startups and enterprises alike to rapidly build planet-scale apps. Introducing MongoDB Atlas, the official hosted service for the database on AWS. Try it now! Brought to you in partnership with MongoDB.


Published at DZone with permission of Dmitriy Setrakyan, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}