Skip to main content

Build Event-Driven Microservices

DataSQRL compiles efficient event-driven microservices to process events in realtime without the architectural complexity and all that data plumbing code.

# Query the processed data
type Query {
SecReading(sensorid: Int!): [SecReading!]
SensorMaxTemp(sensorid: Int): [SensorMaxTemp!]
}
# Mutation ingest sensor readings as metrics events
type Mutation {
AddReading(metric: ReadingInput!): CreatedReading
}
# Realtime push notifications on temperature alerts
type Subscription {
HighTempAlert(sensorid: Int): HighTempAlert
}

Step 1: Define Your Event-Driven Data API

GraphQL mutations for event ingestion, queries for data retrieval, and subscriptions for realtime data updates and push notifications.

IMPORT metricsapi.AddReading; -- Ingested through mutation endpoint
IMPORT time.endOfSecond; -- Import time function
/* Aggregate sensor readings to second */
SecReading := SELECT sensorid, endOfSecond(_source_time) as timeSec,
avg(temperature) as temp FROM AddReading
GROUP BY sensorid, timeSec;
/* Get max temperature in last minute */
SensorMaxTemp := SELECT sensorid, max(temp) as maxTemp
FROM SecReading
WHERE timeSec >= now() - INTERVAL 1 MINUTE
GROUP BY sensorid;
/* Alert on high temperatures */
HighTempAlert := SELECT * FROM SecReading WHERE temp > 50;

Step 2: Implement Data Processing in SQL

Process incoming events from the API or external data systems in SQL and define the tables that can be queried and streamed through the API.

Try this Example
DataSQRL Compiles Event-Driven Microservices

Step 3: DataSQRL Compiles Event-Driven Microservice

DataSQRL compiles SQL + GraphQL schema into an optimized microservice powered by Apache Flink, Kafka, and Postgres. DataSQRL eliminates all the data plumbing between components allowing you to build quickly.

Why DataSQRL?

To efficiently expose processed event data in realtime you need event-driven microservices. But building those requires complicated architectures and integrating complex technologies. DataSQRL compiles event-driven architectures and eliminates data plumbing to make your microservice implementation simple.

Get Help Building ED Architectures
DataSQRL Makes Event-Driven Microservices Simple
Saves You Time

Saves You Time

DataSQRL allows you to focus on your data processing by eliminating the data plumbing that strangles your data pipeline implementation with busywork: data mapping, schema management, data modeling, error handling, data serving, API generation, and so on.

Easy to Use

Easy to Use

Implement your data processing with the SQL you already know. DataSQRL allows you to focus on the "what" and worry less about the "how". Import your functions when SQL is not enough - DataSQRL makes custom code integration easy.

Fast & Efficient

Fast & Efficient

DataSQRL builds efficient data pipelines that optimize data processing, partitioning, index selection, view materialization, denormalization, and scalability. There actually is some neat technology behind this buzzword bingo.

Fully Customizable

Fully Customizable

Open Source

Open Source

Robust & Scalable

Robust & Scalable