From: Andrei
Subject: Lisp interoperability & other questions
Date: 
Message-ID: <x_z2e.26863$hU7.6209@newssvr33.news.prodigy.com>
Hi all,





As I mentioned in my earlier post I came here from the java world. This
group was very helpful in getting me off the ground. While doing a lot of
lisp reading lately I realized that when it comes to solving hard problems,
java has its limits. However, java (and all the freeware and libraries that
comes with it) is more suitable (or so I think) for implementing a
multithreaded distributed application. And here I'm thinking ways to connect
to it (Web Services, JMS, CORBA, RMI, HTTP etc, these being interfaces you
expose from your server based app), and common services you can develop
(wrapping freeware). things like sophisticated logging services, thread
pools, db connection pooling or simply making remote calls using reflection
(in a separate thread just to mimic asynchronous communication if you will).



All these have some pragmatic twist to it. If you want to develop a server
side application (middleware like or task oriented), you just can't ignore
the technologies used out there. I am not sure if lisp has these
capabilities, I just don't know. And if it does, are they free?



As a lisp beginner, one of the problems I am struggling with is the limited
number of experienced lisp developers I have accessed to. This post is my
only source of information. As you can imagine I don't do lisp at work and
there is nobody else I can ask to set me straight.



For instance, all the lisp books I've skimmed through go right into
describing the lisp syntax and maybe show how to build small, task focused
lisp applications. I found nothing taking about enterprise applications.

I have a few questions at this point:



-         Can you develop a distributed lisp application? If so, how do you
start, initialize, and gracefully stop a lisp process? How do you get a
handle on a remote process? What is the communication protocol between
different lisp processes?

-         How do you write a multithreaded lisp application? What are the
synchronization mechanisms?

-         One other question I am very interested in is how do you do lisp
web development? What web server do you use? What is the paradigm? What are
the programming practices for separating the business logic from the
presentation?



Most of these questions are rooted in my panic that I haven't found (until
now) any literature even touching on these subjects. Any pointers would be
appreciated.



On a different note, I have already developed a distributed RMI framework.
At its core it is a pretty capable naming service. Next to giving away
remote references, it also has the capability of managing the life cycle of
any number of remote processes on any number of machines (you can add a new
machine to it at runtime and it just takes over it and starts using it),
fail over and all.



Now, this is just a framework, the plumbing if you will of a future
application that eventually will do something meaningful. I just don't want
to throw it away. I've invested too much time already. Besides I think it
would be great to marry these two technologies (java and lisp) and use what
each one of them is best at, in tandem. I may change my mind. Maybe lisp is
better in all respects. The fact is, my lisp knowledge at this point doesn't
allow me to make such a determination. I need to read more.



What I am thinking is, for hard to solve problems why not use lisp? Build a
stand alone lisp application that will be distributed by plugging it into
this already existing RMI framework (for higher throughput, or for splitting
computational intensive task into multiple subtasks on different machines).



-         The question now is how do you call lisp from java (JNI might be a
way)?

Not the other way around. I know that's possible but that's not what I am
interested in. And if it's possible to call lisp from java, what is that
lisp application going to be? Do I need to create a new lisp process? How is
that going to work? I am not clear at all here.



At the end I just want to apologize for going on and on and making this such
a long story.



andrei

From: Paolo Amoroso
Subject: Re: Lisp interoperability & other questions
Date: 
Message-ID: <87br91jcn9.fsf@plato.moon.paoloamoroso.it>
"Andrei" <···········@yahoo.com> writes:

> java has its limits. However, java (and all the freeware and libraries that
> comes with it) is more suitable (or so I think) for implementing a
> multithreaded distributed application. And here I'm thinking ways to connect
> to it (Web Services, JMS, CORBA, RMI, HTTP etc, these being interfaces you

See these blog postings by Bill Clementson:

  CL to Java
  http://home.comcast.net/~bc19191/blog/040627.html

  CL to Java - Part 2
  http://home.comcast.net/~bc19191/blog/040703.html

  CL to Java - Part 3
  http://home.comcast.net/~bc19191/blog/040707.html

  CL and Java - Part 4
  http://home.comcast.net/~bc19191/blog/040711.html

  Another CL to Java option - Lisplets
  http://home.comcast.net/~bc19191/blog/040930.html

  Lisplets - more info from Rich Hickey
  http://home.comcast.net/~bc19191/blog/041001.html


> As a lisp beginner, one of the problems I am struggling with is the limited
> number of experienced lisp developers I have accessed to. This post is my
> only source of information. As you can imagine I don't do lisp at work and
> there is nobody else I can ask to set me straight.

You can learn a lot on Lisp with just Internet access.  I have been
following Lisp since 1990 or so, yet I met only 3-4 experienced
Lispers in person.  There are some Lisp user groups you may want to
get in touch with:

  Local Lisp User Groups
  http://lisp.tech.coop/Local


> -         How do you write a multithreaded lisp application? What are the
> synchronization mechanisms?

Here is a starting point:

  Threads
  http://cl-cookbook.sourceforge.net/process.html


> -         One other question I am very interested in is how do you do lisp
> web development? What web server do you use? What is the paradigm? What are

You may subscribe to the Lispweb mailing list, where such issues are
discussed:

  http://www.cliki.net/lispweb


Paolo
-- 
Why Lisp? http://lisp.tech.coop/RtL%20Highlight%20Film
Recommended Common Lisp libraries/tools (see also http://clrfi.alu.org):
- ASDF/ASDF-INSTALL: system building/installation
- CL-PPCRE: regular expressions
- UFFI: Foreign Function Interface
From: Raymond Toy
Subject: Re: Lisp interoperability & other questions
Date: 
Message-ID: <sxd4qetgg6i.fsf@rtp.ericsson.se>
>>>>> "Paolo" == Paolo Amoroso <·······@mclink.it> writes:

    Paolo> "Andrei" <···········@yahoo.com> writes:
    >> As a lisp beginner, one of the problems I am struggling with is the limited
    >> number of experienced lisp developers I have accessed to. This post is my
    >> only source of information. As you can imagine I don't do lisp at work and
    >> there is nobody else I can ask to set me straight.

    Paolo> You can learn a lot on Lisp with just Internet access.  I have been
    Paolo> following Lisp since 1990 or so, yet I met only 3-4 experienced
    Paolo> Lispers in person.  There are some Lisp user groups you may want to

Other than a coworker, I have never met ANY other Lisper in person.
It's all been via e-mail (and irc lately). A textbook and code to look
at is a great way to start.

Ray
From: Andrei
Subject: Re: Lisp interoperability & other questions
Date: 
Message-ID: <RGC2e.12629$ZB6.4644@newssvr19.news.prodigy.com>
"Raymond Toy" <···········@ericsson.com> wrote in message
····················@rtp.ericsson.se...
> >>>>> "Paolo" == Paolo Amoroso <·······@mclink.it> writes:
>
>     Paolo> "Andrei" <···········@yahoo.com> writes:
>     >> As a lisp beginner, one of the problems I am struggling with is the
limited
>     >> number of experienced lisp developers I have accessed to. This post
is my
>     >> only source of information. As you can imagine I don't do lisp at
work and
>     >> there is nobody else I can ask to set me straight.
>
>     Paolo> You can learn a lot on Lisp with just Internet access.  I have
been
>     Paolo> following Lisp since 1990 or so, yet I met only 3-4 experienced
>     Paolo> Lispers in person.  There are some Lisp user groups you may
want to
>
> Other than a coworker, I have never met ANY other Lisper in person.
> It's all been via e-mail (and irc lately). A textbook and code to look
> at is a great way to start.
>
> Ray
>

This must be a lonley world  :)
But if people do it, it means it's worth it.

andrei
From: Andrei
Subject: Re: Lisp interoperability & other questions
Date: 
Message-ID: <6MC2e.12631$ZB6.2927@newssvr19.news.prodigy.com>
"Raymond Toy" <···········@ericsson.com> wrote in message
····················@rtp.ericsson.se...
> >>>>> "Paolo" == Paolo Amoroso <·······@mclink.it> writes:
>
>     Paolo> "Andrei" <···········@yahoo.com> writes:
>     >> As a lisp beginner, one of the problems I am struggling with is the
limited
>     >> number of experienced lisp developers I have accessed to. This post
is my
>     >> only source of information. As you can imagine I don't do lisp at
work and
>     >> there is nobody else I can ask to set me straight.
>
>     Paolo> You can learn a lot on Lisp with just Internet access.  I have
been
>     Paolo> following Lisp since 1990 or so, yet I met only 3-4 experienced
>     Paolo> Lispers in person.  There are some Lisp user groups you may
want to
>
> Other than a coworker, I have never met ANY other Lisper in person.
> It's all been via e-mail (and irc lately). A textbook and code to look
> at is a great way to start.
>
> Ray
>


Just curious, what kind of apps or domain problems are you using lisp for?
Arey you using lisp for home grown projects you are trying to make money
with? Or is just writing lisp for passion?

andrei
From: Zach Beane
Subject: Re: Lisp interoperability & other questions
Date: 
Message-ID: <m34qesevdv.fsf@unnamed.xach.com>
"Andrei" <···········@yahoo.com> writes:

> Just curious, what kind of apps or domain problems are you using lisp for?
> Arey you using lisp for home grown projects you are trying to make money
> with? Or is just writing lisp for passion?

This came up last year, and there were a number of interesting
responses. Here's a link to the thread:

   http://groups-beta.google.com/group/comp.lang.lisp/browse_frm/thread/3fac04dbd0366b67/1b1eabbc7c8368b3#1b1eabbc7c8368b3

Telephony, database front-ends, non-Lisp code exploration, lots of Web
stuff, log analysis, and more.

Zach
From: jayessay
Subject: Re: Lisp interoperability & other questions
Date: 
Message-ID: <m3d5tfg2wl.fsf@rigel.goldenthreadtech.com>
Paolo Amoroso <·······@mclink.it> writes:

> "Andrei" <···········@yahoo.com> writes:
> 
> > java has its limits. However, java (and all the freeware and libraries that
> > comes with it) is more suitable (or so I think) for implementing a
> > multithreaded distributed application. And here I'm thinking ways toconnect
> > to it (Web Services, JMS, CORBA, RMI, HTTP etc, these being interfaces you

Paolo and others have given some good answers.  I just wanted to
assure you that the concern expressed here is misplaced.  I have done
all of the things you describe here and found the Common Lisp versions
far more capable as well as much simpler and a _lot_ easier than the
Java cases.  The cases of threads, CORBA and Web/HTTP in particular
were all _far_ simpler and more robust in CL than in Java.  Caveat: I
use a commercial Lisp (Allegro) where all this stuff is just there for
the taking.


/Jon

-- 
'j' - a n t h o n y at romeo/charley/november com
From: Andrei
Subject: Re: Lisp interoperability & other questions
Date: 
Message-ID: <gjW2e.27733$hU7.19698@newssvr33.news.prodigy.com>
"jayessay" <······@foo.com> wrote in message
···················@rigel.goldenthreadtech.com...
> Paolo Amoroso <·······@mclink.it> writes:
>
> > "Andrei" <···········@yahoo.com> writes:
> >
> > > java has its limits. However, java (and all the freeware and libraries
that
> > > comes with it) is more suitable (or so I think) for implementing a
> > > multithreaded distributed application. And here I'm thinking ways
toconnect
> > > to it (Web Services, JMS, CORBA, RMI, HTTP etc, these being interfaces
you
>
> Paolo and others have given some good answers.  I just wanted to
> assure you that the concern expressed here is misplaced.  I have done
> all of the things you describe here and found the Common Lisp versions
> far more capable as well as much simpler and a _lot_ easier than the
> Java cases.  The cases of threads, CORBA and Web/HTTP in particular
> were all _far_ simpler and more robust in CL than in Java.  Caveat: I
> use a commercial Lisp (Allegro) where all this stuff is just there for
> the taking.
>
>
> /Jon
>
> -- 
> 'j' - a n t h o n y at romeo/charley/november com

I see... I kind of had the feeling that what you are saying is true. My
concerns were mostly because I still don't have a clear picture as to how
all these pieces fit together. I know it will take me some time but I'll get
there.

It is good to know that you can do all these things before you invest a
certain amout of effort in switching form java to lisp. I am at the begining
of the process of learning the building blocks of the lisp language and I
can already see its power.

andrei
From: Andrei
Subject: Re: Lisp interoperability & other questions
Date: 
Message-ID: <GAW2e.27738$hU7.5528@newssvr33.news.prodigy.com>
"jayessay" <······@foo.com> wrote in message
···················@rigel.goldenthreadtech.com...
> Paolo Amoroso <·······@mclink.it> writes:
>
> > "Andrei" <···········@yahoo.com> writes:
> >
> > > java has its limits. However, java (and all the freeware and libraries
that
> > > comes with it) is more suitable (or so I think) for implementing a
> > > multithreaded distributed application. And here I'm thinking ways
toconnect
> > > to it (Web Services, JMS, CORBA, RMI, HTTP etc, these being interfaces
you
>
> Paolo and others have given some good answers.  I just wanted to
> assure you that the concern expressed here is misplaced.  I have done
> all of the things you describe here and found the Common Lisp versions
> far more capable as well as much simpler and a _lot_ easier than the
> Java cases.  The cases of threads, CORBA and Web/HTTP in particular
> were all _far_ simpler and more robust in CL than in Java.  Caveat: I
> use a commercial Lisp (Allegro) where all this stuff is just there for
> the taking.
>
>
> /Jon
>
> -- 
> 'j' - a n t h o n y at romeo/charley/november com

Are you using the professional or the Enterprise Allegro edition?

Thanks,

andrei
From: jayessay
Subject: Re: Lisp interoperability & other questions
Date: 
Message-ID: <m38y42fbrd.fsf@rigel.goldenthreadtech.com>
"Andrei" <···········@yahoo.com> writes:

> Are you using the professional or the Enterprise Allegro edition?

Enterprise.

/Jon

-- 
'j' - a n t h o n y at romeo/charley/november com
From: Alain Picard
Subject: Re: Lisp interoperability & other questions
Date: 
Message-ID: <87wtrmq217.fsf@memetrics.com>
"Andrei" <···········@yahoo.com> writes:

> I have a few questions at this point:

Okay.
> -         Can you develop a distributed lisp application? 
Yes... I've done so.

> If so, how do you
> start, initialize, and gracefully stop a lisp process? 
The same way as you do in any other language.  For example,
you could send it a signal, and have a handler catch that
signal and initiate some process termination action, to
clean everything up cleanly.

> How do you get a
> handle on a remote process? What is the communication protocol between
> different lisp processes?

Corba?  XMLRPC?  s-expressions over sockets?  UDP messages?
This is all up to you.


> -         How do you write a multithreaded lisp application? What are the
> synchronization mechanisms?

You need vendor specific APIs.  Synchronization mechanisms are typically
locks and wait functions.

> -         One other question I am very interested in is how do you do lisp
> web development? What web server do you use? What is the paradigm? What are
> the programming practices for separating the business logic from the
> presentation?

You can either have your HTTP server be "in-process", e.g. allegro server,
or cl-http (+ a few others I think) or just do the lispy bits, and
let something like Apache+mod_lisp do most of the rest of the HTTP for you.

If you need to emit some HTML, there are a lot of toolkits for generating
it programmatically: it's actually quite pleasant to use.

Doing the development is very nice; you hit pages on your browser,
and, in your emacs, you tweak the function rendering the page
and iterate between the two.  You never restart any processes
anywhere.  It's very productive.

As for MVC type constructs; I don't use such things (no need)
but there are some attempts in that direction; look up the web objects
in allegro serve and lisp server pages to write html+lisp "inside-out".

>
> Most of these questions are rooted in my panic that I haven't found (until
> now) any literature even touching on these subjects. Any pointers would be
> appreciated.

Don't panic.  It's all feasible, albeit with a lot less support and
polish than in the Java world.  What you gain in return is a sane
environment.  

I'll leave the rest of the questions to others with better informed
opinions.

Good luck!
-- 
It would be difficult to construe        Larry Wall, in  article
this as a feature.			 <·····················@netlabs.com>
From: Andrei
Subject: Re: Lisp interoperability & other questions
Date: 
Message-ID: <kZi3e.13791$ZB6.7802@newssvr19.news.prodigy.com>
"Alain Picard" <············@memetrics.com> wrote in message
···················@memetrics.com...
> "Andrei" <···········@yahoo.com> writes:
>
> > I have a few questions at this point:
>
> Okay.
> > -         Can you develop a distributed lisp application?
> Yes... I've done so.
>
> > If so, how do you
> > start, initialize, and gracefully stop a lisp process?
> The same way as you do in any other language.  For example,
> you could send it a signal, and have a handler catch that
> signal and initiate some process termination action, to
> clean everything up cleanly.
>
> > How do you get a
> > handle on a remote process? What is the communication protocol between
> > different lisp processes?
>
> Corba?  XMLRPC?  s-expressions over sockets?  UDP messages?
> This is all up to you.
>
>
> > -         How do you write a multithreaded lisp application? What are
the
> > synchronization mechanisms?
>
> You need vendor specific APIs.  Synchronization mechanisms are typically
> locks and wait functions.
>
> > -         One other question I am very interested in is how do you do
lisp
> > web development? What web server do you use? What is the paradigm? What
are
> > the programming practices for separating the business logic from the
> > presentation?
>
> You can either have your HTTP server be "in-process", e.g. allegro server,
> or cl-http (+ a few others I think) or just do the lispy bits, and
> let something like Apache+mod_lisp do most of the rest of the HTTP for
you.
>
> If you need to emit some HTML, there are a lot of toolkits for generating
> it programmatically: it's actually quite pleasant to use.
>
> Doing the development is very nice; you hit pages on your browser,
> and, in your emacs, you tweak the function rendering the page
> and iterate between the two.  You never restart any processes
> anywhere.  It's very productive.
>
> As for MVC type constructs; I don't use such things (no need)
> but there are some attempts in that direction; look up the web objects
> in allegro serve and lisp server pages to write html+lisp "inside-out".
>
> >
> > Most of these questions are rooted in my panic that I haven't found
(until
> > now) any literature even touching on these subjects. Any pointers would
be
> > appreciated.
>
> Don't panic.  It's all feasible, albeit with a lot less support and
> polish than in the Java world.  What you gain in return is a sane
> environment.
>
> I'll leave the rest of the questions to others with better informed
> opinions.
>
> Good luck!
> -- 
> It would be difficult to construe        Larry Wall, in  article
> this as a feature. <·····················@netlabs.com>


Hey,
Thanks a lot, Alain.