Quark is a specialized language for defining and implementing communication protocols in multiple languages. In particular, protocols that have semantics that require sophisticated client behavior are well suited to Quark.
As distributed systems have proliferated (e.g., microservices), the need for more sophisticated protocols that incorporate backpressure, failover, retries, timeouts, rate limiting, and other behavior has increased. Unfortunately, this sophistication introduces more complexity in implementation. In turn, implementation complexity reduces adoption because supporting a protocol implementation in multiple languages requires manual porting.
The use cases for Quark are highly varied. Some examples:
- the Slack API includes rate limiting behavior over a WebSockets and REST API; see slack.q for an example implementation
- the AMQP 1.0 protocol requires sophisticated client behavior for flow control and reconnect
A popular use case for Quark is to add resilience semantics for microservice architectures. If you're interested in doing this, check out Datawire Connect which embeds Quark.
If you're interested in using Quark directly to develop a protocol, just install Quark:
curl -sL https://raw.githubusercontent.com/datawire/quark/master/install.sh | sh
Check out the examples in the Quark Examples repository:
git clone email@example.com:datawire/quark.git cd quark/examples
The Quark Quick Start provides an overview of the basic installation requirements and process, basic compile commands, and the Quark language. If you have successfully run any of the examples linked above, you can probably skip this book.
Please read the Quark Installation and Configuration Guide for more detailed information about installation, configuration, compilation, packaging, and documentation generation.
The Quark Language Reference provides information about how to code in Quark and specifics about individual language elements including keywords, operators, functions, data types, and annotations.