-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timeout service #5
Labels
enhancement
New feature or request
Milestone
Comments
ojow
added a commit
that referenced
this issue
May 29, 2018
ojow
added a commit
that referenced
this issue
May 29, 2018
prepor
pushed a commit
that referenced
this issue
May 30, 2018
ojow
added a commit
that referenced
this issue
May 30, 2018
ojow
added a commit
that referenced
this issue
May 30, 2018
ojow
added a commit
that referenced
this issue
May 30, 2018
ojow
added a commit
that referenced
this issue
May 30, 2018
ojow
added a commit
that referenced
this issue
May 31, 2018
ojow
added a commit
that referenced
this issue
May 31, 2018
ojow
added a commit
that referenced
this issue
May 31, 2018
ojow
added a commit
that referenced
this issue
Jun 1, 2018
ojow
added a commit
that referenced
this issue
Jun 4, 2018
ojow
added a commit
that referenced
this issue
Jun 4, 2018
Added wiki page: https://github.com/xray-tech/xray/wiki/Timeout-Service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Timeout service
introduction
Xray 1.0
As described by Xray 1.0 doc:
The idea is that it's a standalone, distributed, fault-tolerant service communicating with external world through RabbitMQ. The goal of the service is to publish so called
timer.Expired
events at the specified point in time.The API is (quoting the 1.0 doc):
The 1.0 implementation uses Aerospike for fault-tolerance: all the timeout requests are stored there and are read in memory at the startup by scanning Aerospike.
Xray OAM
The proposed implementation is based on the prototype developed using Scala+Kafka Streams.
The required Kafka Streams components are:
KStream
- basically it's a stream of requests from a Kafka topicPunctuator
- the Kafka Stream abstraction for internal schedulingThe implementation is very simple: every request is stored in the local storage,
Punctuator
gets the oldest (up untilnow
) requests from the store every, let's say, 100ms and publishes thetimer.Expired
events to the output topic while also deleting them from the local storage. Cancel requests are handled trivially by just deleting the records from the local storage.Kafka Streams not only allows for easy and transparent implementation but also adds easily configurable delivery guarantees (including
exactly once
solution using Kafka transactions). The solution is automatically scalable because of consistent hashing approach used with Kafka topics (meaning that timeout requests for the same entity will be handled by the same node and resulting events will be published to the same partition).The plan is to implement the same logic with Clojure, adding the Timeout Service a component of duct-tape/integrant. This is flexible enough to run it either as part of the Rule Engine process or a separate deployment.
scope and result
This is mostly just a port of the existing service with some improvements coming "for free" with Kafka Streams. In particular we don't aim to improve the granularity and maximum latency.
Expected deliveries:
Rwait(x, unit)
andScheduleTimerAt(timestamp)
sites should be available for Orc programsThe text was updated successfully, but these errors were encountered: