From cd0f790d179dd43e407dfae564488b569dc0a85b Mon Sep 17 00:00:00 2001 From: Francis Roberts <111994975+franrob-projects@users.noreply.github.com> Date: Tue, 30 Sep 2025 09:35:52 +0200 Subject: [PATCH 1/7] Can you help ease the pain of migration from another Data Stream Network? --- src/pages/docs/protocols/index.mdx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/pages/docs/protocols/index.mdx b/src/pages/docs/protocols/index.mdx index 29f71dc848..dcea4c3d4f 100644 --- a/src/pages/docs/protocols/index.mdx +++ b/src/pages/docs/protocols/index.mdx @@ -9,6 +9,14 @@ Ably SDKs are the recommended method for connecting to Ably because they offer s Protocol adapters offer an alternative method for connecting to Ably. The advantage to protocol adapters is that they require fewer resources in terms of memory and network overhead such as in smaller footprint devices, or on a platform where an Ably SDK isn't available such as an Arduino-based IoT wearable. The potential drawback to consider when evaluating protocol adapters is that they do not support the full set of Ably features, for example the MQTT protocol adapter does not support presence, and the SSE protocol adapter does not support automatic token renewal. +## Migration support + +Ably helps customers migrate from other data streaming networks including PubNub and Pusher. Our protocol adapters facilitate risk-free migration by allowing you to use existing protocols and client libraries while transitioning to Ably client libraries over time. + +Protocol adapters ensure interoperability between different protocols. For example, you can publish sensor data from an MQTT device, subscribe to that data using a Pusher client library for dashboard display, support mobile apps using Ably SDKs, and process data using AMQP worker queues - all within the same system. + +Migration times typically range from a few hours (using protocol adapters) to a week, depending on your migration strategy and whether you choose to adopt Ably's native SDKs immediately or transition gradually. + A full list of Ably SDKs can be found on the [SDK page](/docs/sdks). ## Available Protocol Adapters From e910324a26960c74878305bfb5ff7a2e465c79fa Mon Sep 17 00:00:00 2001 From: Francis Roberts <111994975+franrob-projects@users.noreply.github.com> Date: Tue, 30 Sep 2025 09:41:01 +0200 Subject: [PATCH 2/7] How does Ably compare with PubNub? --- src/pages/docs/protocols/pubnub.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pages/docs/protocols/pubnub.mdx b/src/pages/docs/protocols/pubnub.mdx index 394778a7b7..c869ce7b8e 100644 --- a/src/pages/docs/protocols/pubnub.mdx +++ b/src/pages/docs/protocols/pubnub.mdx @@ -14,6 +14,8 @@ Many of the advantages associated with using Ably, such as the use of WebSockets You can use PuBNub and and an Ably SDK side-by-side as they are interoperable, with the exception of a few features. +For a detailed comparison of Ably and PubNub features, see [Ably vs PubNub](https://ably.com/compare/ably-vs-pubnub). + ## Supported features The following PubNub features are supported using the adapter: From 842b3711f7fb80ba5c573b6e1ab2b91944629736 Mon Sep 17 00:00:00 2001 From: Francis Roberts <111994975+franrob-projects@users.noreply.github.com> Date: Tue, 30 Sep 2025 09:44:37 +0200 Subject: [PATCH 3/7] Is it easy to migrate from PubNub to Ably? --- src/pages/docs/protocols/pubnub.mdx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/pages/docs/protocols/pubnub.mdx b/src/pages/docs/protocols/pubnub.mdx index c869ce7b8e..d7af313ce5 100644 --- a/src/pages/docs/protocols/pubnub.mdx +++ b/src/pages/docs/protocols/pubnub.mdx @@ -16,6 +16,18 @@ You can use PuBNub and and an Ably SDK side-by-side as they are interoperable, w For a detailed comparison of Ably and PubNub features, see [Ably vs PubNub](https://ably.com/compare/ably-vs-pubnub). +## Migration process + +A typical migration from PubNub to Ably follows these steps: + +1. Change the host name for all of your PubNub client library integrations to use Ably's endpoints. + +2. Migrate one app at a time over to Ably client libraries. At this stage, some of your apps will be using PubNub client libraries and others will be using Ably's client libraries. Since we translate the PubNub protocol, there's no interruption and interoperability between both protocols is maintained. + +3. Migrate all your apps and servers to use Ably client libraries and terminate your old contracts. + +If you're interested in migrating from PubNub using protocol adapters, [get in touch](https://ably.com/contact). + ## Supported features The following PubNub features are supported using the adapter: From 6d04ee5d8fe2fc692aac3cbc128bf521a8bd273e Mon Sep 17 00:00:00 2001 From: Francis Roberts <111994975+franrob-projects@users.noreply.github.com> Date: Tue, 30 Sep 2025 09:54:40 +0200 Subject: [PATCH 4/7] How does Ably compare with Pusher? --- src/pages/docs/protocols/pusher.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pages/docs/protocols/pusher.mdx b/src/pages/docs/protocols/pusher.mdx index 627fec05ea..f00ce48eff 100644 --- a/src/pages/docs/protocols/pusher.mdx +++ b/src/pages/docs/protocols/pusher.mdx @@ -11,6 +11,8 @@ Using an adapter introduces some latency and is slower than using an Ably SDK, h The Pusher Adapter provides some of the advantages of Ably, such as inter-regional message federation, however others, such as [continuity guarantees](https://ably.com/four-pillars-of-dependability), fallback host support, and [message history](/docs/storage-history/history) are only available when using an Ably SDK. If an [Ably SDK](/docs/sdks) is available in your chosen platform, it is recommended you use that, or plan to transition to it eventually. +For a detailed comparison of Ably and Pusher features, see [Ably vs Pusher](https://ably.com/compare/ably-vs-pusher). + ## Supported features The following Pusher features are supported using the adapter: From 82575e08b5193a74e29d653859de14cc55c46cc0 Mon Sep 17 00:00:00 2001 From: Francis Roberts <111994975+franrob-projects@users.noreply.github.com> Date: Tue, 30 Sep 2025 10:07:02 +0200 Subject: [PATCH 5/7] Is it easy to migrate from Pusher to Ably? --- src/pages/docs/protocols/pusher.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/docs/protocols/pusher.mdx b/src/pages/docs/protocols/pusher.mdx index f00ce48eff..fbffd16da1 100644 --- a/src/pages/docs/protocols/pusher.mdx +++ b/src/pages/docs/protocols/pusher.mdx @@ -5,7 +5,7 @@ languages: - javascript --- -Ably enables migration from Pusher to Ably using its Pusher Adapter. The protocol adapter handles all background translation and only requires an API key change. +Ably enables easy migration from Pusher to Ably using its Pusher Adapter. The protocol adapter handles all background translation and only requires an API key change, allowing you to use existing Pusher client libraries directly with Ably. Using an adapter introduces some latency and is slower than using an Ably SDK, however the impact is typically in the low milliseconds. It will also be slightly slower than using Pusher natively, but only if you are close to whichever Pusher data center used. If you aren't close to the Pusher data center you've chosen, then the extra latency from using the adapter should be more than compensated for by being able to use a data center that is close to you. This is because Ably automatically connects clients to the data center closest to them. From 5fc2a9fdee0d5a5734e20316ee509825a16304a8 Mon Sep 17 00:00:00 2001 From: Francis Roberts <111994975+franrob-projects@users.noreply.github.com> Date: Tue, 30 Sep 2025 10:12:40 +0200 Subject: [PATCH 6/7] Moving from Socket.io to Ably --- src/pages/docs/protocols/index.mdx | 54 ++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/src/pages/docs/protocols/index.mdx b/src/pages/docs/protocols/index.mdx index dcea4c3d4f..2d2f429313 100644 --- a/src/pages/docs/protocols/index.mdx +++ b/src/pages/docs/protocols/index.mdx @@ -29,6 +29,7 @@ Ably supports multiple protocols in addition to the native WebSockets-based one: * [STOMP](#stomp) * [Pusher](#pusher) * [PubNub](#pubnub) +* [Socket.IO migration](#socketio) ### MQTT @@ -73,3 +74,56 @@ Ably is the only cloud vendor that supports the PubNub protocol. It's simple to Seamlessly migrate from PubNub by connecting to the Ably network using the PubNub protocol. Read more in the [PubNub Adapter section](/docs/protocols/pubnub). + +### Socket.IO migration + +Below is a guide to some of the basics of transitioning from Socket.io to Ably. The socket.io API is actually very similar to the Ably API. + +#### To connect + +In socketIO: +```javascript +io.on('connection', (socket) => { + console.log('a user connected'); +}); +``` + +In Ably: +```javascript +ably.connection.on('connected', function() { + alert("That was simple, you're now connected to Ably in realtime"); +}); +``` + +#### Sending a message: + +In SocketIO: +```javascript +io.on('connection', (socket) => { + socket.broadcast.emit('message-name', 'hello there this is my message'); +}); +``` + +In Ably, you need to first have a channel set up and then you can send and receive on that channel: +```javascript +var channel = ably.channels.get('test-channel'); +channel.publish('message-name', 'hello there this is my message'); +``` + +#### To receive a message: + +In SocketIO: +```javascript +socket.on('message-name', (message) => { + console.log('message was: ' + message); +}); +``` + +In Ably any subscribers to the channel that you created will receive the message: +```javascript +channel.subscribe('test-channel', function(message) { + console.log('message was: ' + message.data); +}); +``` + +For more help, please [get in touch](https://ably.com/contact). From 25e2591e44311d4033fddb8a89b50ce66c7a9b0b Mon Sep 17 00:00:00 2001 From: Francis Roberts <111994975+franrob-projects@users.noreply.github.com> Date: Tue, 30 Sep 2025 17:34:33 +0200 Subject: [PATCH 7/7] Tidy up commit --- src/pages/docs/protocols/index.mdx | 6 +++--- src/pages/docs/protocols/pubnub.mdx | 2 +- src/pages/docs/protocols/pusher.mdx | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pages/docs/protocols/index.mdx b/src/pages/docs/protocols/index.mdx index 2d2f429313..b73092f239 100644 --- a/src/pages/docs/protocols/index.mdx +++ b/src/pages/docs/protocols/index.mdx @@ -11,7 +11,7 @@ Protocol adapters offer an alternative method for connecting to Ably. The advant ## Migration support -Ably helps customers migrate from other data streaming networks including PubNub and Pusher. Our protocol adapters facilitate risk-free migration by allowing you to use existing protocols and client libraries while transitioning to Ably client libraries over time. +Ably helps customers migrate from other data streaming networks including PubNub and Pusher. Protocol adapters facilitate risk-free migration by allowing you to use existing protocols and client libraries while transitioning to Ably client libraries over time. Protocol adapters ensure interoperability between different protocols. For example, you can publish sensor data from an MQTT device, subscribe to that data using a Pusher client library for dashboard display, support mobile apps using Ably SDKs, and process data using AMQP worker queues - all within the same system. @@ -35,7 +35,7 @@ Ably supports multiple protocols in addition to the native WebSockets-based one: MQTT (MQ Telemetry Transport) is a publish/subscribe, lightweight messaging protocol designed for constrained devices and low-bandwidth networks. One of the major uses of MQTT is with IoT (Internet of Things), where these principles are key to having effective communication between various devices. -MQTT can also be used with Ably as a basic event broker or if we don't have an SDK for your target platform. However, without an SDK you don't get access to the full range of platform features and data guarantees. +MQTT can also be used with Ably as a basic event broker or if an SDK is not available for your target platform. However, without an SDK you don't get access to the full range of platform features and data guarantees. Read more in the [MQTT section](/docs/protocols/mqtt). @@ -91,7 +91,7 @@ io.on('connection', (socket) => { In Ably: ```javascript ably.connection.on('connected', function() { - alert("That was simple, you're now connected to Ably in realtime"); + alert("Connected to Ably in realtime"); }); ``` diff --git a/src/pages/docs/protocols/pubnub.mdx b/src/pages/docs/protocols/pubnub.mdx index d7af313ce5..4bfba4837e 100644 --- a/src/pages/docs/protocols/pubnub.mdx +++ b/src/pages/docs/protocols/pubnub.mdx @@ -22,7 +22,7 @@ A typical migration from PubNub to Ably follows these steps: 1. Change the host name for all of your PubNub client library integrations to use Ably's endpoints. -2. Migrate one app at a time over to Ably client libraries. At this stage, some of your apps will be using PubNub client libraries and others will be using Ably's client libraries. Since we translate the PubNub protocol, there's no interruption and interoperability between both protocols is maintained. +2. Migrate one app at a time over to Ably client libraries. At this stage, some of your apps will be using PubNub client libraries and others will be using Ably's client libraries. Since the adapter translates the PubNub protocol, there's no interruption and interoperability between both protocols is maintained. 3. Migrate all your apps and servers to use Ably client libraries and terminate your old contracts. diff --git a/src/pages/docs/protocols/pusher.mdx b/src/pages/docs/protocols/pusher.mdx index fbffd16da1..e13d6687c0 100644 --- a/src/pages/docs/protocols/pusher.mdx +++ b/src/pages/docs/protocols/pusher.mdx @@ -5,7 +5,7 @@ languages: - javascript --- -Ably enables easy migration from Pusher to Ably using its Pusher Adapter. The protocol adapter handles all background translation and only requires an API key change, allowing you to use existing Pusher client libraries directly with Ably. +Ably enables migration from Pusher to Ably using its Pusher Adapter. The protocol adapter handles all background translation and only requires an API key change, allowing you to use existing Pusher client libraries directly with Ably. Using an adapter introduces some latency and is slower than using an Ably SDK, however the impact is typically in the low milliseconds. It will also be slightly slower than using Pusher natively, but only if you are close to whichever Pusher data center used. If you aren't close to the Pusher data center you've chosen, then the extra latency from using the adapter should be more than compensated for by being able to use a data center that is close to you. This is because Ably automatically connects clients to the data center closest to them.