Running Distributed Queries
Explore the tools that Hazelcast offers for running distributed queries.
What is a Distributed Query?
In a distributed system such as Hazelcast, data is partitioned across different members in the cluster. As a result, to query that data you have two options:
-
Request all data from members and iterate over it locally until you find what you’re looking for.
-
Build a distributed query that each member can run so that you receive only the data you want.
Distributed queries allow you to request filtered data from members or external data sources without having to receive it all and iterate over it locally.
Available Tools
Hazelcast offers the following tools for running distributed queries, depending on your use case:
-
SQL: Use SQL syntax to query your cluster for data in map entries or query external systems such as Apache Kafka.
-
Predicates API: Use a client API to query your cluster for data in map entries.
SQL | Predicates API | |
---|---|---|
Can query data in external sources |
Yes |
No |
Can query nested object fields |
No |
Yes |
Can query JSON data in map entries |
Yes |
Yes |
Supported Hazelcast clients |
Java Node.js Python |
All clients |