The steps below describe what is needed to install Zato ESB and app server under OS X.

osx$ mkdir ~/zato && cd ~/zato
osx$ curl -O
osx$ vagrant up
[snip output]
  • ssh into the newly provisioned virtual machine - Zato is installed in /opt/zato, default username/password zato/zato
osx$ vagrant ssh

And that's it - Zato is installed in the VM so you can head over to the main documentation site.






Kudos to Ernesto Revilla Derksen for his assistance in preparing the installation guide.

Recent works on Zato's command line interface resulted in several improvements that are available on GitHub, slated for delivery in the next release.

  • zdaemon has been replaced with sarge - this resulted in a signifact speedup and servers now start much faster.

  • Improved configuration checks provide immediate feedback when a component is found to have been misconfigured - TCP ports are checked to be free, Postgres/Oracle and Redis are pinged and the existence of pidfiles prevents components from attempting to run.

  • All the components start commands work with grew a new --fg flag indicating that a given component - servers, Django-based web admin or load-balancers, shoud start in foreground instead of going into background daemon mode. Components started in such a way can be stopped with Ctrl-C.


Thanks to the work sponsored by Forbrugerrådet Tænk, Zato ESB and app server has grown additional means through which it is now even easier to invoke SOAP services.

Given an existing WSDL, all that is needed is filling out a couple of forms and a pool of SOAP clients is automatically generated and available in a cluster.

Built on top of Suds, the feature is available in git master and here's a preview showing how to consume SOAP services without any need for direct XML manipulations in order to build a RESTful service validating credit card numbers with JSON output.

First, let's upload the service that will connect to SOAP and produce JSON on output.

Note that the service doesn't really know what type of output it produces - this is configured from the GUI and no code changes are needed for the service to produce XML instead of JSON.

# -*- coding: utf-8 -*-

# Zato
from zato.server.service import Service

class ValidateCreditCard(Service):

    class SimpleIO:
        input_required = ('number',)
        output_required = ('card_type', 'is_valid')

    def handle(self):
        conn = self.outgoing.soap['Credit Card Validator'].conn

        with conn.client() as client:

            # Invoke a SOAP service dynamically with no need for stub classes
            result = client.service.CheckCC(self.request.input.number)

            # Results are turned into Python objects automatically
            self.response.payload.card_type = result.CardType
            self.response.payload.is_valid = result.CardValid

While not strictly required, let's say we need to secure our REST service with Basic Auth:


Now a channel is created through which requests will flow in. Note that the URL path is a pattern - all named attributes, such as number here, are available as input to services.

And although it's not used in this example, both JSON or XML can be mixed on input with URL parameters with full control of what has priority over other parts.


Next an outgoing SOAP connection is needed. Note that its serialization type is Suds - this is the new feature. The WSDL points to a free SOAP service online courtesy of CDYNE.

In the example below, each server will be given a pool of 20 SOAP clients, each generated dynamically on fly from the WSDL provided on input.

If you're coming from Java or C# background you'll note that no stubs nor client classes need to be generated. This is all taken care of behind the scenes so one can focus on invoking SOAP services straightaway.


With all that in place, the Zato service can now be invoked. curl is used from command line in the examples below:

$ curl -u user:password localhost:17010/validate-cc/4111111111111111 {"response": {"card_type": "VISA", "is_valid": true}}
$ curl -u user:password localhost:17010/validate-cc/123456789 {"response": {"card_type": "NONE", "is_valid": false}}

What if the WSDL changes with time? You only need to click 'Reload WSDL' and a new pool of SOAP clients will be created using the newest contents.


The feature will be released in the upcoming 2.0 release and until then - please use git master version.

While Zato can support AMQP, WebSphere MQ, ZeroMQ or FTP as well, the majority of environments will use the ubiquituous HTTP protocol only and this post describes the traffic patterns within a typical HTTP-only cluster consisting of a load-balancer, web admin, Redis, SQL ODB and two servers, right after it's been installed without any user-specific customizations.

Please refer to the Zato's architecture overview for a refresher on what role each of the components fulfills.

A diagram

  • In order to ensure high-availability (HA), incoming HTTP traffic is always routed through a load-balancer that distributes the load in a fair manner across the servers so that outside client applications don't access the servers directly and are never concerned if any of the servers is unavailable.

  • Servers always invoke external HTTP resources directly, from the systems they are installed on.

  • Servers never communicate directly with each other. If any server needs to send a message to another one, it's always done in an indirect manner using publish/subscribe with Redis.

  • Redis is also used by servers to store volatile or highly dynamic data, such as usage statistics, frequently accessed runtime configuration or user caches.

  • SQL ODB (Operational Database), which as of Zato 1.1 needs to be either PostgreSQL or Oracle, stores information that benefits from being kept in a relational database, usually data that needs to be always saved on disk as promptly as possible and shouldn't be stored in RAM first, as with Redis.

  • Web admin is a GUI used to manage Zato environments. Being based on Django, it connects to SQL ODB in order to store a few parts of its configuration but the vast majority of its functionality is merely a frontend that connects to servers, through the load-balanacer, to invoke the public API servers expose.

    In other words, this is a frontend only. Users are encouraged to use the API to create their own alternative frontend apps.

  • Arrowheads in the diagram represent the exact directions the traffic will follow - for instance, servers don't send messages to the load-balancer nor the latter will invoke Redis thus the arrows don't point in these directions.

Linux Journal has just published a free version of the Zato article originally written for the November 2013 issue.

The article presents the project, introduces the IRA philosophy of designing services that are:

  • Interesting
  • Reusable
  • Atomic and goes through the process of developing a sample integration using financial APIs of

Please check it out here.

A diagram Cover Article