Home / Companies / Ably / Blog / March 2022

March 2022 Summaries

10 posts from Ably

Filter
Month: Year:
Post Summaries Back to Blog
Web Real-Time Communication (WebRTC) is an industry effort to enhance web browsing by allowing direct peer-to-peer exchange of real-time media through secure access to input peripherals like webcams and microphones. Unlike traditional client-server architecture, WebRTC enables data exchange among N peers without a server in the middle. It comes built-in with HTML 5 and can be accessed through the WebRTC API. WebRTC has broad applicability, including peer-to-peer video, audio, and screen sharing; file exchange; IoT applications like drone streaming and surveillance systems; entertainment and audience engagement; and real-time language processing. Key features of WebRTC include MediaStream for accessing streams from local input devices, RTCPeerConnection for connecting to peers, and RTCDataChannel for exchanging generic data in a bidirectional, peer-to-peer fashion. WebRTC is often compared to WebSockets, which enables bidirectional communication between web clients and servers over a persistent single-socket connection. While WebSocket works on top of TCP, WebRTC primarily uses UDP for faster performance but with less reliability. Both technologies can complement each other in real-time applications. Major organizations like Google Meets, Zoom, Skype, Facebook (Chat, Messenger, Live), Gatheround, Discord, Bevy, and Snapchat use WebRTC. Ably provides robust and easy-to-use APIs for powering live and collaborative experiences using WebRTC.
Mar 31, 2022 1,506 words in the original blog post.
Autoscaling is a feature in cloud computing that automatically adjusts the number of virtual machines (VMs) based on demand, allowing users to save costs by not paying for unused capacity. However, autoscaling has its limitations and may not always result in significant cost savings. It can be useful for managing daily fluctuations in load but may struggle with unexpected surges or long-term growth trends. Additionally, predictive autoscaling is an emerging field that aims to anticipate future demand based on historical data or external factors. While the engineering effort required for autoscaling can be substantial, it offers operational benefits and flexibility for managing unpredictable customer usage patterns.
Mar 30, 2022 2,786 words in the original blog post.
This blog post discusses the importance of asynchronous architecture and how Kotlin coroutines can be combined with Ably, a messaging infrastructure provider, to develop a multiplayer game room SDK. The author explains that asynchronous programming is essential for various tasks such as running expensive computations in the background, reading from a disk without blocking the user interface, or retrieving data from a network resource. They also highlight how Ably's publish/subscribe pattern can be used to deliver data at low latency and how coroutines simplify internal messaging workflows. The post provides examples of transforming callback-based functions into suspending functions and translating Ably models to domain models, demonstrating the compatibility between Ably and Kotlin coroutines in building realtime applications.
Mar 25, 2022 1,799 words in the original blog post.
In this tutorial, we discussed the Publish/Subscribe (pub/sub) pattern and how it can be applied in a .NET 6 console app to create a chat application. We covered what pub/sub is, when to use it, its benefits for .NET applications, and how to use Ably's .NET SDK to implement the pattern. The tutorial provided step-by-step instructions on creating a chat program in a .NET 6 console application using Ably's protocol for pub/sub. It also explained additional features offered by Ably, such as history, presence, and push notifications, which can be used to provide richer functionality to applications. By the end of this tutorial, readers should have a good understanding of the pub/sub pattern and how it can be applied in their .NET applications using Ably's SDK.
Mar 24, 2022 3,375 words in the original blog post.
This article discusses the importance of API key security and provides a step-by-step guide on how to set up token authentication using Ably's platform and Netlify's serverless functions. It explains the risks associated with exposing API keys, such as unauthorized access and abuse of monthly quotas. The article then demonstrates how to use token authentication to protect an app from these threats by hiding the API key and implementing a validation process for user accounts. The guide covers topics like generating Ably JWT tokens, using Netlify Identity services for user registration and moderation, setting up environment variables, and testing the implementation. It also provides information on Ably's platform capabilities, such as pub/sub messaging, presence tracking, automatic reconnection, and message ordering. In conclusion, the article emphasizes the importance of securing API keys and recommends using token authentication to protect realtime apps from potential security breaches.
Mar 17, 2022 2,812 words in the original blog post.
In this article, the author discusses health checks in .NET applications and introduces an open source Ably.Healthcheck library that provides various health check options for services like SQL Databases, MongoDB, ElasticSearch, and more. The three available health checks are PingHealthCheck, ChannelHealthCheck, and TimerHealthCheck, each with different levels of thoroughness in checking the service's health. The author also demonstrates how to configure these health checks in a .NET WebApp using the Ably.Healthcheck library and provides useful resources for further reading on developing dependable realtime apps with .NET.
Mar 15, 2022 1,113 words in the original blog post.
The author started working for Ably in 2022 and was tasked with building a demo project using one of the Ably SDKs, specifically ably-go. They wanted to explore, debug, and test an SDK in a visual way similar to how Postman API Client interacts with APIs. The author decided to build a graphical user interface that could explore, test, and debug the ably-go SDK using a game engine called Ebiten. Ebiten is a 2D game engine written in Go, which provides low-level access to audio, keyboard, mouse, and graphics. The author chose Ebiten because it can handle most of the heavy lifting for them, such as drawing images to the screen using native OpenGL functions. They also appreciated that Ebiten has been around for several years, is actively developed, updated, and maintained, and has over 6k stars on GitHub. The author then explained how they got started working with Ebiten and provided example code for each stage of development. They covered topics such as getting started with a new Ebiten project, drawing a .png image on the screen, state, screens, and transitions, and drawing text on the screen. Using some of the functionality of Ebiten described above, the author built their own tool called Ableye, which is essentially a visualization and graphical interface that sits directly on top of the ably-go SDK. Ableye supports up to four Ably clients in a single window and allows users to subscribe to channels, publish messages, and interact with presence features. The author shared some footage of Ableye in action and discussed the process of building it, including lessons learned along the way. They also mentioned that using Ebiten to build an interface does require careful planning but can be highly rewarding. The author hopes that others will find this tutorial helpful for learning how to build realtime tools with graphical interfaces using Go and Ebiten.
Mar 10, 2022 2,946 words in the original blog post.
Today marks International Women's Day, a celebration of women's achievements and a call for accelerating gender equality. The theme this year is "Break the Bias," urging people to challenge bias, stereotypes, and misconceptions in order to create a more inclusive world. In honor of IWD 2022, Ably has shared its progress towards creating a diverse, equitable, and inclusive workplace for women. The company has formed an Employee Resource Group for women, improved employee policies, expanded health benefits, and increased the percentage of female employees to just below 30%. Additionally, Ably's leadership team is working with FairHQ on Diversity, Inclusion, and Belonging initiatives and aims to achieve a gender-balanced recruitment pipeline. The company is celebrating IWD by offering resources for women at Ably and participating in events hosted by Fora.
Mar 08, 2022 713 words in the original blog post.
Ably is deeply concerned about the Russian invasion of Ukraine and stands with those affected by the violence. The company has contributed to British Red Cross and is matching employee charitable contributions. They are also reviewing their services provided to Russia-based entities, suspending service except for humanitarian operations, and halting trading relationships with Russian suppliers. Ably encourages others to take action against Russia's actions while supporting Ukraine.
Mar 03, 2022 351 words in the original blog post.
Distributed computing systems often require a single client among peers in a network to coordinate the behavior of all other clients. This pattern is prevalent in video games and file processing systems, where one peer acts as the coordinating node or leader. However, if the coordinating client dies without recovery, the entire system may fall into a "zombie" state. To address this issue, leader election design patterns can be implemented to ensure that another node takes over operations when the current leader leaves. Various methods for implementing leader election include racing to acquire a distributed lock on a shared resource or ranking clients by client IDs. In browser-based peer networks, client ranking is more suitable due to single-threaded architecture and lack of access to shared storage locations. The Ably SDK can be used to implement client ranking in such environments.
Mar 03, 2022 2,244 words in the original blog post.