I have an Erlang/OTP application which does some business logic. It is written in Erlang mostly for fault-tolerance, because I can easily restart one of the crashed components of the system (high uptime is the most important requirement). Each of its components does some sort of specific "parallel" computations.
As a result of one working cycle the application produces a list of values. Let's call this Erlang/OTP application a "back-end".
This Erlang/OTP application would also use a PostgreSQL server to store the results in the persistent storage and to store additional meta-information needed for its computations (not implemented yet).
Next I need to add a front-end to this Erlang/OTP application - a simple web-based solution which can serve to a web user: accept a request for computations from him/her, ask the back-end to do the computations and give the user back the result from the back-end.
There is no scalability requirement, I think that the maximum number of users per day can be no more than 1000.
So my current task now is to implement a common front-end for my back-end Erlang/OTP application (common means I have a typical use case: visit the site, register, log-in, use the app, get the result on a nice ajax'y looking web-page, log-out).
On one side, I know that code reuse can save me a lot of time: for example with Ruby on Rails I can get user authentication, password storage, ajax interfaces and a lot of other stuff for free.
On the other side I do not know anything about designing an application which comprises an Erlang/OTP + PostgreSQL db server back-end and a web-framework (RoR, Django, etc) as a front-end.
I lot of questions spring in my mind: Should Erlang/OTP and the web-framework use the same PostgreSQL database to share the result? What is the best way to send a computation request from the web-framework to the Erlang/OTP application and get it back? How do I supervise the PostgreSQL server - it is not covered by OTP's fault tolerance?
Generally speaking, I have a few heterogeneous software components and I want to build a working system from them (the 'chief' component is the Erlang/OTP application).
Where I should start with this task? Can you give me any advice or a hint which resources to read?
P.S. I have tried to read this and followed the links, but did not understand much.
UPD: I know that Chicago Boss and other Erlang web-frameworks do exist, but I doubt that any of them have such a mature environment, vibrant community and huge variability of different plugins and libraries like for example Ruby on Rails, Django or any PHP-based MVC framework. Right?
UPD2: Maybe I have to elaborate on this deeper: I also need the front-end to be as maintainable as possible. Doing it in Erlang means that I might face problems finding the right developers to maintain it; doing it in RoR,Django, etc. means I can easily find work force to maintain the front-end and to grow it.