From: Neil Baylis
Subject: Remote lambda ? RPC?
Date: 
Message-ID: <43986b56-767e-4055-b3cd-cdc45fb552b1@p2g2000prf.googlegroups.com>
What's my best option for getting some kind of RPC or other
distributed processing in CL?

I'm thinking of something along the lines of Erlang or Termite, but it
does not need to be exactly like them. I think what would be ideal
would be a way of serializing a closure, sending it to another
computer where it would execute, and some way of getting a result back
(ideally, as a return value ;-) But I'm not even sure whether I want
synchronous or asynchronous at the moment.

This is for a new project using multiple computers to generate music
under the control of a master which will also have the UI. The "slave"
computers will just be synthesizing sounds using a P2C2E.

Thanks for any advice.

I would be using ccl and/or sbcl, if it makes any difference.

Neil Baylis

From: Kenneth Tilton
Subject: Re: Remote lambda ? RPC?
Date: 
Message-ID: <49b9f71d$0$22511$607ed4bc@cv.net>
Neil Baylis wrote:
> What's my best option for getting some kind of RPC or other
> distributed processing in CL?
> 
> I'm thinking of something along the lines of Erlang or Termite, but it
> does not need to be exactly like them. I think what would be ideal
> would be a way of serializing a closure, sending it to another
> computer where it would execute, and some way of getting a result back
> (ideally, as a return value ;-) But I'm not even sure whether I want
> synchronous or asynchronous at the moment.
> 
> This is for a new project using multiple computers to generate music
> under the control of a master which will also have the UI. The "slave"
> computers will just be synthesizing sounds using a P2C2E.
> 
> Thanks for any advice.

I do this all the time. Where's the problem?

Code is data, read, print-readly, eval, sockets...something like that.

hth, kzo
From: Neil Baylis
Subject: Re: Remote lambda ? RPC?
Date: 
Message-ID: <ad713b89-939e-447c-9694-42f5a511b5d8@r10g2000prf.googlegroups.com>
On Mar 12, 11:03 pm, Kenneth Tilton <·········@gmail.com> wrote:
> Neil Baylis wrote:
> > What's my best option for getting some kind of RPC or other
> > distributed processing in CL?
>
> > I'm thinking of something along the lines of Erlang or Termite, but it
> > does not need to be exactly like them. I think what would be ideal
> > would be a way of serializing a closure, sending it to another
> > computer where it would execute, and some way of getting a result back
> > (ideally, as a return value ;-) But I'm not even sure whether I want
> > synchronous or asynchronous at the moment.
>
> > This is for a new project using multiple computers to generate music
> > under the control of a master which will also have the UI. The "slave"
> > computers will just be synthesizing sounds using a P2C2E.
>
> > Thanks for any advice.
>
> I do this all the time. Where's the problem?
>
> Code is data, read, print-readly, eval, sockets...something like that.
>
> hth, kzo

Hmm, i tried your suggestion, but it doesn't work. Is there a typo?
Here's what I saw:

CL-USER> Code is data, read, print-readly, eval, sockets...something
like that.
> Error: Unbound variable: CODE
> While executing: CCL::TOPLEVEL-EVAL, in process listener(1).
> Type :GO to continue, :POP to abort, :R for a list of available restarts.
> If continued: Retry getting the value of CODE.
> Type :? for other options.
CL-USER>

Maybe I missed a parenthesee somewhere. Is that the singular of
parenthesis?

Neil
From: Giorgos Keramidas
Subject: Re: Remote lambda ? RPC?
Date: 
Message-ID: <8763iaage8.fsf@kobe.laptop>
On Fri, 13 Mar 2009 08:04:24 -0700 (PDT), Neil Baylis <···········@gmail.com> wrote:
> Maybe I missed a parenthesee somewhere. Is that the singular of
> parenthesis?

`Parenthesis' *is* the singular.  ITYM `parentheses' :)
From: Neil Baylis
Subject: Re: Remote lambda ? RPC?
Date: 
Message-ID: <6266592d-9528-4c74-a11d-60918bd82e6e@e1g2000pra.googlegroups.com>
On Mar 15, 9:40 am, Giorgos Keramidas <········@ceid.upatras.gr>
wrote:
> On Fri, 13 Mar 2009 08:04:24 -0700 (PDT), Neil Baylis <···········@gmail.com> wrote:
> > Maybe I missed a parenthesee somewhere. Is that the singular of
> > parenthesis?
>
> `Parenthesis' *is* the singular.  ITYM `parentheses' :)

Yes, I know. It was part of a misguided attempt to be funny.
From: ·············@gmail.com
Subject: Re: Remote lambda ? RPC?
Date: 
Message-ID: <d9987559-3b8a-45f6-80c5-f29e6e917e09@t3g2000yqa.googlegroups.com>
On Mar 12, 8:00 pm, Neil Baylis <···········@gmail.com> wrote:
> What's my best option for getting some kind of RPC or other
> distributed processing in CL?
>
> I'm thinking of something along the lines of Erlang or Termite, but it
> does not need to be exactly like them. I think what would be ideal
> would be a way of serializing a closure, sending it to another
> computer where it would execute, and some way of getting a result back
> (ideally, as a return value ;-) But I'm not even sure whether I want
> synchronous or asynchronous at the moment.
>
> This is for a new project using multiple computers to generate music
> under the control of a master which will also have the UI. The "slave"
> computers will just be synthesizing sounds using a P2C2E.
>
> Thanks for any advice.
>
> I would be using ccl and/or sbcl, if it makes any difference.
>
> Neil Baylis

Neil,

Look at an old post of mine here where I outline something simple I
did:

http://article.gmane.org/gmane.lisp.steel-bank.general/1036

Glenn
From: Neil Baylis
Subject: Re: Remote lambda ? RPC?
Date: 
Message-ID: <b6d98bd0-208c-4c69-8dbd-59a7e0cac866@k36g2000pri.googlegroups.com>
On Mar 13, 2:28 am, ·············@gmail.com wrote:
> On Mar 12, 8:00 pm, Neil Baylis <···········@gmail.com> wrote:
>
>
>
> > What's my best option for getting some kind of RPC or other
> > distributed processing in CL?
>
> > I'm thinking of something along the lines of Erlang or Termite, but it
> > does not need to be exactly like them. I think what would be ideal
> > would be a way of serializing a closure, sending it to another
> > computer where it would execute, and some way of getting a result back
> > (ideally, as a return value ;-) But I'm not even sure whether I want
> > synchronous or asynchronous at the moment.
>
> > This is for a new project using multiple computers to generate music
> > under the control of a master which will also have the UI. The "slave"
> > computers will just be synthesizing sounds using a P2C2E.
>
> > Thanks for any advice.
>
> > I would be using ccl and/or sbcl, if it makes any difference.
>
> > Neil Baylis
>
> Neil,
>
> Look at an old post of mine here where I outline something simple I
> did:
>
> http://article.gmane.org/gmane.lisp.steel-bank.general/1036
>
> Glenn

Thanks Glenn, looks pretty close to what I need.

Neil
From: Jason
Subject: Re: Remote lambda ? RPC?
Date: 
Message-ID: <e849a6d3-a0dc-401d-927f-74066cd73978@s9g2000prg.googlegroups.com>
On Mar 12, 8:00 pm, Neil Baylis <···········@gmail.com> wrote:
> What's my best option for getting some kind of RPC or other
> distributed processing in CL?
>
> I'm thinking of something along the lines of Erlang or Termite, but it
> does not need to be exactly like them. I think what would be ideal
> would be a way of serializing a closure, sending it to another
> computer where it would execute, and some way of getting a result back
> (ideally, as a return value ;-) But I'm not even sure whether I want
> synchronous or asynchronous at the moment.
>
> This is for a new project using multiple computers to generate music
> under the control of a master which will also have the UI. The "slave"
> computers will just be synthesizing sounds using a P2C2E.
>
> Thanks for any advice.
>
> I would be using ccl and/or sbcl, if it makes any difference.
>
> Neil Baylis

Here's a trivial RPC example from some code that I'm toying with. This
example uses a socket message queue to send string data from one
endpoint to another.

CL-USER> (setf *out* (chomoko:create-out-queue "localhost" 1234))
#<CHOMOKO::CHOMOKO-QUEUE #x2056F46E>
CL-USER> (setf *in* (chomoko:create-in-queue 1234))
#<CHOMOKO::CHOMOKO-QUEUE #x2057E586>
CL-USER> (chomoko:send-message *out* '(lambda (x) (* x x)))
0
CL-USER> (let ((m (chomoko:get-message *in* 2)))
	   (let ((l (read-from-string m)))
	     (eval `(,l 5))))
25
CL-USER>

-Jason