Erlang Mailing Lists

Author Message

<  Erlyweb mailing list  ~  OTP apps and erlyweb

Guest
Posted: Wed Feb 27, 2008 2:46 pm Reply with quote
Guest
Hi Guys

I am currently building an OTP app for caching/storing columnar data
(it uses mnesia as a backend). I would like to use it from within an
erlyweb app. Given that it is an OTP app with supervisor etc.. how
would I best run it with erlyweb/yaws et al..


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Post recived from mailinglist
Guest
Posted: Fri Feb 29, 2008 5:31 am Reply with quote
Guest
ErlyWeb and OTP are pretty orthogonal. ErlyWeb doesn't use any of the
OTP behaviors. The only component that uses it is the MySQL
dispatcher, which implements gen_server. I think the only thing you
have to do to follow OTP conventions is to hook Yaws and the MySQL
driver into your supervisor tree. You might also want to use OTP style
configuration files. I've never tried doing it, though.

On Wed, Feb 27, 2008 at 6:46 AM, Al <al@folknology.com> wrote:
>
> Hi Guys
>
> I am currently building an OTP app for caching/storing columnar data
> (it uses mnesia as a backend). I would like to use it from within an
> erlyweb app. Given that it is an OTP app with supervisor etc.. how
> would I best run it with erlyweb/yaws et al..
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Post recived from mailinglist
Guest
Posted: Fri Feb 29, 2008 12:39 pm Reply with quote
Guest
On Feb 27, 9:46 am, Al <a...@folknology.com> wrote:
> I would like to use it from within an
> erlyweb app. Given that it is an OTP app with supervisor etc..

Just thought I should mention that the path of least resistance might
be to turn that inside-out. Yaws is designed to run embedded:

http://yaws.hyber.org/embed.yaws

and you can always use erl -remsh to connect to it in order to get at
the nifty erlyweb command-line.

Another approach is to just run your app and your web interface in two
distinct nodes that talk via rpc. Since this is erlang, the effort
involved in doing that is somewhere around zero.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Post recived from mailinglist
Guest
Posted: Fri Feb 29, 2008 4:06 pm Reply with quote
Guest
On Feb 29, 2008, at 7:39 AM, nubgames@gmail.com wrote:

>
> On Feb 27, 9:46 am, Al <a...@folknology.com> wrote:
>> <snip>
<snip>
> Another approach is to just run your app and your web interface in two
> distinct nodes that talk via rpc. Since this is erlang, the effort
> involved in doing that is somewhere around zero.

+1 to that. That's the approach I'm taking with my projects. Once I
get it a bit further along virtuerl should help with this kind of
deployment.

--Kevin
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Post recived from mailinglist
Guest
Posted: Fri Feb 29, 2008 5:37 pm Reply with quote
Guest
On Feb 29, 4:05 pm, "Kevin A. Smith" <ke...@hypotheticalabs.com>
wrote:
> On Feb 29, 2008, at 7:39 AM, nubga...@gmail.com wrote:
>
>
>
>
>
> > On Feb 27, 9:46 am, Al <a...@folknology.com> wrote:
> >> <snip>
> <snip>
> > Another approach is to just run your app and your web interface in two
> > distinct nodes that talk via rpc. Since this is erlang, the effort
> > involved in doing that is somewhere around zero.
>
> +1 to that. That's the approach I'm taking with my projects. Once I
> get it a bit further along virtuerl should help with this kind of
> deployment.
>
> --Kevin
>
>

Thanks guys

This looks like a interesting approach (although I will also look at
embedding yaws to make deployment simpler). Is there any performance
hit by running in 2 distinct nodes as opposed to a single node and
rpc'ing between them?

regards
Al
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Post recived from mailinglist
Guest
Posted: Fri Feb 29, 2008 6:24 pm Reply with quote
Guest
> Thanks guys
>
> This looks like a interesting approach (although I will also look at
> embedding yaws to make deployment simpler). Is there any performance
> hit by running in 2 distinct nodes as opposed to a single node and
> rpc'ing between them?
>
> regards
> Al

The setup I use is to start yaws from command line using the -sname
and -runmod parameters. To do admin stuff, I ssh to the box and run
"erl -remsh $Yaws ..." to get a shell right in the Yaws server. I even
created a util function like this one

deploy() ->
os:cmd("svn up [path]"),
erlyweb:compile(Path, Opts).

So when I check in new code I just ssh, start a remote Erlang shell,
and call deploy(). It's pretty easy.

Yariv

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Post recived from mailinglist

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum