3

I just started to work with client-server communication and I created a poker game that works on Android and iPhone and connects with a C# server. Right now I'm using PubNub to send and receive messages but there are either one of two problems with this:

  1. I need to poll the sever and get the table status all the time so there will be a lot of messages which means that the server needs to send more messages (more overload) and a higher cost (as PubNub pays per message)

    (or)

  2. The table will not always be 100% updated on the client (Android/iPhone)

So my question is how do bigger poker sites like PokerStars handle the communication? Do they set up sockets and send the information all the time to the connected users to that connected table?

Any information about creating this kind of communication between one server and several mobile devices (and also Windows C# clients) would be highly appreciated.

Olivier Jacot-Descombes
  • 104,806
  • 13
  • 138
  • 188
Westerlund.io
  • 2,743
  • 5
  • 30
  • 37
  • 1
    Would probably need to know a bit more about how this "PubNub" thing works. C# (WCF) is capable of pushing messages from the server to the client, and it sounds like this is what you'd have to do otherwise you'd have to poll an incredible amount of times as people perform actions. – NibblyPig Mar 17 '14 at 17:06
  • So basically what I need to do is to send and receive as-needed? – Westerlund.io Mar 17 '14 at 18:04
  • You need to establish a connection that supports sending data in both directions. From how you describe PubNub it might not be suitable - it might be geared more towards something like Chess. – NibblyPig Mar 18 '14 at 09:28
  • PubNub can both send and receive and that's what I do right now but I feel that there are a lot of problems that can occur but it might just be my implementation and that it will be the same for whatever communication method I choose i.e. I need to make a more stable implementation from the beginning. – Westerlund.io Mar 18 '14 at 22:19

1 Answers1

0

I cannot give you an answer to your question but my approach would be using a tool like WireShark and try to find it out by analyzing the (amount of) packets that are exchanged.

Markus Safar
  • 6,324
  • 5
  • 28
  • 44