In this tutorial Im going to show you how to quickly and easily build a distributed database backend that spans across North America (Los Angeles & Ashburn VA), Europe (Frankfurt) and Asia (Mumbai, India).
We're going to build simple python application on Macrometa's serverless geo-distributed database cloud (https://www.macrometa.co) to create a data serving backend that will span across multiple worldwide data centers.
This is so that when end users run your app, it doesn't need to fetch data from a database that is thousands of miles and hundreds of milliseconds away but instead gets its data from the closest running database in a region closest to it.
So if you're wondering what Macrometa is? Macrometa is a geo-distributed database cloud service and available for free for developers to build apps on. Macrometa provides the following capabilities:
A Serverless real time noSQL geo-distributed database that serves data as Key/Value pairs, JSON Documents, Streams, Graphs and time series. The geo-distributed bit is important here because that what makes Macrometa special - it can very efficiently, quickly and accurately replicate and synchronize your data across 100s of worldwide locations while hiding the complexities in providing correct concurrent behavior.
A fully integrated Stream engine to let you query and manipulate data in motion without needing to wait for it to be ingested into the database (I will do a separate tutorial on this in a few days)
A serverless compute runtime that provides a Web Assembly in V8 engine for you to run your code with hyper-locality to your data (this will be coming out in the second half of 2019 and is not in the currently available product)
learn more at https://www.macrometa.co
So with that background - let's dive right in.
There are 2 ways to do this tutorial:
- For those who want to code - the repl.it below is for you. You can see how to build a simple application to call Macrometa's APIs in Python to do interesting things.
- For those of you who prefer a web console or GUI - go to https://www.macrometa.co/quickstart
Building an application consists of 3 basic steps:
- Create a geo fabric or use the global fabric
- Create a collection for your data (a collection is like a table in SQL)
- Send queries to CReate, Update, Delete (CRUD) documents (rows) in your collection