Each Ably app can have any number of channels where each channel carries a group of information. In terms of flexibility, Airtable and Ably are a perfect match as you can use both these platforms in exactly the way that suits your custom use-case.Ībly's Pub/Sub messaging is implemented using the concept of ' channels'. Publishing realtime messages into third-party services using Ably Integrations We'll make use of Ably's JavaScript Realtime SDK to power the chat app and the WebHook Integration feature to integrate Airtable directly with an Ably app. You don't have to spend time understanding the hard distributed systems problems it solves but simply start publishing and subscribing to realtime data with a mere couple of lines of code. It is protocol and platform agnostic in the sense that you can use it with WebSockets, MQTT or SSE, and with any language and platform that you are working with. It primarily operates over WebSockets and provides Pub/Sub messaging infrastructure out of the box. Ably provides a reliable realtime messaging infrastructure with high scalability. If you already use Ably, you can skip this section, if not, you can get started by creating an account. Evaluating realtime databases? Take a look at Realtime and databases - a discussion on coupling versus modularity Realtime updates with Ably and WebHooks The data is pre-ordered in ascending order by the ID column, which is an incremental number assigned to every new record automatically by Airtable. Here's a subset of the database so you have an idea of the schema, or to simply put it, the column names in our database table/spreadsheet: Using Airtable as a database: example of lists recordsĮach new message will have a unique (randomly created) msgId. We'll then make use of 'List records' to retrieve previously stored messages upon user request. We'll make use of WebHooks to send 'Create records' REST requests to the Airtable API each time a new chat message is published. In this example, we'll look at two operations - to store and retrieve data from Airtable. Airtable REST API How to use Airtable as a database Here's a look at the documentation for the chat app base. ![]() The JS code snippets require using the Airtable JavaScript Client SDK. They provide this documentation in cURL and JavaScript. ![]() This is for a good reason - their whole documentation is dynamically displayed with real keys, ids, column names etc, along with sample responses, based off your data, making it super easy for you to just copy out the code and use as is. a table/ sheet set up before you can check out the documentation. Example table in Airtable Airtable REST APIĪirtable comes with a simple REST API to perform the basic CRUD operations on the data stored. It combines a bunch of different tools like task managers, databases, CRMs, spreadsheets, etc, into a single product. ![]() It caters to the engineering and commercial departments in an organization alike with its robust REST API and very nice visual UI with custom fields to manage and represent the data. We'll use Ably's realtime infrastructure to power the chat app and make use of WebHooks to publish messages to Airtable directly in the correct order from Ably.Ĭheck the full source code of the group chat app written in VueJS on GitHub and the live demo of the application at What is Airtable?Īirtable describes itself as 'Part spreadsheet, part database, and entirely flexible' and that's exactly what it is to the word. In this article, we'll see how to use Airtable to store realtime messages using a group chat app as an example.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |