[Oz] Distributed webserver design question

Erik Klintskog erik at sics.se
Wed May 3 16:59:02 CEST 2000


Garibald Hennes wrote:

> Hello Oz'ers ;) ,
>
> I'm currently looking into ideas to implement a distributed webserver in
> oz.
>
> The main design emphasis at this time is to ensure that the front-end
> (i.e. computer+program) which accepts the http-request has as little
> workload as possible. Everything should be delegated to back-end
> processes,
> working on other machines. My expectation is that this will scale well,
> even if the backend processes burn loads of computing cycles per
> connection.
>
> How could this be intelligently handeled by oz?
>
> My current idea is to have the frontend publish a port, on which the
> backends put a var to
> signal readiness. The frontend then puts a proxy-socket with a new
> connection on the first
> var it finds in the port. The backend process handles the connection (a
> http/1.1  persistant
> connections), possibly in a thread, and puts a new var in the frontend's
> port whenever
> it is ready to serve another connection.
>

Does the backends and the frontend communicate through sockets
or distributed Mozart ports?


>
> A few questions arise:
> - is this efficient? Even though i read most things about oz, and have
> some
>   programming experience with it, I do not know it intimately enough to
> really
>   decide this confidently.
> - how does the oz emulator handle possibly tens of thousands of open
> sockets,
>   even if it has nothing else to do?

It will run out of file descriptors rather fast, somwhere around 40 - 60 fd's

is what Mozart can handle by default.

>
> - could I just make the socket stationary in the frontend and then give
> that
> to the
>   backend?

You make the socket stationary by puting it behind a Mozart port?
All commication betwen the Webserver and the webclients will be
done by the frontend process?

/Erik


-
Please send submissions to users at mozart-oz.org
and administriva mail to users-request at mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.





More information about the mozart-users mailing list