Zilla is an event-driven API gateway that transforms Kafka event-streams into REST and SSE (Server-Sent Events) APIs. It’s a seamless, secure, and scalable way of interfacing mobile apps, browsers, partner systems and REST microservices to Kafka.
The key to Zilla is its declarative JSON-based configuration (no coding required!). Inside a zilla.json file, you describe your Kafka broker and define mappings between desired API endpoints and appropriate Kafka topics. While a JSON-based configuration is flexible and aligns well with CI/CD deployment pipelines, a GUI often makes it easier to get started.
We’re excited to announce the availability of Zilla Studio, a web-based tool that guides you through defining event-driven APIs, and generates a zilla.json configuration file for you.
Zilla Studio doesn’t just map input and dropdown fields to JSON key-value pairs, it simplifies configuring Zilla through:
Let’s take a closer look at each of these.
Zilla Studio introduces the concept of a “Kafka Service”, which supports a higher-level representation of the Zilla configuration.
Traditional API gateways sit in front of REST services. These services are characterized by a collection of HTTP endpoints associated with a business domain. Event-driven services though aren’t RESTful, and so they aren’t described by HTTP endpoints, but rather by the event streams that they send and receive. Therefore, each event-driven service is defined by a grouping of associated event streams (or “topics” in the case of Kafka).
Inside Zilla Studio a Kafka Service is defined by a name, an associated Kafka Cluster and supported Operations, which determine how a service publishes and subscribes to particular Kafka topics.
There are four types of Operations:
As a side note, if you’ve been working with streaming and messaging systems then you’re probably familiar with the AsyncAPI initiative, which aims to standardize the definitions of event-driven services, including Kafka-based ones. We’re awaiting the lock down of the 3.0.0 specification to lean on it for service definitions inside Zilla and will be adding an integration once it’s available.
Although the raw Zilla configuration defines mappings between Kafka topics and API endpoints, it doesn’t contain the actual notion of an “API”. Instead it presents lower level concepts such as servers, proxies, routes, and of course Kafka topics.
The Zilla Studio defines “APIs” by a name, an HTTP Server (domain) and REST/SSE endpoints. REST endpoints are described by a method (GET, POST, PUT, DELETE), path, and an underlying Kafka service operation that the endpoint is interfacing. SSE endpoints are similar, except there’s no need to specify a method since there’s only one possible interaction pattern, which is a server to client “push”.
To secure APIs, inside the Studio you can set up a JWT “Guard” where details about your token issuer, audience and permissions can be added and then referenced by individual REST and SSE endpoints.
One of the easiest ways to get acquainted with Zilla Studio is through “Templated Configurations.” In the Studio, you can select predefined configuration templates that fill out Kafka Service and API definitions for showcase Zilla use cases.
Currently, there are two available templates. These templates support the Zilla’s Get Started Guide, which walks you through creating a CQRS-based Todo application with Kafka, Zilla and Vue.js. The first template generates the configuration for the non-secured version of the Todo app, while the second one adds JWT authentication for secure access.
We’re working on additional templates and are open to ones from the community, so if you have a cool Zilla use case that you want to share with others get in-touch!
To further simplify the Zilla experience we’ve launched Zilla Studio, a GUI that helps define event-driven APIs and generate a Zilla configuration. It presents a higher-level abstraction of the Zilla configuration with concepts such as Kafka services and APIs, and removes the need to write and match JSON curly brackets. The best way to try Zilla Studio is to check out the Zilla docs and follow the Get Started guide, which has been updated with Studio references.