Page 2 of 8
Posted: 11 May 2010, 05:43
by Lapo
Bandwidth optimizations are only possible for Actionscript 3.
Actionscript 2 does not support binary sockets.
Posted: 11 May 2010, 20:35
by Zanpher
This is AWESOME news to say the least. I am looking forward to SFS2
Posted: 12 May 2010, 08:15
by mixart
This is great news Lapo. I'm very excited to learn more as the project progresses.
2 quick questions:
- There will be no serverside actionscript support for extensions?
- Will there be the ability to send binary or bitmap data to and from the server?
One thing that I am most excited about is "Transparent re-connection system" which is the biggest complaint I get from users. I really wish there was a way to port this feature to the current 1.X SFS.
Posted: 12 May 2010, 08:45
by Lapo
Hi,
- There will be no serverside actionscript support for extensions?
This is correct. You can however plugin Mozilla Rhino (what we use for AS compilation in SFS 1.x) if you really need it, there's no problem.
It could help for quick prototyping, but not for production
Java is the one and only way to obtain great performance and control, and the new framework really requires a fully OOP language like Java to support all the new things we have added.
- Will there be the ability to send binary or bitmap data to and from the server?
Yes, absolutely.
Hi Lapo
Posted: 14 May 2010, 07:15
by vdatiger
Congratulation,
Great to hear about the SFS 2X.
However, I have a concern. We are planning to purchase 2 more unlimited licenses for our new servers in this month. We really want to try the SFS 2X but don't know exactly about your release date. What should we do ? Waiting for the new SFS 2X or just purchase 2 more SFS 1 ?
Can we upgrade our old sfs version to the new one ? Do we have to pay extra fee or anything else ?
Posted: 14 May 2010, 07:54
by Lapo
Hi,
I would very much recommend to read the
f.a.q. at the bottom of the announcement, that should already answer most of your doubts:
http://www.smartfoxserver.com/2X/
If you have any other questions please let us know.
Posted: 14 May 2010, 11:22
by Eralmidia
As a developer of a rather bandwidth-heavy project I must say I'm very exited about this. The savings on the binary format seems very good indeed, along with some other nice improvements. Seems like a real step forward

Great work!
One question tho Lapo: You stated above that the Flash API isn't that much different, and it wouldn't be such a pain to move from 1.x to 2X if the server side is already in Java. However, the faq states that upgrading isn't considered an issue? I, for one, wouldn't mind sacrificing a bit to port my 1.6 to get the new features.
Posted: 14 May 2010, 13:39
by Lapo
Eralmidia
The client API are indeed very similar in the workflow and general approach.
Here's a super basic example that enters a Zone and joins a Lobby room:
Code: Select all
package
{
public class BasicTemplate extends Sprite
{
private var sfs:SmartFox
public function BasicTemplate()
{
sfs = new SmartFox()
sfs.debug = true
sfs.addEventListener(SFSEvent.onConnection, onConnection)
sfs.addEventListener(SFSEvent.onConnectionLost, onConnectionLost)
sfs.addEventListener(SFSEvent.onLogin, onLogin)
sfs.addEventListener(SFSEvent.onJoinRoom, onJoinRoom)
sfs.connect("127.0.0.1")
}
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
// Event Handlers
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
private function onConnection(evt:SFSEvent):void
{
if (evt.params.success)
{
trace("Connection Success!")
sfs.send(new LoginRequest("SimpleChat", "", ""))
}
else
{
trace("Connection Failure: " + evt.params.errorMessage)
}
}
private function onConnectionLost(evt:SFSEvent):void
{
trace("Connection was lost. Reason: " + evt.params.reason)
}
private function onLogin(evt:SFSEvent):void
{
trace("Logged in as: " + evt.params.user.name)
sfs.send( new JoinRoomRequest("The Lobby") )
}
private function onJoinRoom(evt:SFSEvent):void
{
trace("Room Join Success: " + evt.params.room)
}
}
}
As you can see the code looks very familiar. If you had previous SFS1 code you would have very little work to do. Additionally the new API simplify the work flow so you would end up with less code than before
On the server side things will probably require more refactoring because SFS1.x is based on Java 1.4 while
SFS2X is based on Java6 so... generics, enums, annotations etc...
The event system is also slightly different. Since in
SFS2X has tons more server events than its predecessor an Extension will have to register to the events of interest, while in SFS 1.x all events where fired and your code had to deal with them.
Finally SFS 1.x used three separate handlers for the 3 different protocols which in turn involved three different approaches to sending/receiving data.
All this is gone in
SFS2X. Everything is simpler, more high level and there's just one approach to sending/receiving data.
Hope it helps.
p.s.
We'll soon publish some extra preview docs to give you a feel for the new Extension architecture/API
Posted: 14 May 2010, 18:12
by Eralmidia
Thanks for the reply. Seems nice, simple and similar. Good to see we can concentrate on the new elements instead of using time to learn the basics all over

Looking forward to release date and license options announcements.
Posted: 18 May 2010, 16:28
by cpdavidd
WOW. Can't wait till 2X ...

Posted: 19 May 2010, 02:23
by Zanpher
Always nice.
Are you guys still considering an "upgrade fee" for 1.x licenses to 2.x licenses? I wouldn't want to purchase 1.x pro if there's no way to upgrade.
The ability to use Java 1.6 makes it worth it.
Posted: 19 May 2010, 05:43
by Lapo
Hi,
did you read the faq at the end of the announcement. We address your question there:
http://www.smartfoxserver.com/2X/
Cheers.
Posted: 19 May 2010, 18:19
by Zanpher
I did, thats why I asked this question. I'll quote
[quote]
We remain open to the possibility of offering an “upgrade feeâ€
Posted: 19 May 2010, 19:33
by Lapo
Zanpher
Are you still open to the possibility?
Yes, as explained in the faq we are. When the new edition will be out you can get in touch with us directly and we'll discuss the options.
1. Any chance to support ActionScript 4? There is some nifty features in there, would be nice to use Flash Builder 4 natively Smile Right now, I can use it just find by downgrading the builder's SDK to 3.5
For starters ... what is Actionscript 4?

We support Actionscript 3 and all versions of the Flash and Flex SDK. On the server side Extensions can be written in Java.
2. Any change to have a pure 64bit version of SFS? This will take advantage of the memory space and a slight speed increase
SmartFoxServer is already available for 64bit platforms. It is pure 64bit when you run a 64 bit JVM

. SFS2X will support both 32 and 64 bit architectures... and to be honest this is not our merit, but Java's.

Posted: 19 May 2010, 19:41
by Zanpher
Ah ha, i didnt think of that, thanks
As for AS4:
http://en.wikipedia.org/wiki/ActionScript
Its not updated yet, if you download flash builder 4, everything you write by default is in Actionscript 4. You have to go into project properties and change the project sdk to use actionscript 3 for compatibility
