Jetpack javascript based webserver

16 views
Skip to first unread message

dnf

unread,
Jul 1, 2009, 1:29:49 PM7/1/09
to mozilla-labs-jetpack
It's kinda feature request :) It would be cool to have webserver in
jetpack, that listens for HTTP requests on some port(like in POW
addon). When request is catched, the handler fires. For example:

jetpack.webserver.onRequest = function(http_request_body, http_headers)
{...}

It would be very usefull for online gaming, for peer to peer
connections, like in Adobe Stratus+Flash Player 10. It may be used for
any kind of server push notifications.

David Dahl

unread,
Jul 2, 2009, 3:06:25 AM7/2/09
to mozilla-labs-jetpack
That is actually not too difficult to do as we already have httpd.js:
https://developer.mozilla.org/En/HTTP_server_for_unit_tests

Aza

unread,
Jul 2, 2009, 12:17:08 PM7/2/09
to mozilla-la...@googlegroups.com
Interesting.

What are some possible use cases for this?

-- aza | ɐzɐ --

dnf

unread,
Jul 4, 2009, 10:05:27 AM7/4/09
to mozilla-labs-jetpack
Aza, with this webserver we need minimum of server side code to
provide interaction between users. All functionality we may implement
using only javascript. It may be messaging application or simple game
like chess. Or something big and complex like Opera Unite service.

David, could you provide me with references to working samples? I
tried to use code from httpd.js within jetpack code with no success.

On 2 июл, 20:17, Aza <aza...@gmail.com> wrote:
> Interesting.
>
> What are some possible use cases for this?
>
> -- aza | ɐzɐ --
>

Steve

unread,
Jul 4, 2009, 11:02:34 AM7/4/09
to mozilla-labs-jetpack
Hi All,

It's kinda funny and coincidental that I joined this group yesterday
precisely to know whether something like what is being discussed can
be done.

The use case that got me thinking about this is the possibility of p2p
social networking. For instance, create a simple twitter like page/
application running in your browser, working p2p, without having to
dependent on twitter servers ...or serving up a personal facebook-
like application, again p2p.

The implications on things like file-sharing, anonymous messaging/
browsing (by say proxying through peer-node a la freenet/turtle p2p)
are quite large.

I'll admit I am talking in the air right now and I have not understood
the complexities involved but i think the basic logic is sane. If we
can have the ability to serve our own web pages from within our
browser, we can break from centralization (and lock-in/silos) of web
services.

cheers,
- steve
Reply all
Reply to author
Forward
0 new messages