November 2023 Summaries
14 posts from Ably
Filter
Month:
Year:
Post Summaries
Back to Blog
Authenticating WebSocket connections from the browser is a complex task due to limitations in setting headers with tokens. Several methods can be used for securely sending credentials from the browser to a WebSocket server, including passing access tokens via query parameters, using ephemeral tokens, sending tokens over WebSocket, using HTTP cookies, and utilizing the Sec-WebSocket-Protocol header. Each method has its advantages and disadvantages that must be considered based on project requirements. Alternatively, libraries like Ably can handle authentication securely, allowing developers to focus on other features.
Nov 30, 2023
2,223 words in the original blog post.
NodeJS is a JavaScript-based backend framework for web applications that enables fast, scalable, and efficient development with high concurrency and data streams. Choosing the right database for NodeJS applications can be challenging as it depends on factors such as data type, size, complexity, performance, scalability, reliability, compatibility, interoperability, environment, and developer preference. SQL databases store data in tables with schemas and relationships, while NoSQL databases store data in various formats such as documents, key-value pairs, graphs, or columns. Realtime databases provide realtime synchronization and updates between the server and clients. Some of the best NodeJS databases include PostgreSQL, MySQL, SQLite, MongoDB, Firebase Realtime Database (RTDB), and CouchDB. These databases offer different features and capabilities that can suit various use cases and requirements for web applications.
Nov 29, 2023
3,551 words in the original blog post.
The Ably Realtime Hackathon saw participants create realtime dashboards, collaborative experiences, and projects using React and other React ecosystem tools. Notable submissions include Ionic, a virtual lab environment for conducting chemistry experiments and exploring physics phenomena; Mood Tracker and Support Chat, an app that tracks patients' moods and provides health tips; and Cheat Inspector, which monitors online hackathons to ensure fairness. These projects demonstrate the potential of Ably in various sectors such as education, mental health support, and anti-cheating measures.
Nov 28, 2023
494 words in the original blog post.
The text details a guide on integrating a chat feature into a simple web-based multiplayer tic-tac-toe game using Ably, a real-time data service. The process involves utilizing Ably's SDK to handle real-time messaging and React for the frontend component development. The chat feature allows players to exchange messages during the game, with additional functionalities such as typing indicators, presence detection, and emoji reactions to be covered in future posts. The game state is managed using Vercel's KV database, and the guide provides instructions for setting up the development environment and implementing the chat component, emphasizing reusability and modular design. The chat component leverages Ably's channels for message transmission and React hooks for state management, ensuring that chat messages are captured and displayed in real-time. The guide also touches on enhancements like channel history to retain chat messages after a page reload and presents potential improvements for user experience and system efficiency.
Nov 23, 2023
3,321 words in the original blog post.
The text discusses the use of Conflict-free Replicated Data Types (CRDTs) for collaborative experiences. It argues that while CRDTs are useful for offline first applications and text editing collaboration, they may not be necessary in all cases. Instead, developers can create real-time collaborative environments by incorporating features such as contextual information, locking mechanisms, small-scale updates, and real-time fan-out of updates. Examples of successful non-CRDT collaborative applications include form builders, task management tools, spreadsheets, and drawing or presentation platforms. The design patterns for building these experiences are consistent across various types of applications.
Nov 21, 2023
1,339 words in the original blog post.
In this blog post, the author demonstrates how to use Clerk, a user management and authentication tool, to protect routes in a Next.js application that users will access and API endpoints required by Ably client-side SDKs. The process involves setting up an Ably account, installing necessary dependencies, configuring environment variables, adding basic authentication using Clerk components, and protecting API endpoints with middleware. The author also explains how to use the username attribute from Clerk for user profile data management in generating Ably Token Requests.
Nov 17, 2023
1,668 words in the original blog post.
This article discusses how to serve real-time data from Kafka, hosted behind a firewall, to end users' devices globally using Ably and Confluent Cloud. It provides step-by-step instructions on configuring the Ably Kafka Connector as a Confluent Cloud Custom Connector. The integration of these two technologies allows for low latency, fault-tolerant data streaming, processing, and governance at the edge.
Nov 15, 2023
1,609 words in the original blog post.
This blog post demonstrates how to create an Avatar Stack using React, Flowbite, and Ably. The tutorial covers setting up a React app with Tailwind CSS, installing Flowbite and Ably, creating an authentication endpoint for generating tokens, and finally building the core App and Avatar Stack components. The resulting application allows users to see who else is in the space with them, represented by their initials or profile images, and displays a color-coded indicator of their activity status.
Nov 14, 2023
1,563 words in the original blog post.
The Ably Realtime Experiences Hackathon announced its winning projects, with over 700 participants and 50 submissions. Participants were challenged to build realtime dashboards or collaboration experiences using Ably APIs, with a bonus category for projects built with React ecosystem tools. Winners in the Collaboration Experiences category included Mading Live, Mosiac, and Real Time Log Monitor. The React bonus category winners utilized Ably's React SDK and other React ecosystem tools.
Nov 13, 2023
534 words in the original blog post.
The text discusses various methods for implementing live updates in React applications, including polling and pushing techniques such as short polling with fetch, long polling with fetch, Server-Sent Events (SSE), WebSockets, a realtime platform like Ably, and the experimental WebTransport. Each method has its advantages and disadvantages, with some being more efficient but resource-intensive, while others are simpler to implement but less effective in terms of latency and network efficiency. The text also highlights that none of these methods are specific to React, as they all rely on JavaScript browser APIs like fetch, WebSockets, and EventSource (SSE).
Nov 09, 2023
2,269 words in the original blog post.
NodeJS is a popular JavaScript runtime environment for developing server-side web applications due to its asynchronous and event-driven nature. With over 50,000 open source packages available through npm, it facilitates seamless backend extension. Some of the top NodeJS frameworks include Express, Fastify, NestJS, Socket.IO, Feathers.js, Meteor.js, and Sails. These frameworks offer a basic structure for applications with routes, middleware, and templates that streamline the development process. Realtime frameworks in NodeJS simplify the development of realtime features such as chat, notifications, data streaming, and more. The choice of a NodeJS framework depends on project requirements, community support, and potential limitations.
Nov 09, 2023
2,015 words in the original blog post.
Ably Spaces SDK now supports React Hooks, allowing developers to integrate collaborative features into their React-based applications efficiently and idiomatically. The Spaces SDK enables setting up a collaborative environment on any part of an application or the entire application, providing contextual awareness for collaborators. With custom React Hooks and new starter kits, it's easier than ever to make apps collaborative without changing existing system designs or app architectures. Key features include full suite Spaces features as hooks, handling realtime operations in applications, state management, testing, maintenance, updates, and high performance at scale.
Nov 08, 2023
748 words in the original blog post.
SaaS APIs often require authentication, commonly using secret keys, which can pose security risks if exposed directly to client applications. To address this, many APIs, such as Ably, offer token-based authentication systems that provide short-lived tokens with customizable access controls. This blog post demonstrates how to securely authenticate an Ably client in a React application using Token Requests generated server-side with the Ably SDK, avoiding direct exposure of secret keys. The tutorial guides setting up a Vite project, using the vite-plugin-api to add API routes, and creating an endpoint that generates and returns a Token Request, which client applications can use to authenticate with Ably. This approach ensures that secret keys remain secure while allowing client applications to access authenticated services through short-lived tokens, enhancing both security and functionality.
Nov 06, 2023
1,086 words in the original blog post.
React component libraries are essential tools for efficient development as they provide a collection of pre-built UI components that can be reused across projects, saving developers time and effort. Some of the best React component libraries include Material UI, Ant Design, Chakra UI, Headless UI, React Bootstrap, Mantine, Next UI, Semantic UI React, and Grommet. These libraries offer numerous advantages such as implementing common UI patterns, ensuring consistency, enhancing quality, reducing development costs, increasing productivity, reducing risk, access to expertise, and community support. When choosing a library, consider factors like project needs, longevity, learning curve, customizability, documentation, performance, community, and accessibility features.
Nov 06, 2023
2,935 words in the original blog post.