Standalone Server Applications in AS3

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

User avatar
jbucaran
Posts: 14
Joined: 17 Aug 2008, 17:38

Standalone Server Applications in AS3

Postby jbucaran » 04 Sep 2008, 00:55

[deleted]
Last edited by jbucaran on 04 Dec 2023, 10:23, edited 1 time in total.
User avatar
jbucaran
Posts: 14
Joined: 17 Aug 2008, 17:38

Postby jbucaran » 04 Sep 2008, 01:34

[deleted]
Last edited by jbucaran on 04 Dec 2023, 10:23, edited 1 time in total.
Menser
Posts: 111
Joined: 13 Nov 2007, 18:32

Postby Menser » 04 Sep 2008, 04:03

Heya-

Im sure Lapo will move the post in the morning.

In the meantime.
AS3 is not use able on the server side of things because the engine they are using to simulate AS1 (its not actually AS1, its a simulated subset) doesn't support as3.

AS1 was essentially JavaScript hopped up on some good commercial steroids, so it is easier to emulate then AS3 with is a very robust and detailed language.

In addition, if you feel comfortable with AS3, i would consider taking a look at java since the languages are similar in many facets.

Hope that helps
_-Menser-_
User avatar
jbucaran
Posts: 14
Joined: 17 Aug 2008, 17:38

Postby jbucaran » 05 Sep 2008, 05:27

[deleted]
Last edited by jbucaran on 04 Dec 2023, 10:23, edited 1 time in total.
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 05 Sep 2008, 07:56

I fully second Menser.
There isn't much more to say... having a way to develop server-side extension using AS3 would have a complexity similar to Java, but with the performances of AS. Not many advantages, and a lot of disadvantages.
jbucaran, which kind of insight were you hoping for?
Paolo Bax
The SmartFoxServer Team
Menser
Posts: 111
Joined: 13 Nov 2007, 18:32

Postby Menser » 06 Sep 2008, 04:10

Heya-

Ill try to answer with a bit more detail.

DICSLAIMER: The following information is what i remember (or think i remember) picking up from various posts on forums, and don't actually have any back end server knowledge of SFS myself. If i post in accurate information someone please correct me.

The server itself is written in Java, which itself has no support for Actionscript in any fashion(1,2, or 3).

The server makes use of an engine for java called Rhino which allows them to simulate a JavaScript environment where scripts can be executed.

This still however does not allow the server to support anything other then JavaScript as an extension.

Now there is where i get pretty assumptive in my information, so i may be wrong with what follows.

The AS1 itself isn't a really language so to speak, its basically javascript with a set of predefined functions and objects built on top.

So in order to get the server to "understand" as1, they basically had to create and inject the extended set of objects and functions into the Rhino engine (not sure if this is done in some sort of definition for rhino or if code is actually injected into the script before it runs).

This now allows the server to "support" as1.

The same holds true for python, a Python emulator written in java, called Jython, to run the python script.

S0 now the problem with supporting as3. Basically there is no Java engine that allows you to run the code, therefor there is nothing for them to use to interpret the scripts.

Now you may be saying, well couldnt they do what they did for AS1. Possibly, though it would take a GREAT deal of time, and not be very useful.

Why wouldn't it be very useful you may ask?

First, it would be pretty slow i imagine. There would more then likely be considerable overhead to support something like as3 because it is such a robust language.

Secondly, if you are comfortable with AS3, the transition to Java is not a giant leap, its more like a small skip.

Put those two together from a business sense, and it just doesn't make sense to support something so similar to java, that would probably be considerably slower then the as1 implementation.


Hope that provides the insight you were looking for, if not im am at a loss for words then, lol.

Hope that helps,
_-Menser-_

Return to “Server Side Extension Development”

Who is online

Users browsing this forum: No registered users and 21 guests