Quark is a specialized language for defining and implementing communication protocols in multiple languages.
Python JavaScript Java Ruby Shell HTML CSS
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.travis Install even more. Sep 8, 2016
design Moved testing.md into the testing directory. Jun 15, 2016
docs Changed version to datawire-quark, 1.0.452 (doc 1). [ci skip] Oct 12, 2016
examples Replace explicit logging with QUARK_TRACE Jun 24, 2016
images Make Ubuntu images work with current Docker Ubuntu Jun 24, 2016
node_modules Ignore all in node_modules as anything installed will get dumped there Nov 19, 2015
quarkc Changed version to datawire-quark, 1.0.452 (doc 1). [ci skip] Oct 12, 2016
scripts quark-run docker image, add python3 Sep 8, 2016
tools/quark-maven-plugin bump version to 0.4.2 Jan 21, 2016
.dockerignore More junk to ignore. Jun 15, 2016
.gitignore Ignore quark compiler output. Oct 12, 2016
.pylintrc Enable some more pylint checks. Jun 10, 2016
.ruby-version require ruby 2.3.0 Mar 29, 2016
.travis.yml Give up on Mac builder, since examples are going away soon anyway. Sep 8, 2016
CHANGELOG.md Fix JSON deserialization of numbers in cases where the type isn't known. Oct 12, 2016
CODE_OF_CONDUCT.md Add skeleton contributor doc May 23, 2016
CONTRIBUTING.md Add skeleton contributor doc May 23, 2016
Dockerfile.base Switch to Alpine Linux, for smaller image. Jun 10, 2016
Dockerfile.dev Docker bug fixes for scripts/with-docker.py. Jun 14, 2016
Dockerfile.run quark-run docker image, add python3 Sep 8, 2016
Gemfile Make versions of Ruby gems match across config files. Jun 10, 2016
LICENSE Initial commit Aug 27, 2015
README.md Update documentation links. Jun 17, 2016
RELEASE.md Better markdown. Jun 17, 2016
ROADMAP.md Updating ROADMAP.md doc with Ruby support Apr 7, 2016
TESTING.md Fix typo. May 26, 2016
install-requirements.txt Remove semantic_version from install-requirements.txt Jun 10, 2016
install.sh Support installing from tags (#187) Jun 23, 2016
release Add `release build-docker-images --dirty` for local testing Sep 8, 2016
requirements.txt Just enough to get lib_test.q tests passing. Sep 7, 2016
setup.cfg Run flake8 on all the things Travis runs. Jun 9, 2016
setup.py Move install requirements into separate file. May 25, 2016

README.md

Quark

Build Status Slack

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.

Motivation

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.

Quark addresses this problem by enabling protocol authors to write a single canonical implementation in the Quark language. The Quark compiler then generates idiomatic implementations of the protocol in multiple languages (currently Java, JavaScript, and Python, with Ruby support in progress).

Use cases

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

Getting Started

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

Examples

Check out the examples in the Quark Examples repository:

    git clone git@github.com:datawire/quark.git
    cd quark/examples

Next Steps

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.

The Quark Issues list provides a list of known issues - please feel free to add new issues or feature requests as you start to use Quark. You can also join our public Slack support channel.

If you want to contribute to Quark see the contributing documentation and testing documentation.