Distributed Data Structures

Hazelcast Python Client functions as a simple proxy to Hazelcast distributed data structures using Hazelcast Client Protocol. Please refer to Hazelcast Documentation, Section:Distributed Data Structures for details of these distributed structures.

Hazelcast Python Client supports the following data structures:

Standard utility collections

  • Map is a distributed dictionary. It lets you read from and write to a Hazelcast map with methods such as get and put.
  • Queue is a Concurrent, blocking, distributed, observable queue. You can add an item in one member and remove it from another one.
  • Ringbuffer is implemented for reliable eventing system. It is also a distributed data structure.
  • Set is Concurrent, distributed implementation of Set
  • List is similar to Hazelcast Set. The only difference is that it allows duplicate elements and preserves their order.
  • MultiMap is a specialized Hazelcast map. It is a distributed data structure where you can store multiple values for a single key.
  • ReplicatedMap does not partition data. It does not spread data to different cluster members. Instead, it replicates the data to all members.

Concurrency utilities

  • Lock is a distributed implementation of asyncio.Lock.
  • Semaphore is a backed-up distributed alternative to the Python asyncio.Semaphore
  • AtomicLong is a redundant and highly available distributed long value which can be updated atomically.
  • AtomicReference is an atomically updated reference to an object. When you need to deal with a reference in a distributed environment, you can use Hazelcast AtomicReference.
  • IdGenerator is used to generate cluster-wide unique identifiers. ID generation occurs almost at the speed of increment_and_get().
  • CountDownLatch is a backed-up, distributed, cluster-wide synchronization aid that allows one or more threads to wait until a set of operations being performed in other threads completes

Distributed Events

You can register for Hazelcast entry events so you will be notified when those events occur. Event Listeners are cluster-wide–when a listener is registered in one member of cluster, it is actually registered for events that originated at any member in the cluster. When a new member joins, events originated at the new member will also be delivered. Please refer to Hazelcast Documentation, Section:Distributed Events.

Distributed Query

Please refer to Hazelcast Documentation, Section:Distributed Events.