ESB和其相关缩写SOA,是困惑之源。ESB是企业服务总线的缩写,而SOA的意思是面向服务架构。

但这样解析并没有太多的内在含义。 所以这里尽可能的提供一些更多的信息, 而不是仅仅从企业的角度的说法。

The no-nonsense intro to ESB and SOA has been just translated into Chinese - check it out for information on what ESB and SOA really are and how to design awesome microservices following the principles of IRA:

  • I nteresting
  • R eusable
  • A tomic

Also available in Català, Português and ру́сский.

Screenshot

Screenshot

Screenshot

Head over to the new chapter in the Zato documentation to find out how to integrate Django and Flask applications with Zato services.

The service it uses is a hypothetical yet fully functional one which looks up and caches user data by their IDs.

The integration effort is presented from the point of view of both libraries using self-contained ready-to-use projects living on GitHub.

Simply put - it contains everything you need to integrate Django or Flask with Zato :-)

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

from __future__ import absolute_import, division, print_function, unicode_literals

# stdlib
from random import choice

# Zato
from zato.server.service import Service

# A set of first and last names to generate customer names from
first = ('Richard', 'Victoria', 'Sebastian', 'James', 'Hannah')
last = ('Ogden', 'Piper', 'Edmunds', 'Murray', 'Young')

# Redis key we store our cache under
CACHE_KEY = 'example:customer:by-id'

class GetCustomer(Service):
    name = 'customer.get2'

    def get_customer(self, cust_id):

        # Assume in an actual service this would look up the data in a real DB
        return '{} {}'.format(choice(first), choice(last))

    def handle(self):

        self.log_input()

        # Customer ID received on input
        cust_id = self.request.payload['cust_id']

        # Do we have their name in cache?
        name = self.kvdb.conn.hget(CACHE_KEY, cust_id)

        # If not, we need to ask the backend and cache the response
        if not name:
            name = self.get_customer(cust_id)
            self.kvdb.conn.hset(CACHE_KEY, cust_id, name)

        # Produce the response for the calling application.
        self.response.payload = {'name': name}

Django screenshots below:

Screenshot

Screenshot

Screenshot

The new version of Zato - the open-source middleware platform and backend application server - has just been released.

https://zato.io/docs

Release 2.0 brings dozens of interesting features building on and greatly enriching already existing capabilities.

Major features include:

The changelog lists all the updates that are in addition to what Zato has had since the initial release: clustering, scheduling, hot-deployment, GUI, CLI, statistics, Plain HTTP, SOAP, AMQP, FTP(S), JMS WebSphere MQ, ZeroMQ and more.

Check out the no-nonsense introduction to ESB/SOA for an introduction to the philosophy behind the project and just have a look at the following sample screenshots depicting but a small part of the platform in action:

Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot

The upcoming release 2.0 of Zato - ESB and application server in Python for SOA, REST, APIs and cloud integrations - will feature means to connect to Redis High Availability (HA) environments with entinels.

While meant for Zato users mostly, the chapter on configuring a minimal Redis HA environment with sentinels can be interesting for a wider audience as well.

Screenshots

Have fun!

Summary: zato-apitest, a newly released tool lets everyone test their APIs in a human-friendly way, in plain English, with no programming needed. Plenty of features out of the box, built-in demo mode, screenshots and heaps of documentation await on GitHub.

Installation:

$ sudo pip install zato-apitest

Here's a screenshot of a demo executed with apitest demo running against a live test server:

Screenshots

What it can do:

  • Invoke HTTP APIs

  • Use JSON Pointers or XPath to set request's elements to strings, integers, floats, lists, random ones from a set of values, random strings, dates now/random/before/after/between.

  • Check that JSON and XML elements, exist, don't exist, that an element is an integer, float, list, empty, non-empty, that it belongs to a list or doesn't.

  • Set custom HTTP headers, user agent strings, method and SOAP action.

  • Check that HTTP headers are or are not of expected value, that a header exists or not, contains a value or not, is empty or not, starts with a value or not and ends with a value or not.

  • Read configuration from environment and config files.

  • Store values extracted out of previous steps for use in subsequent steps, i.e. get a list of objects, pick ID of the first one and use this ID in later steps.

  • Be integrated with JUnit

  • Be very easily extended in Python

Note that zato-apitest is meant to test APIs only. It's doesn't simulate a browser nor any sort of user interactions. It's meant purely for machine-machine API testing.

Originally part of Zato - open-source ESB, SOA, REST, APIs and cloud integrations in Python.

In addition to HTTP Zato itself supports AMQP, ZeroMQ, WebSphere MQ, including JMS, Redis, FTP, OpenERP, SMTP, IMAP, SQL, Amazon S3, OpenStack Swift and more so it's guaranteed zato-apitest will grow support for more protocols and transport layers with time.

More details on GitHub.

Now, is that cool or is that cool? :-)