Reputation: 1866
We're currently working on a small scale indie card game for Facebook, which we hope will reach hundreds of thousands of players (eventually).
We have most of the issues figured out (scalability, server-side architecture, etc) - however one question - communication between client & server.
We have the following requirements:
First thing that came to mind was socket connections, but I was wondering, is there a better solution that answers our needs?
Thanks!
Upvotes: 0
Views: 1735
Reputation: 815
We use WebORB in our flash games for comunicating serverside and clientside but i don't know it is enough for your requirements.
Sorry if i miss understood.
Upvotes: 1
Reputation: 10526
A socket connection is almost inevitable (see transport layers).
A good idea is to use TCP: it guarantees delivery (high reliability), it's "connection" orientated. There are some downsides, but other alternatives are not available on most computers, routers and browsers.
A more important question is: what are you going to send over TCP? Generally, it's a good idea to use something that can be used in Flash and your server (see Remote Procedure Call for example).
"Push" messages are generally only a problem with HTTP connections, as it was designed to handle synchronous requests. However, in Flash you do not have this limitation.
Security can be added by "wrapping" a TCP connection: use SSL or TLS.
See NetConnection class, and the Action Message Format.
The Adobe Integrated Runtime and Adobe Flash Player use AMF to communicate between an application and a remote server. AMF encodes remote procedure calls (RPC) into a compact binary representation that can be transferred over HTTP/HTTPS or the RTMP/RTMPS protocol. Objects and data values are serialized into this binary format, which increases performance, allowing applications to load data up to 10 times faster than with text-based formats such as XML or SOAP.
(from http://www.pyamf.org/)
Upvotes: 1