Rekuest
Rekuest is one of the core services of Arkitekt. It represents a central repository of all the connected apps and their provided functionality, their Nodes. It also provides ways of interacting with the apps, by providing a central access point, that apps and users can assign tasks to. Rekuest then takes care of routing the requests to the appropriate app, which executres the task and returns the result to rekuest, which in turn routes it back to the caller. Similar to all other Arkitekt ervices, Rekuest exposes a GraphQL API, that can be used to interact with it. You can find the interactive documentation for the API here.
Open Rekuest on GithubRekuest Design
Rekuest itself is designed as a stateless service (in order to be able to scale horizontally), and interfaces with proven open-source technologies, such as Redis and RabbitMQ. to route tasks to the appropriate apps. The following diagram shows the high-level design of Rekuest:
Challenges as a Distributed System
Rekuest is our backbone service for the distributed task execution in Arkitekt. As such it has to be highly available and fault-tolerant. This is a huge undertaking and we are still in the process of refining the design and implementation of Rekuest.
But luckily we are not alone in this. And we are standing on the shoulders of giants, and we relying heavily on proven open-source technologies to build Rekuest. This allows us to focus on the business logic and the integration with other Arkitekt services, and not have to worry about the low-level details of distributed systems.
We tried to achieved this by using a message broker (RabbitMQ) to queue and distribute tasks to the appropriate apps, and only thinly wrapping it in a websocket-based API. The sole purpose of this wrapping is to establish authentication and authorization and to monitor the health of the system and the state of all connected apps.