On Tuesday 17 May 2005 08.35, Michael McDaniel wrote:
...
>^^^^^^ I presently have a simple web interface that shows appmod
> versions thusly...
>
> <erl>
>
> out(A) ->
> [
> { ehtml, [ {p, [], dbexp:getRevResponse()} ] } ,
> { ehtml, [ {p, [], expmaster:getRevResponse()} ] } ,
> { ehtml, [ {p, [], filewatch:getRevResponse()} ] } ,
> { ehtml, [ {p, [], mxml:getRevResponse()} ] } ,
> { ehtml, [ {p, [], odbcsrv:getRevResponse()} ] }
> ].
>
> </erl>
>
> I am planning on making a control application that would send
> control messages to the application. The control application
> will probably be mapped as an appmod.
>
> Perhaps something like that would work for you?
My problem is not to execute functions in my .beam files (that's just a
matter of providing the right -pa argument to the 'yaws' startup
script), it is to get distributed Erlang running to communicate with my
other _running_ nodes.
I think I need to do something like this :
<erl>
out(A) ->
T = rpc:call('incomingproxy@...',
transaction_layer, debug_show_transactions, []),
Output = io_lib:format("Ongoing transactions : ~p", [T]),
{ehtml, [Output]}.
</erl>
This approach actually works, it just requires me to do lots of changes
to the 'yaws' startup script to start Erlang with -name (instead of
-sname) and -prodo_dist inet_ssl etc. I would like to avoid having to
maintain private patches for such a thing by finding a way to solve my
problem that the Yaws community likes, so that I can make patches that
have a chance of being merged into the official distribution. Perhaps
there is another solution already at hand, which I just don't realize.
/Fredrik

On Mon, May 16, 2005 at 05:02:33PM +0200, Fredrik Thulin wrote:
> Hi
<znip>
>
> I see only one two alternatives to this approach :
>
> 1) Run Yaws in embedded mode from within my applications. I would
> prefer not to, since I don't want to re-invent the wheel with
> regards to Yaws configuration management.
> 2) Talk to my applications using a TCP socket. I would like to avoid
> this to not have to re-invent RPC and the necessary authentication
> of it.
>
> Have I missed some other way of using Yaws to write a web interface for
> another (Erlang) application?
>
> /Fredrik
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I presently have a simple web interface that shows appmod versions
thusly...
<erl>
out(A) ->
[
{ ehtml, [ {p, [], dbexp:getRevResponse()} ] } ,
{ ehtml, [ {p, [], expmaster:getRevResponse()} ] } ,
{ ehtml, [ {p, [], filewatch:getRevResponse()} ] } ,
{ ehtml, [ {p, [], mxml:getRevResponse()} ] } ,
{ ehtml, [ {p, [], odbcsrv:getRevResponse()} ] }
].
</erl>
I am planning on making a control application that would send
control messages to the application. The control application
will probably be mapped as an appmod.
Perhaps something like that would work for you?
~Michael

Community

Help

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

I agree to receive quotes, newsletters and other information from sourceforge.net and its partners regarding IT services and products. I understand that I can withdraw my consent at any time. Please refer to our Privacy Policy or Contact Us for more details