SmartFox 2X vs SmartFox 1.6.x

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Fishypants
Posts: 57
Joined: 26 Oct 2010, 14:03
Location: South Pasadena California
Contact:

SmartFox 2X vs SmartFox 1.6.x

Postby Fishypants » 17 Sep 2012, 22:59

Hey guys, I am at the point in our project where the groundwork is in place and I have a question. Forgive me if this is a dumb question, but we are using SmartFox 1.6 and sending messages as pure string values like so:

x:120:70:45

We then tokenize the string on each end based on the ":" character to get the values, so first entry in the list would be a 1-2 character keyword and based on that we extract the values, so example above could be a player position update.

Now this is pretty small, which I like, but I was wondering if there was any performance gain with SmartFox 2X. I heard there is a binary protocol? Does this actually send it in a compressed binary message, or does it send the binary values as a string? As ascii the binary looks like:

011110000011101000110001001100100011000000111010
0011011100110000001110100011010000110101

Which is way more bloated than the pure text example above. So yeah, some insight on this would be much appreciated! Thanks guys!
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: SmartFox 2X vs SmartFox 1.6.x

Postby Lapo » 18 Sep 2012, 09:45

I don't understand your example.
In SFS PRO you don't need to tokenize the data, the work is already done for you by the protocol.
Under SFS2X the data is purely binary and it is compressed when it's necessary, according to packet threshold configured in the system.

The binary example you provide is not clear. It sounds like you assume that every bit is sent as a separate character which is obviously incorrect.
You probably need to review how data is represented in binary form. Google will come to rescue :)

More details on the SFS2X protocol VS SFSPRO are found here:
http://docs2x.smartfoxserver.com/Overvi ... x-protocol
Lapo
--
gotoAndPlay()
...addicted to flash games
Fishypants
Posts: 57
Joined: 26 Oct 2010, 14:03
Location: South Pasadena California
Contact:

Re: SmartFox 2X vs SmartFox 1.6.x

Postby Fishypants » 18 Sep 2012, 17:39

Hey Lapo, yep I was unclear about it but thank you for the response. So just to clarify, the binary protocol would send data more compressed than raw string method, correct? I was hoping it would but just want to make sure before we make the jump and switch to SmartFox 2X.
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: SmartFox 2X vs SmartFox 1.6.x

Postby Lapo » 18 Sep 2012, 19:22

Yes, it does.
Lapo

--

gotoAndPlay()

...addicted to flash games
Fishypants
Posts: 57
Joined: 26 Oct 2010, 14:03
Location: South Pasadena California
Contact:

Re: SmartFox 2X vs SmartFox 1.6.x

Postby Fishypants » 18 Sep 2012, 20:42

Thanks Lapo!

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Stevenor and 53 guests