20
Oct
12

There’s so much more

When creating an app like RummyFight, there are a lot more involved than just the app. I mean, somewhere all the fights must be stored, something must start new fights, end those where players are excluded etc etc.

To make sure RummyFight will work for both Android and iPhone at the same time, lots of things have had to be adjusted or rewritten on the server too since the two operating systems work not alike in many aspects. But anyway, I thought this might be a good time to explain how RummyFight is built. Maybe to inspire others to create other good apps.

So at the very bottom we have the main server. Let’s call it the Lobby server. It has a big database with all the players, info about running fights, statistics and everything. However it has no knowledge at all about the fights themselves. This info is stored on any of the Fight-servers. This means that in most cases you are connected to one server when you are in the Lobby and you are connected to another server when you are inside a fight. I chose this approach since it means we can add new servers to increase performance and allow the Lobbyserver to focus on what it does best.

On the Lobbyserver there is a cute little service running called RummiDaemon. It’s responsible for pairing players, populate fights with opponents, start fights, exclude players due to timeout, end fights and calculate statistics and rankings. This little cutie is actually written in the ancient language of Visual Basic 6. Why, you ask? Well, simply because I like it and there’s no need for speed in this service. It rests most of it’s time anyway and comes alive only every 15 seconds for about a second.

Image

Then there’s another server running two important services: The RummiPusher and the RummiChat.

The RummiPusher is the one sending out the notifications to all players telling them it’s their turn, that they have received a new chat message, that they have an invitation, etc. It was up until a few days ago also written in Visual Basic 6 but lately the new RummiPusher written i C#.NET is responsible for all notifications. This new version can handle both Android and iPhone push notifications so that’s why it had to be completely rewritten before the release of the iPhone-RF.

Image

The RummiChat is the little workhorse responsible for all the chat messages and update messages sent. When the app is started, it connects to this server and keeps it’s connection alive until the app is closed. At all times we are able to see how many players that actually have RummyFight up on their screens and we can also see where they are in the app. It’s great informations for us since we then can focus our optimizations on where people spend most of their times. RummiChat is also the way we can tell the app to reload fight information or refresh the lobby. This is what we call “Instant Update”.
Image
This version of RummiChat is only about 2 days old and it had to be rewritten for several reasons.
1. It was a little slow sometimes due to being single threaded and written in Visual Basic 6 (yes, I do like that language). Now the new version is written in C#.NET, is multithreaded and fast like the wind 😉
2. The old version didn’t support unicode characters which we really would like to introduce in the apps soon. This way people will be able to write emoticons in their chat messages too.

There is also yet another server involved in all this and it’s our media server where all the profile pics and themes are stored. We believed there was no need to put additional load on our main servers and network connection so we “outsourced” this server to be hosted about 500 kilometers away from us. Nothing you’ll ever notice 😉

So, now you know some more about what it takes to make sure RummyFight is running.
Have fun!


2 Responses to “There’s so much more”


  1. 1 gekko
    October 22, 2012 at 6:31 pm

    nice to see some behind the scenes thingy’s

  2. October 23, 2012 at 1:11 pm

    really impressed so far.
    can’t wait for the release!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


Categories


%d bloggers like this: