Why should I use SFS instead of BlazeDS?

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Asphalt
Posts: 6
Joined: 25 Jul 2007, 13:22

Why should I use SFS instead of BlazeDS?

Postby Asphalt » 13 Dec 2007, 07:20

Adobe just announced BlazeDS - a server-based Java remoting and web messaging technology that enables developers to easily connect to back-end distributed data and push data in real-time for more responsive rich Internet application (RIA) experiences.
It uses the AMF binary data protocol specification, which is supposed to be very fast.
It's also an open-source project.
http://labs.adobe.com/technologies/blazeds/

I don't know much about Java servers, so I was wondering how BlazeDS compares to SmartFoxServer? Here are some questions:
1. Which is faster?
2. Which is more scalable?
3. How does the Adobe release of BlazeDS affect SFS?
4. Will SFS be re-architected to use AMF?
5. Will a future version of SFS sit on top of BlazeDS?
6. Do these technologies complement or compete with each other?

I've demoed SFS locally and have been pretty happy with the API, tutorials and documentation. For those reasons I don't mind paying the price of SFS. I'm currently waiting for SFS 1.6 to be released before I buy a VPS plan and try to install it.

As a developer, my concern is that I don't want to commit to a technology when an industry-standard might just be around the corner...
Kicksome
Posts: 52
Joined: 01 Sep 2007, 02:25
Contact:

Postby Kicksome » 13 Dec 2007, 14:24

To me it sounds like they don't want to support an old product anymore and are releasing it as open source. That way they don't have to worry about current customers complaining that it's discontinued.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 13 Dec 2007, 16:04

Asphalt
BlazeDs has very little to do with SmartFoxServer. (btw this is the 1st time I read about it :) )
BlazeDs is a generic web-application server based on AMF... so it's an http server.

SmartFoxServer is a socket server designed for fast multiplayer realtime games and applications. They really have very little in common.
Additionally SmartFoxServer PRO already incorporates a powerful web server which can be used to deploy dynamic web pages which can also interact with the socket server

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
Asphalt
Posts: 6
Joined: 25 Jul 2007, 13:22

Postby Asphalt » 13 Dec 2007, 18:41

Thanks for the quick reply Lapo.

A few more questions please:

1. Would it be safe to say that whatever data format that SFS uses is faster than the binary AMF? Being able to move data around as binary and read it into Flash as a byte array instead of a string seems like it would be pretty fast?

2. Will a socket server always be faster than an http server?

3. BlazeDS has a HTTP streaming channel that establishes a persistent connection between client and server for true data push. It also includes web messaging to allow for real-time collaboration (gaming). Doesn't this make it somewhat a competitor to SFS? Of course SFS has many useful game-specific features like rooms, admin panel, etc.

I found this BlazeDS FAQ somewhat useful, although I'm not well versed in the technical aspects of servers, so not all of it made sense to me.
BlazeDS FAQ
BlazeDS Developer Guide
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 14 Dec 2007, 06:29

1. Would it be safe to say that whatever data format that SFS uses is faster than the binary AMF? Being able to move data around as binary and read it into Flash as a byte array instead of a string seems like it would be pretty fast?

The problem about "speed" has very little to do with the protocol, the real problem with fast multiplayer apps is the network lag.
Additionally it seems that alot of people thinks that binary == cool while this is usually a myth.
For example strings in AMF are not compressed so they take up the same bytes they would if the protocol was string-based.
A number like 10 takes at least 4 bytes in binary, but only two as a string...
Where in binary you use a number to identify a command or request, with strings you can use a single character etc...

We could go on like this for hours debating why binary is better in certain fields and strings in others, etc...
At the end of the day when you have an efficient protocol you have just solved 30% of the problem the rest is the network lag.
2. Will a socket server always be faster than an http server?

Yes, a socket connection is established once and kept "open" until the end of a session.
An http connection is opened and closed for each request resulting in a larger overhead and slowness.
Of course this also provides and advantage for the server which keeps a connection open just for the time that is necessary to receive the request and send a response.

3. BlazeDS has a HTTP streaming channel that establishes a persistent connection between client and server for true data push. It also includes web messaging to allow for real-time collaboration (gaming). Doesn't this make it somewhat a competitor to SFS? Of course SFS has many useful game-specific features like rooms, admin panel, etc.


I think you already answered the question. :)
This is really nothing new. Any server capable of establishing a socket connection is a competitor? I don't know ... it depends on what it does :)

SmartFoxServer is not just a game server... it provides a real framework for developing multiplayer games and apps with dozens of high level features such as room management, buddy lists, message filters, object serialization, user management ... bla bla bla :)
Lapo

--

gotoAndPlay()

...addicted to flash games
Asphalt
Posts: 6
Joined: 25 Jul 2007, 13:22

Postby Asphalt » 14 Dec 2007, 13:43

Thanks for the insightful answers Lapo - you obviously know what you're talking about - now please go work on SFS 1.6 so that I can buy it :)

One last link that might be of interest for speed comparisons - it certainly makes AMF3 look appealing compared to JSON and XML.
AMF vs JSON vs XML Speed Benchmark Graph
CB
Posts: 45
Joined: 04 Aug 2006, 11:15

Darkstar

Postby CB » 14 Dec 2007, 16:54

Lapo -

I too am very happy with SFS and look forward to 1.6. I wonder if you might also commIent on Sun' s project Darkstar as it relates to SFS. My impression is that SFS is quite a bit further along especially in relation teo Flash/Flex front end apps.

info on darkStar can be found at wwwo.projectDarkStar.com

Thanks

C
io
Posts: 1
Joined: 17 Dec 2007, 03:36

Postby io » 17 Dec 2007, 04:00

Lapo wrote:
Additionally it seems that alot of people thinks that binary == cool while this is usually a myth.
For example strings in AMF are not compressed so they take up the same bytes they would if the protocol was string-based.
A number like 10 takes at least 4 bytes in binary, but only two as a string...
Where in binary you use a number to identify a command or request, with strings you can use a single character etc...

SmartFoxServer is not just a game server... it provides a real framework for developing multiplayer games and apps with dozens of high level features such as room management, buddy lists, message filters, object serialization, user management ... bla bla bla :)


i've recently begun evaluating smartfox, and while i like it -- in fact one of the drawbacks i see is that its protocol is text based.

for one thing: a string representing "10" isn't 2 bytes over the net. if smartfox is using null terminators then its 3. more likely, as most people do in text protocols, its a 4byte count: which makes it 6bytes. if you're using a binary stream, and you know your number range -- that 10 for instance can pack down to 4 *bits*

floating point numbers ( while there are issues making sure they are the same rep. on both ends ) similarly are going to pack down to ultra-small values in binary.

also: to use binary, you generally setup either setup a pre-agreed upon packet format, or for something dynamic like action script, you handshake on the format along the way. that drops all identifiers out of the packet altogether -- removing most of the strings ( member property names and the like ) that a text packet usually takes.

i'm not saying all this to start an argument -- i like what smartfoxserver is doing and i think its a good product -- i just would also like to see it have a binary packet format at some point -- b/c binary *can* provide a high performance channel in situations that need it.

udp connections for those wouldn't be bad either -- but that's a different conversation :)
User avatar
potmo
Posts: 154
Joined: 02 Feb 2007, 14:28
Location: Stockholm Sweden
Contact:

Postby potmo » 17 Dec 2007, 09:25

I dont really know and i havent go the time to check it up but I think they will add a binary protocol for the 1.6 release. Correct me if im wrong.
And UDP is not supported by Flash so its not worth it (In Director you can actually use UDP)
Nisse Bergman
Raketspel

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 59 guests