[erlang-questions] Re: how to scale into the cloud using process? example computing simple average

Kid Erlang kiderlang@REDACTED
Sat May 30 10:08:18 CEST 2009


hi everyone.  i am still confused?  is there a good book on ERLANG to read
on how to do multi process cloud scaling?

i do not understand your answers

i want to scale into the cloud to generate bigger sets of numbers and be
able to run multiple copies of my scripts which already run in a collection.

how do I get erlang to communicate across different computers in the cloud?
do I need to use sockets?  sockets are confusing.  right now I am using
pipes for my scripts which is very easy.  I can't figure out how to do pipes
in erlang.  I create process and try to write to its pipe but then it
doesn't seem to do anything.

here is my source code program:

-module(number_adder).
-compile(export_all).

add_up_numbers(NumberArray)->
  [Number|OtherNumbers]=NumberArray,add_number(Number,OtherNumbers).
add_number(Number, OtherNumbers) ->
  [NextNumber|StillToBeAdded]=OtherNumbers,
  spawn(fun()->number_adder(Number, NextNumber)end),
  receive ReturnValue-> ReturnValue+add_up_numbers(StillToBeAdded)end.
number_adder(Number1,Number2)->Number1+Number2.

try it out it just hangs for some reason and I can't figure out why.  I am
trying to add up the numbers in paralell

- Kid Erlang

On Wed, May 27, 2009 at 12:09 PM, Steve Davis <
steven.charles.davis@REDACTED> wrote:

>
>
> On May 26, 4:58 am, Ulf Wiger <ulf.wi...@REDACTED> wrote:
> > Steve Davis wrote:
> > > I'll have a stab,,,
> >
> > > "cloud" the mechanism by which application processing and data is
> > > _automatically distributed_ across hardware resources to meet user
> > > demand.
> >
> > > ...so I'm not sure that one exists.
> >
> > > /s
> >
> > So, in the old days, when computers were physical, steam-powered
> > beasts that you could actually see and touch, I believe this
> > would have been called a 'cluster'.
> >
>
> On May 26, 4:58 am, Ulf Wiger <ulf.wi...@REDACTED> wrote:
> >
> > So, in the old days, when computers were physical, steam-powered
> > beasts that you could actually see and touch, I believe this
> > would have been called a 'cluster'.
> >
>
> Perhaps the definition should read "to meet unlimited user demand".
>
> I suspect that the big issue with doing this is probably not the
> processing part but the (persistent) data part.
>
> BigTable and S3 solve this by accepting "eventual
> consistency" (generally a few seconds but can be more). For many
> applications this is enough (e.g. google search), since the now-ness/
> consistency of the data is not mission critical.
>
> Where it is mission critical, even a clustered transactional/
> relational layer will eventually suffer unacceptable performance
> degradation.
>
> I'm not sure I have seen a solution to that, and I'm not even sure
> that it is physically possible. Of course, just because I personally
> cannot see how, that doesn't mean it isn't possible.
>
> /s
>
> ________________________________________________________________
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org
>
>


More information about the erlang-questions mailing list