Intro

With Realtime, developers can create engaging, interactive applications that bring users together in real-time. Whether you're building a collaborative document editing tool, a real-time multiplayer game, or any other type of collaborative application, Realtime has everything you need to get started. This overview page provides an introduction to what Realtime has to offer, as well as an explanation of the most important concepts.

Documents

When users connect to Realtime services, they connect to Documents, each of which represents a single JSON object that can store any type of data. Each document is identified by a unique ID that you define. If you connect using an ID that doesn't exist, Realtime will create it for you using your predefined initial data, which can be fetched from your servers or a specified default value. Realtime caches your documents to support offline functionality, but you have complete control over your documents through Realtime's API endpoints. This allows you to store all of your documents yourself and inform Realtime services how to retrieve initial data when connecting to them. You can also delete documents entirely from Realtime services. With this level of flexibility and control, you can manage your data in a way that best suits your application's needs.

Data

With Realtime, you don't need to worry about syncing, merging, or updating data - it's all taken care of for you. Simply specify where you want to query data and where you want to make changes, and Realtime handles the rest.
Realtime's method for syncing data is based on the principles of CRDTs, which ensures that real-time data is synced correctly across multiple sources from around the world. However, this can be a complex and time-consuming process. Fortunately, with Realtime, you can avoid these challenges and streamline your data synchronization process.

Presence

Presence enables you to display the users connected to your applications in real-time, and share any relevant data related to them. This includes a wide range of information such as mouse cursors, user names, profile pictures, selected input fields, zoom level, and selected text in a text editor. What's even better is that developers have complete control over which data is shared, making it a highly customizable and flexible solution that can be tailored to meet the specific needs of your application.

Broadcasting

Realtime's broadcasting feature enables developers to send and receive events in realtime, allowing for collaborative and interactive applications. By broadcasting events to all connected users or targeted subsets, developers can implement event listeners to handle these events as needed.
The flexibility of this feature allows developers to create a variety of applications such as real-time chat, multiplayer games, live document editing, and collaborative whiteboarding. It can also be used for real-time monitoring and tracking applications, as well as for notifications and alerts.
With Realtime's broadcasting capability, developers can create applications that are more engaging, responsive, and interactive. Whether it's for a collaborative work environment or a real-time gaming experience, broadcasting adds a new dimension of interactivity to applications.

Subscriptions

Realtime's subscription feature enables developers to effortlessly listen to specific data changes in real-time. By subscribing, developers can stay up-to-date on the latest updates made to documents, as well as monitor presence data.
Subscribing to changes allows developers to easily view the before and after states of the data, providing an insightful way to keep track of updates. Furthermore, the subscribe function enables UI components to bind to a state-portion without necessitating a re-render on changes

Authentication

Realtime offers two authentication options for users. The first method involves using a Public Auth Key, which is a quick and easy setup option. Alternatively, users can choose to implement their own authentication endpoint with a Secret Key. With this method, developers have complete control over the permissions granted to each user, including read and write permissions for documents and presence. By offering these authentication options, Realtime allows developers to customize their authentication process and ensure that users have appropriate access to collaborate in real-time.

Webhooks

Realtime's webhooks allow you to receive notifications about specific events that occur in your Realtime application. You can subscribe to webhook events through the Realtime web app. The events that you can subscribe to include user.connected and document.updated.
Realtime's webhooks allow you to monitor specific events in your application in real-time, enabling you to take timely actions based on the received information. For example, when you receive a document.updated event, you can fetch the updated document from Realtime's API endpoints and update your application's state accordingly. This allows you to keep your application's data in sync with Realtime's documents.

Realtime API

Realtime's Realtime API provides developers with the ability to retrieve the latest versions of documents and delete them entirely from the Realtime system. This feature is especially beneficial for programmers who wish to retain full control of their documents.

Powered by Notaku