PDA

Click to See Complete Forum and Search --> : xmlsocket



thotatri
06-09-2001, 04:36 AM
guys knowing abt xmlsocket put their views here

Emphatic
06-11-2001, 05:26 AM
Heh ok, well here I go... (you asked for it!!)

XmlSocket has great potential, it allows (for those that don't know) flash to create a tcp/ip connection to a socket server. Now XML doesn't HAVE to be used, you could design your own data structure, but it is a good way to keeping a standard.

Advantages:

Fast, much faster than POST/GET and LoadVariables!
'Real Time' allows you to create real time games, RPG/Chat rooms etc..
Security, security can be built in, handshakes can be built.

Disadvantages:

LAG.. Ping times are a major factor/problem with online games. As those of you who have played Quake online know, if you have a slow connection, yer screwed. Games online with flash are no different. If you are lagging, you may not receive all messages. This can have disasterous results with your games! For example what if player A, who is on a T1, shoots player B. Player A receives the message player B is dead.. but Player B, who is on a 28k modem, doesnt get this message, so his client carries on playing. Now, is he dead or not?

Processing of messages.. If you play a game with say 4 players, and each message sent by you, it is received by the other 3. Now if you send 2 messages per second, (semi-realtime). That means each player is receiving about 6 messages per second, and sending 2. This itself flash can deal with, HOWEVER if you have 20 players, all sending 2 messages a second, flash has a habit of missing the odd question, or not parsing it succesfully. So you need to limit how many users are going to receive the messages.

In practice I'd suggest no more than about 10-20 messages per second.

Closing:

XMLSocket in flash is a really great thing, it allows you to do things in flash, you could never do before.. But you need to plan out your application carefully.

Steve Cox
:'Soon to be' Open source Socket Server: http://www.flashnexus.com

VAYKENT
06-13-2001, 01:27 PM
A - FRIGGIN - MEN.... Flash is not ready for QuakeIIII Flash Arena..... but that's 'cause web apps (for which Flash was intended) do not need 60 FPS... but it is ready for ANY turn based game....

And while we're on the subject of the XMLSocket.. I feel I must bring it to your attention - IT IS NOT SECURE!!!

The XMLSocket in Flash is not secure in and of itself... The security needs to be 'built-in-to' Flash... right now my company is developing a client-side/server-side type of app for increased security, but it'll be difficult to get to 128-bit encryption with Flash!!! ;)