haxe http server?

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

haxe http server?

slenkar
is it possible to make a neko server that can accept http requests from flash?
I got neko to work with the neko/flash chat example but it only works under certain circumstances
when i open client.html it doesnt work
when i open the swf file in adobes swf player it doesnt work
but when i right-click the swf and open in a browser it actually works.

so can neko accept http request from flash? 

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: haxe http server?

Benjamin Dasnois
Neko is not an HTTP Server.
haXe can be compiled to Neko Bytecode and therefor can be run by the
NekoVM which can be run inside the Apache HTTP Server.

So basically, I would say that HTTP Requests have to be accepted by Apache.

Hope that helps?

On Thu, Mar 11, 2010 at 9:32 PM, k a <[hidden email]> wrote:

> is it possible to make a neko server that can accept http requests from
> flash?
> I got neko to work with the neko/flash chat example but it only works under
> certain circumstances
> when i open client.html it doesnt work
> when i open the swf file in adobes swf player it doesnt work
> but when i right-click the swf and open in a browser it actually works.
>
> so can neko accept http request from flash?
>
> --
> haXe - an open source web programming language
> http://haxe.org
>



--
DASNOIS Benjamin
http://www.benjamindasnois.com

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: haxe http server?

Armén
In reply to this post by slenkar
Neko is a virtual machine (http://en.wikipedia.org/wiki/Virtual_machine). haXe can build neko machine programs. Neko includes API for accessing and using network sockets. Given these facts, nothing stops you from writing a HTTP server in haXe and have it run by neko.

This is how haxevideo was done. Except that it's a RTMP video streaming server.

On Thu, Mar 11, 2010 at 21:32, k a <[hidden email]> wrote:
is it possible to make a neko server that can accept http requests from flash?
I got neko to work with the neko/flash chat example but it only works under certain circumstances
when i open client.html it doesnt work
when i open the swf file in adobes swf player it doesnt work
but when i right-click the swf and open in a browser it actually works.

so can neko accept http request from flash? 

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: haxe http server?

Cauê W.
Actually for what I've seen at haXigniter, there is an option to run a pure (I think) neko-based web server. But I never looked into its source code.

2010/3/11 [hidden email] <[hidden email]>
Neko is a virtual machine (http://en.wikipedia.org/wiki/Virtual_machine). haXe can build neko machine programs. Neko includes API for accessing and using network sockets. Given these facts, nothing stops you from writing a HTTP server in haXe and have it run by neko.

This is how haxevideo was done. Except that it's a RTMP video streaming server.

On Thu, Mar 11, 2010 at 21:32, k a <[hidden email]> wrote:
is it possible to make a neko server that can accept http requests from flash?
I got neko to work with the neko/flash chat example but it only works under certain circumstances
when i open client.html it doesnt work
when i open the swf file in adobes swf player it doesnt work
but when i right-click the swf and open in a browser it actually works.

so can neko accept http request from flash? 

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: haxe http server?

Randy Stauner
what about 'nekotools server' ?

On Thu, Mar 11, 2010 at 3:50 PM, Cauê Waneck <[hidden email]> wrote:
Actually for what I've seen at haXigniter, there is an option to run a pure (I think) neko-based web server. But I never looked into its source code.

2010/3/11 [hidden email] <[hidden email]>

Neko is a virtual machine (http://en.wikipedia.org/wiki/Virtual_machine). haXe can build neko machine programs. Neko includes API for accessing and using network sockets. Given these facts, nothing stops you from writing a HTTP server in haXe and have it run by neko.

This is how haxevideo was done. Except that it's a RTMP video streaming server.

On Thu, Mar 11, 2010 at 21:32, k a <[hidden email]> wrote:
is it possible to make a neko server that can accept http requests from flash?
I got neko to work with the neko/flash chat example but it only works under certain circumstances
when i open client.html it doesnt work
when i open the swf file in adobes swf player it doesnt work
but when i right-click the swf and open in a browser it actually works.

so can neko accept http request from flash? 

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: haxe http server?

Andreas Söderlund
That's the command I'm using for a (non-apache) web server in haxigniter/neko. It's working very well. The quickstart page gives some more instructions: http://wiki.github.com/ciscoheat/haxigniter/quick-start

/Andreas

On Fri, Mar 12, 2010 at 12:17 AM, Randy Stauner <[hidden email]> wrote:
what about 'nekotools server' ?


On Thu, Mar 11, 2010 at 3:50 PM, Cauê Waneck <[hidden email]> wrote:
Actually for what I've seen at haXigniter, there is an option to run a pure (I think) neko-based web server. But I never looked into its source code.



--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: haxe http server?

blackdog-2
Unless nekotools server has been upgraded in recent years it's not
suitable for a live server (based on a thread I had with Nicolas,
probably 2 years ago).

I think haxe sorely misses a production quality native server for neko
that comes in the distribution. The closest is probably Madrok's server
- which I think is on google code in the caffeine-hx project.

For those interested in a highly scalable, non apache, non neko
solution, my hxNode (http://www.github.com/blackdog66/hxNode) project
provides wrappers to node.js (http://www.nodejs.org). Although this is a
moving target API wise at the moment (I need to update my wrappers)
nodejs, imo, nodejs provides the best standalone server available to
haxe right now.

<rant>why in 2010 people are still embedding runtimes into apache I'll
never know.</rant> If haxe had a standalone production quality neko
server which could be proxied behind nginx/lighttpd it would open lot's
of opportunities to use haxe, I'm tempted to do it, but for the moment,
nodejs fills this space for me.

bd


On Fri, 2010-03-12 at 11:47 +0100, Andreas Söderlund wrote:

> That's the command I'm using for a (non-apache) web server in
> haxigniter/neko. It's working very well. The quickstart page gives
> some more instructions:
> http://wiki.github.com/ciscoheat/haxigniter/quick-start
>
> /Andreas
>
> On Fri, Mar 12, 2010 at 12:17 AM, Randy Stauner
> <[hidden email]> wrote:
>         what about 'nekotools server' ?
>        
>        
>        
>         On Thu, Mar 11, 2010 at 3:50 PM, Cauê Waneck
>         <[hidden email]> wrote:
>                 Actually for what I've seen at haXigniter, there is an
>                 option to run a pure (I think) neko-based web server.
>                 But I never looked into its source code.
>
>
>
> --
> haXe - an open source web programming language
> http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: haxe http server?

Benjamin Dasnois
Because many people are used to Apache administration :)
Anyway, it's not that much a problem (ok, Apache has some flaws, but
it has proven to be a solid server though, still I second your
opinion, this kind of configuration with nginx front-end preserve from
overhead, I bet tora could be used quiet easily with a stand-alone
server. Maybe this is an idea for a project.)


On Fri, Mar 12, 2010 at 1:41 PM, blackdog <[hidden email]> wrote:

> Unless nekotools server has been upgraded in recent years it's not
> suitable for a live server (based on a thread I had with Nicolas,
> probably 2 years ago).
>
> I think haxe sorely misses a production quality native server for neko
> that comes in the distribution. The closest is probably Madrok's server
> - which I think is on google code in the caffeine-hx project.
>
> For those interested in a highly scalable, non apache, non neko
> solution, my hxNode (http://www.github.com/blackdog66/hxNode) project
> provides wrappers to node.js (http://www.nodejs.org). Although this is a
> moving target API wise at the moment (I need to update my wrappers)
> nodejs, imo, nodejs provides the best standalone server available to
> haxe right now.
>
> <rant>why in 2010 people are still embedding runtimes into apache I'll
> never know.</rant> If haxe had a standalone production quality neko
> server which could be proxied behind nginx/lighttpd it would open lot's
> of opportunities to use haxe, I'm tempted to do it, but for the moment,
> nodejs fills this space for me.
>
> bd
>
>
> On Fri, 2010-03-12 at 11:47 +0100, Andreas Söderlund wrote:
>> That's the command I'm using for a (non-apache) web server in
>> haxigniter/neko. It's working very well. The quickstart page gives
>> some more instructions:
>> http://wiki.github.com/ciscoheat/haxigniter/quick-start
>>
>> /Andreas
>>
>> On Fri, Mar 12, 2010 at 12:17 AM, Randy Stauner
>> <[hidden email]> wrote:
>>         what about 'nekotools server' ?
>>
>>
>>
>>         On Thu, Mar 11, 2010 at 3:50 PM, Cauê Waneck
>>         <[hidden email]> wrote:
>>                 Actually for what I've seen at haXigniter, there is an
>>                 option to run a pure (I think) neko-based web server.
>>                 But I never looked into its source code.
>>
>>
>>
>> --
>> haXe - an open source web programming language
>> http://haxe.org
>
>
> --
> haXe - an open source web programming language
> http://haxe.org
>



--
DASNOIS Benjamin
http://www.benjamindasnois.com

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: haxe http server?

slenkar
is it possible to run an http server on a computer that doesnt take over port 80?

Can flash post http requests to other ports than 80?
Reply | Threaded
Open this post in threaded view
|

Re: haxe http server?

blackdog-2
yes, it's easier in fact becauses you don't need root to start your
server.

anything over 1024 (or so) can be opened by any user.

flash needs port 843 opened as a security port for crossdomain.xml which
the client inspects before allowing a request to one of the possible
ports listed in crossdomain.xml.

here's an example from my hxNode project that does this very thing ...

  public static function
  flashCrossDomain() {
     var tcp:Tcp = Node.require("tcp");
   
    var s = tcp.createServer(function(c:Connection) {
        c.addListener(Node.CONNECT,function(d) {
            c.send('<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy
  SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
  <allow-access-from domain="*" to-ports="1138,1139,1140" />
</cross-domain-policy>');
               c.close();
          });
       
        c.addListener(Node.EOF,function(d) {
            trace("lost connection");
            //     c.close();
          });
      });

    trace("args[1] "+Node.process.argv[2]);
    s.listen(843,Node.process.argv[2]);
   
  }


On Fri, 2010-03-12 at 06:40 -0800, slenkar wrote:
> is it possible to run an http server on a computer that doesnt take over port
> 80?
>
> Can flash post http requests to other ports than 80?
> --
> View this message in context: http://n2.nabble.com/haxe-http-server-tp4718508p4722406.html
> Sent from the Haxe mailing list archive at Nabble.com.
>


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: haxe http server?

John Plsek
In reply to this post by slenkar
yes and yes

On 13 March 2010 01:40, slenkar <[hidden email]> wrote:

is it possible to run an http server on a computer that doesnt take over port
80?

Can flash post http requests to other ports than 80?
--
View this message in context: http://n2.nabble.com/haxe-http-server-tp4718508p4722406.html
Sent from the Haxe mailing list archive at Nabble.com.

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: haxe http server?

Nicolas Cannasse
In reply to this post by blackdog-2
> If haxe had a standalone production quality neko
> server which could be proxied behind nginx/lighttpd it would open lot's
> of opportunities to use haxe, I'm tempted to do it, but for the moment,
> nodejs fills this space for me.

It exists already, and it's called Tora (http://lib.haxe.org/p/tora)

Best,
Nicolas

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: haxe http server?

slenkar
In reply to this post by blackdog-2
thanks blackdog, some very useful information there
Reply | Threaded
Open this post in threaded view
|

Re: haxe http server?

blackdog-2
In reply to this post by Nicolas Cannasse

Madrok, has written a full http server in haxe, but a full server has
never been a requirement for me. I want to be able to execute code based
on urls, the other stuff is real webserver stuff and best left to the
web server - and it's full and massive configuration options. That's how
i'd do it even if i have a choice not to. I use nginx for webserverish
stuff and proxy to nodejs (or whatever) for processing application
server requests.

Thus, tora  with http 1.1 parser and multipart upload would make it
generally useful as an application server that would cover most of my
use cases. It could be that Madrok's parser and upload could be hijacked
for this purpose.

bd



On Fri, 2010-03-12 at 17:33 +0100, Nicolas Cannasse wrote:

> > Why go 95% of the way doing a multi threaded server, and still tying it
> > to a custom Apache mod?? Why not proxy an http request directly. It's a
> > lot more flexible, gets rid of apache C mod code and make it easy for
> > any other server to use (as well as standalone) using it's native proxy
> > functionality.
>
> You can access it directly from other applications by using the
> tora.Protocol api.
>
> As for adding http, the reason we didn't did it is that if you go this
> way you might need to add the whole configuration possibilities of
> apache such as url rewrite rules, http authentification, but also be
> able to stream static files in a efficient manner. And I'm not talking
> about https here...
>
> But it's clearly possible to contribute this kind of extension to tora,
> don't hesitate to ask me if you have some questions about it.
>
> Best,
> Nicolas


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: haxe http server?

Ron Wheeler
In reply to this post by blackdog-2
blackdog wrote:

> Unless nekotools server has been upgraded in recent years it's not
> suitable for a live server (based on a thread I had with Nicolas,
> probably 2 years ago).
>
> I think haxe sorely misses a production quality native server for neko
> that comes in the distribution. The closest is probably Madrok's server
> - which I think is on google code in the caffeine-hx project.
>
> For those interested in a highly scalable, non apache, non neko
> solution, my hxNode (http://www.github.com/blackdog66/hxNode) project
> provides wrappers to node.js (http://www.nodejs.org). Although this is a
> moving target API wise at the moment (I need to update my wrappers)
> nodejs, imo, nodejs provides the best standalone server available to
> haxe right now.
>
> <rant>why in 2010 people are still embedding runtimes into apache I'll
> never know.</rant> If haxe had a standalone production quality neko
> server which could be proxied behind nginx/lighttpd it would open lot's
> of opportunities to use haxe, I'm tempted to do it, but for the moment,
> nodejs fills this space for me.
>  
It is probably because in a production environment, your HTTP server is
probably Apache (80% are) and Apache owns port 80 so you have to reach
Neko through Apache if you want to be sure that the visitor's firewall
will let the client application get to a port on your server since many
companies control outgoing port access.

Ron
 

> bd
>
>
> On Fri, 2010-03-12 at 11:47 +0100, Andreas Söderlund wrote:
>  
>> That's the command I'm using for a (non-apache) web server in
>> haxigniter/neko. It's working very well. The quickstart page gives
>> some more instructions:
>> http://wiki.github.com/ciscoheat/haxigniter/quick-start
>>
>> /Andreas
>>
>> On Fri, Mar 12, 2010 at 12:17 AM, Randy Stauner
>> <[hidden email]> wrote:
>>         what about 'nekotools server' ?
>>        
>>        
>>        
>>         On Thu, Mar 11, 2010 at 3:50 PM, Cauê Waneck
>>         <[hidden email]> wrote:
>>                 Actually for what I've seen at haXigniter, there is an
>>                 option to run a pure (I think) neko-based web server.
>>                 But I never looked into its source code.
>>
>>
>>
>> --
>> haXe - an open source web programming language
>> http://haxe.org
>>    
>
>
>  


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: haxe http server?

Benjamin Dasnois
What blackdog meant is that there are several "reverse proxies"
existing (such as  nginx) that can be used as a front-end to send
request to the appropriate server all through port 80 (from an
external point of view).

On Sat, Mar 13, 2010 at 4:04 PM, Ron Wheeler
<[hidden email]> wrote:

> blackdog wrote:
>>
>> Unless nekotools server has been upgraded in recent years it's not
>> suitable for a live server (based on a thread I had with Nicolas,
>> probably 2 years ago).
>>
>> I think haxe sorely misses a production quality native server for neko
>> that comes in the distribution. The closest is probably Madrok's server
>> - which I think is on google code in the caffeine-hx project.
>>
>> For those interested in a highly scalable, non apache, non neko
>> solution, my hxNode (http://www.github.com/blackdog66/hxNode) project
>> provides wrappers to node.js (http://www.nodejs.org). Although this is a
>> moving target API wise at the moment (I need to update my wrappers)
>> nodejs, imo, nodejs provides the best standalone server available to
>> haxe right now.
>>
>> <rant>why in 2010 people are still embedding runtimes into apache I'll
>> never know.</rant> If haxe had a standalone production quality neko
>> server which could be proxied behind nginx/lighttpd it would open lot's
>> of opportunities to use haxe, I'm tempted to do it, but for the moment,
>> nodejs fills this space for me.
>
> It is probably because in a production environment, your HTTP server is
> probably Apache (80% are) and Apache owns port 80 so you have to reach Neko
> through Apache if you want to be sure that the visitor's firewall will let
> the client application get to a port on your server since many companies
> control outgoing port access.
>
> Ron
>
>> bd
>>
>>
>> On Fri, 2010-03-12 at 11:47 +0100, Andreas Söderlund wrote:
>>
>>>
>>> That's the command I'm using for a (non-apache) web server in
>>> haxigniter/neko. It's working very well. The quickstart page gives
>>> some more instructions:
>>> http://wiki.github.com/ciscoheat/haxigniter/quick-start
>>>
>>> /Andreas
>>>
>>> On Fri, Mar 12, 2010 at 12:17 AM, Randy Stauner
>>> <[hidden email]> wrote:
>>>        what about 'nekotools server' ?
>>>                                On Thu, Mar 11, 2010 at 3:50 PM, Cauê
>>> Waneck
>>>        <[hidden email]> wrote:
>>>                Actually for what I've seen at haXigniter, there is an
>>>                option to run a pure (I think) neko-based web server.
>>>                But I never looked into its source code.
>>>
>>>
>>>
>>> --
>>> haXe - an open source web programming language
>>> http://haxe.org
>>>
>>
>>
>>
>
>
> --
> haXe - an open source web programming language
> http://haxe.org
>



--
DASNOIS Benjamin
http://www.benjamindasnois.com

--
haXe - an open source web programming language
http://haxe.org