This repository contains a demo of Ambar, a data streaming service for mission-critical applications that takes only 15 minutes to set up. Fork the repository, deploy it, and within 15 minutes you will see what you can build using Ambar.
Requirements
- A GitHub Account
- A Web Browser
- A Secret String (email demo@ambar.cloud if you don't have one)
- A Code Editor (optional)
Not Required
- Infrastructure (Ambar provides it)
Table of Contents
- Introduction
- What Will You Do In This Demo?
- Deploy A Credit Card Application
- Visit the Front-End
- Deploy A Shipping Application
- Conclusion
Data streaming is critical for businesses operating in real time, but correct data streaming is extremely difficult to implement and maintain. Ambar changes that, as a fully managed data streaming service built for correctness, performance, and convenience. With just a few lines of Terraform, Ambar allows anyone to have world-class data streaming capabilities in minutes.
How does Ambar work?
With Ambar, your code doesn't interact with messaging infrastructure (e.g., produce to / consume from Kafka, RabbitMQ, SQS, etc). Instead, Ambar pulls records from databases and pushes records to HTTP endpoints.
To use Ambar, you provide three things:
- Data Sources: durable storage containing record streams, i.e., a database table.
- Filters: logical specifications that select subsets of records from data sources.
- Data Destinations: HTTP endpoints in your application that will process your record streams.
In other words, you produce to your database, and consume by exposing an HTTP endpoint.
In this demo, you will see how little effort it takes to deploy data streaming applications that are both correct and performant. Your first goal will be to deploy the demo's credit card application. Your second and final goal will be to deploy the demo's shipping application.
To accomplish your goals, you will:
- Deploy the credit card application by forking this repository (Section 3).
- Visit your front-end to see credit card events being echoed in real time (Section 4).
- Deploy the shipping application with a little bit of Python and Terraform (Section 5).
To deploy your credit card application:
- Fork this repository in GitHub, by clicking
Fork
in the top right corner. Navigate to your new repository, and continue reading these instructions there. - Add the secret
GH_ACTION_SECRET
to your repository's secrets with the secret string provided by Ambar's team. You can add the secret by clickingSettings
in your repository's homepage (top of page). Next, underSecrets and Variables
clickActions
. Add the secret as aRepository Secret
calledGH_ACTION_SECRET
. - Click
Actions
in your repository's menu (top of the page). If GitHub Actions are enabled for your account, you should be able to see an empty list ofworkflows
). If GitHub Actions are not enabled, please follow the prompts in thisActions
page to enable GitHub Actions. - Add a new empty line to the bottom of this
README.md
, and commit the change into your repository'smain
branch. - Return to
Actions
in your repository's menu (top of page). A GitHub Actionworkflow
will have just triggered which deploys your credit card application! Click the latestworkflow
. You should see a page with twojobs
,Backend and Frontend
andAmbar
. - Wait for the
workflow
Status to change toSuccess
. IMPORTANT: If the Status remainsQueued
instead ofIn Progress
for longer than 3 minutes, you've run into a GitHub bug for new repositories. Cancel theworkflow
in the top-right corner menu, and once canceled clickRe-run all jobs
(also in the top-right corner menu).
Congratulations! You deployed a credit card application with streaming powered by Ambar. To see your front-end:
- While in the
workflow
page (the same one as in Section 3, Step 6), open theBackend and Frontend
job. - Open the step
Print Front-End Domain
. - Visit the site under
Print Front-End Domain
, where you will find your credit card application and an undeployed shipping application.
Next, you'll deploy a shipping application by asking Ambar to stream shipping events from a data source
(PostgreSQL database)
to a data destination
(Python http endpoint).
- Uncomment the Ambar resource definitions (delete all
/*
and*/
) in the fileterraform/ambar_shipping.tf
. - Uncomment the http endpoint definitions (delete all triple single quotes,
'''
) in the filebackend/server/shipping.py
. - Commit your changes into the
main
branch of your repository. - Click
Actions
in your repository's menu (top of the page), and wait for the latestworkflow
to complete. If the status remainsQueued
instead ofIn Progress
, for longer than 3 minutes, repeat the steps in Section 3, Step 6 to restart theworkflow
. - Refresh the front-end domain in your browser, and visit the shipping application in the sidebar.
Congratulations! You deployed a shipping application with streaming powered by Ambar.
You've seen first hand how Ambar is able to radically simplify the development and deployment of data
streaming applications. You deployed two data streaming applications by using Ambar to connect data sources
(PostgreSQL databases) to data destinations
(http endpoints written in Python).
In just minutes, you deployed applications that processed streams of events in real time, with zero errors. All of this without a single line of code that wasn't business logic. To learn more about Ambar, visit ambar.cloud.