[erlang-questions] How would you architecture a ...

Mark Selby mark@REDACTED
Sun May 10 23:13:39 CEST 2009


... web server which allows different hostnames to have their own mnesia 
database?

I've been looking at Yaws because I can use erlyweb and erlydb to an 
advantage.

The idea of using an Erlang "node" for each hostname seems the favourite 
at the moment as that allows "nodes" to have their own Mnesia schema (I 
think and hope), and other machines can be added, probably ultimately 
leading to the original yaws server becoming a request proxy to the 
different "servers" which are doing the grunt.

So that leads to a front end which is just doing a lookup on hostname 
and passing the request on to the appropriate "node", and relaying 
whatever it gets back to the client.

There are only three "controllers" that my app needs, and none are that 
complicated. Appmods or Controllers?

How do I keep a connection open in Yaws to minimize response times? For 
example, to a remote imap server?

I'm so impressed with Erlang and Mnesia. I knew there was a reason to 
learn C and assembler all those moons ago! They make Erlang seem more 
familiar than anything else I've used.

Thanks, btw, for any helpful thoughts.

Mark.




More information about the erlang-questions mailing list