Jump to: navigation, search

Difference between revisions of "Frequently asked questions (Zaqar)"

(First draft, still rough!)
 
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Is Marconi a provisioning service, or a data API? ==
+
== How mature is the project? ==
 +
 
 +
Zaqar is an incubated OpenStack project. With the close of the Icehouse cycle, the program has achieved a number of important milestones:
 +
 
 +
* Zaqar's first official, production-ready "1.0" release is now [http://tarballs.openstack.org/zaqar/ available for download]. This first release includes a battle-tested MongoDB driver, and production-ready drivers for additional backends are in the works.
 +
* Zaqar's v1.0 API is stable and ready to code against.
 +
* Basic user and operator docs are [http://docs.openstack.org/developer/zaqar/ now available], and we will be adding tons of new content during Juno.
 +
* A reference Python client library (written in Python) is [https://pypi.python.org/pypi/python-zaqarclient/ now available on PyPI] which supports the entire v1.0 API.
 +
* A standalone C# client library is [https://github.com/abettadapur/marconiclient now available on GitHub].
 +
* Support for Python, C# and other languages is also now available through [http://developer.rackspace.com/#home-sdks Rackspace-supported SDKs].
 +
 
 +
 
 +
The program has attracted a growing community of contributors from all over the world. We are particularly proud of our interns:
 +
 
 +
* 10+ organizations represented
 +
* 5 core reviewers
 +
* 6 interns for Juno (representing GSoC, GNOME OPW, Rackspace and Red Hat)
 +
 
 +
== Is Zaqar an under-cloud or an over-cloud service? ==
 +
 
 +
Zaqar's primary mission is to provide a multi-tenant, web-friendly messaging and notifications service to over-cloud web and mobile application developers. In addition, several projects have expressed interest in integrating with Zaqar in order to surface events to end-users, and to communicate with guest agents. Zaqar is not intended to replace oslo.messaging.
  
We've heard from people who want something akin to AMQP-as-a-service, and others who can’t wait to get away from AMQP. We believe there are (at least) two different markets here that will need to be addressed in different ways (and likely by different OpenStack programs).
+
== Is Zaqar a provisioning service or a data API? ==
# Numbered list item
 
Taking into consideration that traditional messaging solutions, such as AMQP, were not designed with multi-tenancy in mind, we think there may be a market for productizing single-tenant AMQP boxes, similar to what Trove does for databases. For some use cases, it could be a cost-effective solution, but we don’t think it is the right answer for everybody. Not only due to cost, but also because many developers actually prefer a simpler, HTTP-based API.
 
  
Marconi's API is data-oriented. That is, it does not provision messaging services. Instead, it acts as a bridge between the client and one or more backends. In fact, Marconi's API *is* the product; it provides common messaging semantics on top of existing messaging and storage systems. Marconi's data API aims to be simpler, more flexible and more oriented to the needs of web and mobile application developers than the underlying API.
+
Zaqar's API is data-oriented. That is, it does not provision message brokers. Instead, it acts as a bridge between the client and one or more backends. In fact, Zaqar's API *is* the product; it provides common messaging semantics on top of existing messaging and storage systems. Zaqar's data API aims to be simpler, more flexible and more oriented to the needs of web and mobile application developers than the underlying API.
  
Regardless of the backend in use, Marconi provides a web-friendly API that is service-oriented and multi-tenant, and is as lightweight, pragmatic and useful as possible. Marconi can run standalone, but works best when leveraging other OpenStack programs such as Keystone and Barbican. In turn, other programs can use Marconi to surface events to end users.
+
Regardless of the backend in use, Zaqar provides a web-friendly API that is service-oriented and multi-tenant, and is as lightweight, pragmatic and useful as possible. Zaqar can run standalone, but works best when leveraging other OpenStack programs such as Keystone and Barbican. In turn, other programs can use Zaqar to surface events to end users.
  
Marconi's API provides:
+
Zaqar's API provides:
  
 +
* Support for multi-tenancy, which amortizes the cost of a production deployment across multiple acounts.
 
* A first-class, idiomatic HTTP transport that is familiar to web developers and works well across firewalls and poor network connections.
 
* A first-class, idiomatic HTTP transport that is familiar to web developers and works well across firewalls and poor network connections.
 
* A design that scales to hundreds of thousands or even millions of message topics AKA queues, allowing web developers to communicate with an "Internet of things".
 
* A design that scales to hundreds of thousands or even millions of message topics AKA queues, allowing web developers to communicate with an "Internet of things".
Line 17: Line 36:
 
* An architecture that allows multiple messaging and storage backends to run side-by-side under the same API.
 
* An architecture that allows multiple messaging and storage backends to run side-by-side under the same API.
 
* A (relatively) easy-to-scale, HA, multi-tenant messaging service
 
* A (relatively) easy-to-scale, HA, multi-tenant messaging service
 +
 +
 +
A provisioning service for message brokers, however useful, serves a somewhat different market from what Zaqar is targeting today. If users are interested in a queue provisioning service, the community should consider starting a new program to address that need.
 +
 +
== Will Zaqar only support HTTP as a transport, or will it add other protocols as well? ==
 +
 +
We are focusing on HTTP for Juno, but are considering adding a lower-level, persistent transport (perhaps based on WebSocket) in the K cycle.
 +
 +
== Many "traditional message brokers" have offered HTTP. What makes Zaqar different? ==
 +
 +
Zaqar is multi-tenant, and also offers a more RESTful API (in our opinion) than the alternatives. That being said, there's a good chance we missed something, so please share what you have in mind with the team and we will be happy to discuss it.
 +
 +
== How does Zaqar scale? ==
 +
 +
First of all, since Zaqar uses HTTP and follows the REST architectural style, you get all the associated scaling benefits from that.
 +
 +
Secondly, regarding the backend, Zaqar has a notion of “pools", across which queues can be sharded. Messages for an individual queue may not be sharded across  multiple pools, but a single queue may be sharded within a given pool,  depending on whether the driver supports it. In any case, you can imagine each pool as encapsulating a single DB or broker cluster. Once you reach the limits of scalability within your initial pool (due to networking, hard limitations in the given backend, etc.), you can provision other pools as needed.
 +
 +
== Why does Zaqar use the Store-and-Forward Design? ==
 +
 +
“Store and forward” refers to the pattern of buffering or otherwise storing a message in some intermediary before forwarding the message to its destination. This technique is a common solution in messaging systems for dealing with intermittent connectivity. Zaqar's store-and-forward architecture makes the service resilient to networking partitioning, firewalls, congestion, server node failures, etc. It is also a natural complement to the REST architectural style employed in Zaqar's API design and implementation.
  
 
== What is the purpose of the SQLAlchemy driver? ==
 
== What is the purpose of the SQLAlchemy driver? ==
  
It is well known that a classic RDBMS, such as MySQL, performs poorly at scale as a messaging backend. Therefore, bundling a SQLAlchemy driver with Marconi may seem like an odd thing to do. Nevertheless, the driver does have its uses:
+
It is well known that a classic RDBMS, such as MySQL, performs poorly at scale as a messaging backend. Therefore, bundling a SQLAlchemy driver with Zaqar may seem like an odd thing to do. Nevertheless, the driver does have its uses:
  
* It provides support for SQLite, which is very useful for development. Among other benefits, supporting SQLite means you can go from zero to a working local Marconi server in just 3 steps.
+
* It provides support for SQLite, which is very useful for development. Among other benefits, supporting SQLite means you can go from zero to a working local Zaqar server in just 3 steps.
 
* It provides a reference implementation of the storage driver interface. The same functional tests that pass when running against the SQLAlchemy driver must also pass for all other drivers, helping ensure consistent behavior.
 
* It provides a reference implementation of the storage driver interface. The same functional tests that pass when running against the SQLAlchemy driver must also pass for all other drivers, helping ensure consistent behavior.
* It helps the team be more pragmatic in the design of Marconi's API and in the service's architecture. The SQLAlchemy driver is part of a broader effort to create drivers to represent each of the most common data store families, including NoSQL, SQL, and AMQP.
+
* It helps the team be more pragmatic in the design of Zaqar's API and in the service's architecture. The SQLAlchemy driver is part of a broader effort to create drivers to represent each of the most common data store families, including NoSQL, SQL, and AMQP.
  
== Why is it an anti-pattern to use a SQL database for messaging? ==
+
<!-- == Why is it an anti-pattern to use a SQL database for messaging? ==
  
Much has been written on this topic, all over the Internet, and so we won't repeat it here. Suffice it to say that your average RDBMS is not optimized to handle a huge number of ephemeral records.
+
Many RDBMSes simply aren't optimized to cope with the constant churn of a large number of ephemeral records. If you'd like to learn more, a few online searches should bring some the writings on the topic.
 +
-->
  
== Why did you choose to start with MongoDB? ==
+
== Why did you start with MongoDB? ==
  
 
Some NoSQL databases work better for implementing messaging systems than do others. For example, Redis and MongoDB are known to work well in this role, while Cassandra performs rather poorly.
 
Some NoSQL databases work better for implementing messaging systems than do others. For example, Redis and MongoDB are known to work well in this role, while Cassandra performs rather poorly.
  
The Marconi team decided to start with MongoDB because:
+
The Zaqar team decided to start with MongoDB because:
  
 
* MongoDB's flexible query system was able to support all of the operations required by the 1.0 API
 
* MongoDB's flexible query system was able to support all of the operations required by the 1.0 API
Line 43: Line 84:
  
  
With this in mind, it's important to mention that despite the fact MongoDB was the first production-ready storage driver implemented for Marconi, it's not the team's intention to make it the one-and-only driver for all use cases. In fact, more drivers are already in the works. Stay tuned!
+
With this in mind, it's important to mention that despite the fact MongoDB was the first production-ready storage driver implemented for Zaqar, it's not the team's intention to make it the one-and-only driver for all use cases. In fact, more drivers are already in the works. Stay tuned!
  
== What messaging patterns does Marconi support? ==
+
== What messaging patterns does Zaqar support? ==
  
Marconi's API provides a basic set of semantics that, when combined, afford a variety of messaging patterns, such as pub-sub, task distribution, and point-to-point. Messages can be consumed as feeds, queues, or a combination of the two. This can be a little confusing at first, since the API uses the term "queues" to represent a hybrid feeds-queues resource.
+
Zaqar's API provides a basic set of semantics that, when combined, afford a variety of messaging patterns, such as pub-sub, task distribution, and point-to-point. Messages can be consumed as feeds, queues, or a combination of the two. This can be a little confusing at first, since the API uses the term "queues" to represent a hybrid feeds-queues resource.
  
 
When interacting with the API, a client can choose to read a queue in a similar manner to an Atom feed, where any client can read any message, and is responsible for keeping track of its own marker (its position in the feed). This provides for messaging patterns such as pub-sub and point-to-point.
 
When interacting with the API, a client can choose to read a queue in a similar manner to an Atom feed, where any client can read any message, and is responsible for keeping track of its own marker (its position in the feed). This provides for messaging patterns such as pub-sub and point-to-point.
Line 55: Line 96:
 
Finally, a client can use both feed and claim semantics simultaneously to create hybrid messaging patterns. For example, while workers are busy claiming messages from a task queue, an auditor can passively sample those same messages as they flow by.
 
Finally, a client can use both feed and claim semantics simultaneously to create hybrid messaging patterns. For example, while workers are busy claiming messages from a task queue, an auditor can passively sample those same messages as they flow by.
  
== Will Marconi work with AMQP? ==
+
See also: [[Zaqar/Use cases]]
  
* Planned as a backend for v2 API
+
== If queues have no guarantee of ordering, how is the marker guaranteed to still deliver all messages to all targets? ==
* Transport TBD
+
 
* Talk to us about use cases
+
The ordering of messages is actually stable, meaning that given a marker (or no marker), you will always get the same set of messages, in the same order, when listing them. When we say that FIFO is only guaranteed for a single producer, that is because we can’t guarantee which producer’s messages will arrive in our system first. However, as they arrive, they are ordered using a monotonic marker value. This is in contrast to, say, an Atom feed that uses timestamps to order entries, making it possible to get two entries with the same timestamp, which places a burden on the client to detect collisions and then throw out messages it has already received.
* Need contributors
 
  
== How does Marconi compare to AWS (SQS/SNS)? ==
+
Nothing special needs to be done to verify message duplicity or parallelism in the code itself.
  
* Targets similar workloads
+
The only thing a client has to do is keep track of the last marker URI is received (i.e., the “next” href), and submit that in subsequent requests. This helps the server scale efficiently, since it can be stateless (i.e., the server doesn’t have to keep track of what messages every client has or has not already seen).
* Marconi will provide a unified API to handle notifications and queuing
 
* Marconi is highly customizable
 
* FIFO and once-and-only-once guaranteed (depending on storage backend)
 
  
== How does Marconi compare to oslo.messaging? ==
+
== Will Zaqar work with AMQP? ==
  
[[Oslo/Messaging | oslo.messsaging]] is a client library that provides a standard mechanism for various OpenStack services to communicate with each other. As such, the library is single-tenant (the single tenant being the cloud operator). Oslo Messaging was originally developed as an abstraction over AMQP, but has since added support for ZeroMQ.
+
* During Juno we are experimenting with using AMQP as a backend. TBD.
 +
* Transport TBD
 +
* Talk to us about use cases
  
By contrast, Marconi is a hosted, multi-tenant cloud messaging and notifications service. It was created to serve the needs of application developers building on top of OpenStack, and to provide a way for other OpenStack services to surface events to end users.
+
== Will Zaqar work with Kafka? ==
  
== How mature is the project? ==
+
* During Juno we are experimenting with using Kafka as a backend.
 +
* Talk to us about use cases
 +
* We need contributors!
  
Marconi is used in production today: [[Who Uses Marconi? | marconi_users]]
+
== How does Zaqar compare to AWS (SQS/SNS)? ==
  
* Marconi's first official, production-ready "1.0" release is now [http://tarballs.openstack.org/marconi/ available for download]. This first release includes a battle-tested MongoDB driver, and production-ready drivers for additional backends are in the works.
+
* Targets similar workloads
* Marconi's v1.0 API is stable and ready to code against.
+
* Zaqar will provide a unified API to handle notifications and queuing
* Basic user and operator docs are [http://docs.openstack.org/developer/marconi/ now available], and we will be adding tons of new content during Juno.
+
* Zaqar is highly customizable
* A reference client library (written in Python) is now [https://pypi.python.org/pypi/python-marconiclient/ available on PyPI] which supports the entire v1.0 API. Support for other languages is available through [http://developer.rackspace.com/#home-sdks Rackspace-supported SDKs].
+
* FIFO and once-and-only-once guaranteed (depending on storage backend)
  
 +
== How does Zaqar compare to oslo.messaging? ==
  
Latest team stats:
+
[[Oslo/Messaging | oslo.messsaging]] is an RPC library used throughout OpenStack to manage distributed commands by sending messages through different messaging layers.  Oslo Messaging was originally developed as an abstraction over AMQP, but has since added support for ZeroMQ.
  
* 10+ organizations represented
+
As opposed to Oslo Messaging, Zaqar is a messaging service for the over and under cloud. As a service, it is meant to be consumed by using libraries for different languages. Zaqar currently supports 1 protocol (HTTP) and sits on top of other existing technologies (MongoDB as of version 1.0).
* 5 core reviewers
 
* 6 interns (representing GSoC, GNOME OPW, Rackspace and Red Hat)
 
  
== What's next for marconi? ==
+
== What's next for Zaqar? ==
  
 
* API v1.1
 
* API v1.1
Line 102: Line 142:
 
* Additional Dev/Ops features
 
* Additional Dev/Ops features
 
* Expanded documentation
 
* Expanded documentation
 +
 +
 +
See also: [[Zaqar/Roadmap]]

Latest revision as of 13:28, 28 August 2014

How mature is the project?

Zaqar is an incubated OpenStack project. With the close of the Icehouse cycle, the program has achieved a number of important milestones:

  • Zaqar's first official, production-ready "1.0" release is now available for download. This first release includes a battle-tested MongoDB driver, and production-ready drivers for additional backends are in the works.
  • Zaqar's v1.0 API is stable and ready to code against.
  • Basic user and operator docs are now available, and we will be adding tons of new content during Juno.
  • A reference Python client library (written in Python) is now available on PyPI which supports the entire v1.0 API.
  • A standalone C# client library is now available on GitHub.
  • Support for Python, C# and other languages is also now available through Rackspace-supported SDKs.


The program has attracted a growing community of contributors from all over the world. We are particularly proud of our interns:

  • 10+ organizations represented
  • 5 core reviewers
  • 6 interns for Juno (representing GSoC, GNOME OPW, Rackspace and Red Hat)

Is Zaqar an under-cloud or an over-cloud service?

Zaqar's primary mission is to provide a multi-tenant, web-friendly messaging and notifications service to over-cloud web and mobile application developers. In addition, several projects have expressed interest in integrating with Zaqar in order to surface events to end-users, and to communicate with guest agents. Zaqar is not intended to replace oslo.messaging.

Is Zaqar a provisioning service or a data API?

Zaqar's API is data-oriented. That is, it does not provision message brokers. Instead, it acts as a bridge between the client and one or more backends. In fact, Zaqar's API *is* the product; it provides common messaging semantics on top of existing messaging and storage systems. Zaqar's data API aims to be simpler, more flexible and more oriented to the needs of web and mobile application developers than the underlying API.

Regardless of the backend in use, Zaqar provides a web-friendly API that is service-oriented and multi-tenant, and is as lightweight, pragmatic and useful as possible. Zaqar can run standalone, but works best when leveraging other OpenStack programs such as Keystone and Barbican. In turn, other programs can use Zaqar to surface events to end users.

Zaqar's API provides:

  • Support for multi-tenancy, which amortizes the cost of a production deployment across multiple acounts.
  • A first-class, idiomatic HTTP transport that is familiar to web developers and works well across firewalls and poor network connections.
  • A design that scales to hundreds of thousands or even millions of message topics AKA queues, allowing web developers to communicate with an "Internet of things".
  • A JSON-based message schema that is easy to understand, efficient to transmit, and quick to parse
  • An architecture that allows for future transports such as WebSockets, tcp etc.
  • An architecture that allows multiple messaging and storage backends to run side-by-side under the same API.
  • A (relatively) easy-to-scale, HA, multi-tenant messaging service


A provisioning service for message brokers, however useful, serves a somewhat different market from what Zaqar is targeting today. If users are interested in a queue provisioning service, the community should consider starting a new program to address that need.

Will Zaqar only support HTTP as a transport, or will it add other protocols as well?

We are focusing on HTTP for Juno, but are considering adding a lower-level, persistent transport (perhaps based on WebSocket) in the K cycle.

Many "traditional message brokers" have offered HTTP. What makes Zaqar different?

Zaqar is multi-tenant, and also offers a more RESTful API (in our opinion) than the alternatives. That being said, there's a good chance we missed something, so please share what you have in mind with the team and we will be happy to discuss it.

How does Zaqar scale?

First of all, since Zaqar uses HTTP and follows the REST architectural style, you get all the associated scaling benefits from that.

Secondly, regarding the backend, Zaqar has a notion of “pools", across which queues can be sharded. Messages for an individual queue may not be sharded across multiple pools, but a single queue may be sharded within a given pool, depending on whether the driver supports it. In any case, you can imagine each pool as encapsulating a single DB or broker cluster. Once you reach the limits of scalability within your initial pool (due to networking, hard limitations in the given backend, etc.), you can provision other pools as needed.

Why does Zaqar use the Store-and-Forward Design?

“Store and forward” refers to the pattern of buffering or otherwise storing a message in some intermediary before forwarding the message to its destination. This technique is a common solution in messaging systems for dealing with intermittent connectivity. Zaqar's store-and-forward architecture makes the service resilient to networking partitioning, firewalls, congestion, server node failures, etc. It is also a natural complement to the REST architectural style employed in Zaqar's API design and implementation.

What is the purpose of the SQLAlchemy driver?

It is well known that a classic RDBMS, such as MySQL, performs poorly at scale as a messaging backend. Therefore, bundling a SQLAlchemy driver with Zaqar may seem like an odd thing to do. Nevertheless, the driver does have its uses:

  • It provides support for SQLite, which is very useful for development. Among other benefits, supporting SQLite means you can go from zero to a working local Zaqar server in just 3 steps.
  • It provides a reference implementation of the storage driver interface. The same functional tests that pass when running against the SQLAlchemy driver must also pass for all other drivers, helping ensure consistent behavior.
  • It helps the team be more pragmatic in the design of Zaqar's API and in the service's architecture. The SQLAlchemy driver is part of a broader effort to create drivers to represent each of the most common data store families, including NoSQL, SQL, and AMQP.


Why did you start with MongoDB?

Some NoSQL databases work better for implementing messaging systems than do others. For example, Redis and MongoDB are known to work well in this role, while Cassandra performs rather poorly.

The Zaqar team decided to start with MongoDB because:

  • MongoDB's flexible query system was able to support all of the operations required by the 1.0 API
  • It was able to manage a large number of short-lived records without hitting a wall
  • The system offered a well-rounded mixture of durability, performance, HA, and scalability
  • The core team was already very familiar with MongoDB and had experience running it in production
  • MongoDB's schemaless design allowed the team to iterate rapidly


With this in mind, it's important to mention that despite the fact MongoDB was the first production-ready storage driver implemented for Zaqar, it's not the team's intention to make it the one-and-only driver for all use cases. In fact, more drivers are already in the works. Stay tuned!

What messaging patterns does Zaqar support?

Zaqar's API provides a basic set of semantics that, when combined, afford a variety of messaging patterns, such as pub-sub, task distribution, and point-to-point. Messages can be consumed as feeds, queues, or a combination of the two. This can be a little confusing at first, since the API uses the term "queues" to represent a hybrid feeds-queues resource.

When interacting with the API, a client can choose to read a queue in a similar manner to an Atom feed, where any client can read any message, and is responsible for keeping track of its own marker (its position in the feed). This provides for messaging patterns such as pub-sub and point-to-point.

Alternatively, an application can implement task distribution by creating a pool of workers that simply claim messages off the front of the queue. Once a message is claimed, it becomes invisible to other workers in the pool to prevent messages from being processed more than once.

Finally, a client can use both feed and claim semantics simultaneously to create hybrid messaging patterns. For example, while workers are busy claiming messages from a task queue, an auditor can passively sample those same messages as they flow by.

See also: Zaqar/Use cases

If queues have no guarantee of ordering, how is the marker guaranteed to still deliver all messages to all targets?

The ordering of messages is actually stable, meaning that given a marker (or no marker), you will always get the same set of messages, in the same order, when listing them. When we say that FIFO is only guaranteed for a single producer, that is because we can’t guarantee which producer’s messages will arrive in our system first. However, as they arrive, they are ordered using a monotonic marker value. This is in contrast to, say, an Atom feed that uses timestamps to order entries, making it possible to get two entries with the same timestamp, which places a burden on the client to detect collisions and then throw out messages it has already received.

Nothing special needs to be done to verify message duplicity or parallelism in the code itself.

The only thing a client has to do is keep track of the last marker URI is received (i.e., the “next” href), and submit that in subsequent requests. This helps the server scale efficiently, since it can be stateless (i.e., the server doesn’t have to keep track of what messages every client has or has not already seen).

Will Zaqar work with AMQP?

  • During Juno we are experimenting with using AMQP as a backend. TBD.
  • Transport TBD
  • Talk to us about use cases

Will Zaqar work with Kafka?

  • During Juno we are experimenting with using Kafka as a backend.
  • Talk to us about use cases
  • We need contributors!

How does Zaqar compare to AWS (SQS/SNS)?

  • Targets similar workloads
  • Zaqar will provide a unified API to handle notifications and queuing
  • Zaqar is highly customizable
  • FIFO and once-and-only-once guaranteed (depending on storage backend)

How does Zaqar compare to oslo.messaging?

oslo.messsaging is an RPC library used throughout OpenStack to manage distributed commands by sending messages through different messaging layers. Oslo Messaging was originally developed as an abstraction over AMQP, but has since added support for ZeroMQ.

As opposed to Oslo Messaging, Zaqar is a messaging service for the over and under cloud. As a service, it is meant to be consumed by using libraries for different languages. Zaqar currently supports 1 protocol (HTTP) and sits on top of other existing technologies (MongoDB as of version 1.0).

What's next for Zaqar?

  • API v1.1
  • Additional backend drivers
  • Queue Flavors
  • Notifications
  • Message signing
  • Automated performance testing
  • Automated security testing
  • Additional Dev/Ops features
  • Expanded documentation


See also: Zaqar/Roadmap