0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Differences between Drasi’s continuous query and Elasticsearch’s percolate query

Last updated at Posted at 2024-10-25

Motivation

When I saw this article, I thought the way Drasi's continuous query applies queries to events was similar to Elasticsearch's percolate query.

Microsoft Introduces Drasi: Open-Source System for Real-Time Event Processing and Automation

This article is the result of asking Gemini about it.

Are they same?

While both Elasticsearch's percolate query and Drasi's continuous queries deal with matching incoming data against predefined queries, there are some key differences.

Elasticsearch Percolate Query:

  • Focus:
    • Primarily designed for indexing queries and then matching documents against those queries. It's like asking "Which of these registered queries does this document match?"
  • Mechanism:
    • You register your queries in an Elasticsearch index. When you "percolate" a document, it's indexed into a temporary in-memory index and compared against the registered queries.
  • Use Cases:
    • Alerting, classification, and real-time analytics based on matching documents to predefined criteria.

Drasi Continuous Query:

  • Focus:
    • Geared towards real-time event processing and automation. It's like saying "Whenever an event happens that matches this condition, take this action."
  • Mechanism:
    • Continuous queries are defined as part of a Drasi pipeline. Incoming events are evaluated against these queries, and matching events trigger actions (e.g., sending notifications, updating databases, or invoking other services).
  • Use Cases:
    • Real-time monitoring, automated responses to events, and complex event processing in applications like IoT, fraud detection, and business process automation.

Key Differences Summarized:

Feature Elasticsearch Percolate Query Drasi Continuous Query
Primary Purpose Match documents to queries Trigger actions based on events
Scope Primarily within Elasticsearch Part of a larger event processing pipeline
Action Trigger Matching a document Matching an event
Typical Use Cases Alerting, classification Real-time monitoring, automation

In essence:

  • Percolate queries are about finding which queries a document matches.
  • Continuous queries are about taking actions when events match specific conditions.

While they share similarities in the concept of matching, their purpose and implementation within their respective systems are distinct.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?