[erlang-questions] Help wanted: very specific web server that perhaps doesn't have to be a web server

Ivan Uemlianin ivan@REDACTED
Thu Nov 17 14:39:08 CET 2011


Dear All

Sorry for the verbose subject line.

I'm working on a social-networking web application, part of which is 
written in erlang (it's part django and part erlang, with nginx in 
front).  I'm refactoring the erlang to give it a better OTP application 
structure.  It'll break down something like this:

- webserver (currently mochiweb)
- datastore for "state"
- datastore for "archive"

Now, there's a single GET request url that I'd like to run in a separate 
application.  The service that this url provides is completely separate 
(e.g., could exist on its own; we'd want it to fail separately; provides 
service to other webapps).  So:

- general webserver (currently mochiweb)
- datastore for "state"
- datastore for "archive"
- thing for special web service

The special web service responds to GET requests to a particular url. 
The path and parameters are always the same.  Like this:

     http://eg.com/special_service/?a=this&b=that&c=other

Nginx will catch these requests and send them to the thing, and I have 
an erlang function that processes the parameters and returns a result. 
All I need is something that will (a) take the parameters from the 
request and give them to the function, and (b) take the function 
results, wrap them in an http response and send them back to nginx.

This thing for special web service could easily be Mochiweb (and that's 
what I'll be working with for now).  I wondered if there might be 
something simpler (inets?) which more narrowly fits my minimal 
requirements (this might be partly an nginx question --- can nginx pass 
on GET parameters to a running process and return the result to the 
original requester?  I'll be looking into that too).

Sorry if this is too hand-wavy for sensible answers.

With thanks and best wishes

Ivan


-- 
============================================================
Ivan A. Uemlianin
Speech Technology Research and Development

                     ivan@REDACTED
                      www.llaisdy.com
                          llaisdy.wordpress.com
                      www.linkedin.com/in/ivanuemlianin

     "Froh, froh! Wie seine Sonnen, seine Sonnen fliegen"
                      (Schiller, Beethoven)
============================================================



More information about the erlang-questions mailing list