Mnesia Web Interface for O&M and Customer Care

Inswitch Solutions - Erlang Evaluation erlang@REDACTED
Wed Dec 18 17:48:35 CET 2002


Hello Sean,

Many Thanks!

If I understand the idea, (please correct me if I am wrong in the
process description) erl pages are saved within Mnesia. When inets
receives an URL request, which is an “.esp” page, it calls “esp.erl”
which retrieves it from Mnesia. One question: how do we configure inets
to call “esp.erl” when receiving an URL request which is an “erl” page,
and where does “esp.erl” go (I suppose within “/cgi-bin/erl/” for
example)? 

Then, the retrieved erl page is converted into html, (by “esp.erl”?) and
shown to the web client who made the request. Now, if the returned page,
has a form which has a database lookup option, when the client will
submit the form, and a second request for a new URL, with certain
parameters submitted (about the data to be lookup into Mnesia, like an
account number, for example). This time, “esp.erl” will retrieve a new
page, and with the additional data entered it should make the database
lookup, and dynamically create an html page with the response data, from
Mnesia. Question: where does the logic that makes the mnesia database
lookup and data retrieval go? Within the “.esp” page, or within the
“esp.erl” ?


Regards,

daniel

INswitch Solutions
T. 5989-9667353


-----Mensaje original-----
De: owner-erlang-questions@REDACTED
[mailto:owner-erlang-questions@REDACTED] En nombre de Sean Hinde
Enviado el: miércoles, 18 de diciembre de 2002 9:22
Para: 'Inswitch Solutions - Erlang Evaluation';
erlang-questions@REDACTED
Asunto: RE: Mnesia Web Interface for O&M and Customer Care

Hi,
 
Inets works fine for the sort of O&M activity you are talking about. We
use
a modified version of Joe's Erlang Server Pages (esp.erl attached) which
stores the page templates in mnesia itself.
 
The idea is to have an erlang callback using the mod_erl inets mechanism
which can pass data into the esp page to make a dynamic page.
 
a trivial example for http://localhost:8080/cgi-bin/erl/test/page
<http://localhost:8080/cgi-bin/erl/test/page>  would be:
 
-module(test).
-export([page/2]).
 
page(_,_) ->
    Dynamic_content = "Sean",
    esp:expand("test_page.esp", [{"my_data", Dynamic_content}]).
 
test_page.esp could look something like:
 
<html>
 <body>
  Name: ${my_data}
 <body/>
<html/>
 
This is what we do for all our config pages including customer
provisioning
for a full blown VPN IN service.
 
Sean

-----Original Message-----
From: Inswitch Solutions - Erlang Evaluation [mailto:erlang@REDACTED]
Sent: 17 December 2002 22:53
To: erlang-questions@REDACTED
Subject: Mnesia Web Interface for O&M and Customer Care



Hello,

 

We are implementing a Mnesia database, for mobile prepaid accounts. Now,
we
need to implement both O&M and customer's care graphical modules. And we
would prefer them to be web based interfaces. The web interface would be
used to retrieve and update prepaid accounts data from the Mnesia
accounts
database. How would you recommend us to make the web to mnesia
interface? Is
there anything already implemented, that would help, as inets?    

 

Regards,

 

daniel

 

Daniel Fernandez

 

 

INswitch Solutions

T. 5989-9667353

 




NOTICE AND DISCLAIMER:
This email (including attachments) is confidential.  If you have
received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing
any
reliance upon its contents.  We cannot accept liability for any breaches
of
confidence arising through use of email.  Any opinions expressed in this
email (including attachments) are those of the author and do not
necessarily
reflect our opinions.  We will not accept responsibility for any
commitments
made by our employees outside the scope of our business.  We do not
warrant
the accuracy or completeness of such information.

    





More information about the erlang-questions mailing list