Data connectivity has always been an issue on mobile devices. While users use their devices, the data source often switches towers or downgrades/upgrades between 2G, 3G and WiFi. This has an impact on applications which rely on persistent data connectivity.
AppWarp’s binary protocol runs on top of TCP. This provides developers with fast, efficient and reliable realtime connectivity. However on mobile devices often the case will be that the device IP address will change as the data source changes. This results in the underlying connection to break and the application/game code must recover from this by reconnecting, rejoining and resubscribing to the same room the user was in before the error occurred. Worse, other users in the room will receive an event indicating that user has left the room. This could even impact the game logic as other clients won’t get to know whether the concerned user experienced intermittent connectivity issues or disconnected willfully i.e. left the room.
We have introduced our Connection Resiliency feature to offer developers a solution to handle this problem. When any connectivity error will occur, AppWarp SDK will raise an error indicating whether the error is recoverable or non-recoverable. If it’s a recoverable error, our new recover connection API can be called and if connectivity has been restored, it will automatically restore the client to its last state in terms of the room it was in and all its subscriptions. So no re-joining, re-subscribing and state keeping is required in the application. Additionally, when such intermittent errors occur, AppWarp server will raise a specific event to other users in the room indicating that the user has been paused. After a specified timeout, if the concerned user is unable to restore its connection, a user left room event will be raised for other users in the room. On the other hand if the connection is restored successfully, a user resumed event is raised.
Currently, this feature is available in the latest version of our Android and iOS SDKs. We will soon be updating it for other platforms as well. To learn more, visit our connection resiliency feature page.
Leave A Reply