![]() Therefore, performance tuning and system redesign was conducted. The first performance results of the load test with a simple stock ejabberd service was not sufficient for the production requirements, with capacity at 300k connections and 150 connections per second. Business requirements include 1 million concurrent connections, and the recovery for bursting logins in max 30 minutes. The job of the inner ejabberd is to retrieve messages from Amazon Simple Queue Service (SQS), while the outer ejabberd handles the distribution to the Switch game consoles. All the nodes are connected by the distributed Erlang communication. To ease maintenance, Nintendo ejabberd cluster is split into two areas: the inner ejabberd (cpu-bound) and outer ejabberd (memory-bound). It is built in Erlang and inherits many of Erlang strengths: scalability, robustness, native clustering support, and more. ejabberd was chosen because of its scalability and robustness. In terms of technology, XMPP was chosen due to the large feature set of that protocol. They also include the PubSub topic-based ones like the update notifications and important news, and are available when connected and after a successful login. The notifications include user-based (directed at active players) and system-based (automatic updates, parental controls). So far, Nintendo shipped more than 34 million units, thus the infrastructure needs to handle millions of concurrent connections. The game consoles are constantly connected to the infrastructure, listening for push notifications. The Nintendo Switch NPNS is a large-scale realtime messaging service based on ejabberd. Here are some details from his presentation at ElixirFest conference. We would need an auth token to avoid bogus messages from being forwarded, and a url where the messages should be forwarded.Last week, Taiyo Watanabe from Nintendo shared some insights about Nintendo Switch Push Notification infrastructure (NPNS) implementation. To retrieve certain options from ejabberd.cfg, so it seemed reasonable to use a similar approach to retrieve a url and access token for our purposes.īased on the applications requirements, I came up with a minimal piece of configuration that we could use to set the details per environment. When an interesting event happens the modules that are subscribed to that event get run. The basic idea behind ejabberd modules is that there are lifecylce events that occur, such as a user coming online, a user going offline, or receiving a message, and a module can subscribe to a particular event. ![]() Everything was regularly deployed to a staging environment and compiling ejabberd modules per environment seemed like a maintenance headache.īody with the data needed by the rails app.There were two things I needed it to do a bit differently.Įasily configure the url where the data was being sent. ![]() That was originally intended to forward offline messages from ejabberd toĪfter digging into the mod_offline_prowl code, I saw that it could be adapted to do what I needed. In my research, I came across a module for ejabberd called We decided to see if we could get ejabberd to forward the messages for offline users. To handle the communication with Apple's push notification service. Hypothesisīecause we were concurrently developing a rails app to provide theįor the iOS app, we decided the easiest solution would be to forward the offline messages from ejabberd to the rails app and integrate The solution we came up with requires a some integration, but only between 60-70 lines of code. At the time, it didn't seem like there was a great solution to get messages to offline users directly from ejabberd, so we started doing a bit of research. One of the challenges we had to overcome was sending push notifications to offline users when they received an incoming chat message. The decision was made to use ejabberd as the backend for the chat, with a native, I recently had the fortune to work on an iOS application that included a feature to allow users to chat with each other. IOS Push Notifications using Jabber and eJabberd
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |