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¶
Mapis a distributed dictionary. It lets you read from and write to a Hazelcast map with methods such as get and put.Queueis a Concurrent, blocking, distributed, observable queue. You can add an item in one member and remove it from another one.RingBufferis implemented for reliable eventing system. It is also a distributed data structure.Setis Concurrent, distributed implementation ofSetListis similar to Hazelcast Set. The only difference is that it allows duplicate elements and preserves their order.MultiMapis a specialized Hazelcast map. It is a distributed data structure where you can store multiple values for a single key.ReplicatedMapdoes not partition data. It does not spread data to different cluster members. Instead, it replicates the data to all members.
Concurrency utilities¶
Lockis a distributed implementation of asyncio.Lock.Semaphoreis a backed-up distributed alternative to the Python asyncio.SemaphoreAtomicLongis a redundant and highly available distributed long value which can be updated atomically.AtomicReferenceis an atomically updated reference to an object. When you need to deal with a reference in a distributed environment, you can use Hazelcast AtomicReference.IdGeneratoris used to generate cluster-wide unique identifiers. ID generation occurs almost at the speed ofincrement_and_get().CountDownLatchis 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.