From: Dave Bakhash
Subject: CL/Corba + J2EE
Date: 
Message-ID: <8a3667a0.0202082030.4d4002af@posting.google.com>
Hi,

I've been researching the possible design of an e-commerce website
with CL as the primary programming language on both the backend and
the frontend.  However, I would like the site to be mostly (if not
fully) J2EE-compliant.  That means EJB2, J2EE, session and entity
beans, an app server, etc.

Specifically, I use LispWorks on Linux, if that helps.

thanks,
dave

From: Scott McKay
Subject: Re: CL/Corba + J2EE
Date: 
Message-ID: <ZB998.17936$Gv3.3008708@typhoon.ne.ipsvc.net>
"Dave Bakhash" <·····@alum.mit.edu> wrote in message
·································@posting.google.com...
> Hi,
>
> I've been researching the possible design of an e-commerce website
> with CL as the primary programming language on both the backend and
> the frontend.  However, I would like the site to be mostly (if not
> fully) J2EE-compliant.  That means EJB2, J2EE, session and entity
> beans, an app server, etc.
>
> Specifically, I use LispWorks on Linux, if that helps.

I think I understand these issues reasonably well these days.
The amount of effort required to be J2EE-compliant is huge.
There are so many details to get exactly right, and the spec
for all of this stuff is very lengthy.  There is also the issue that
someone designing this from scratch for CL would make lots
of design decisions differently; for example, session beans are
a class-centric way of doing distributed function calls, and CL
wouldn't do it the way EJB does.

I think it would be cool -- but way too late -- to come up with
a good CL take on all this, but making it be fully compatible
with J2EE is incredibly hairy.
From: Mark Watson
Subject: Re: CL/Corba + J2EE
Date: 
Message-ID: <mJb98.21822$Hb6.1989058@newsread1.prod.itd.earthlink.net>
Greetings Dave,

I have thought this same thing (I earn most of my
living uing J2EE technologies, and just published a
J2EE book, but I really like developing in Common Lisp).

Anyway, here are some of my ideas, which may be of
a little help to you:

1. Use J2EE for front end (servlets, JSPs) and perhaps
database access, certainly transaction processing (if
required).
2. Do the interesting stuff in Lisp, and use SOAP for
communication between servlets/JSPs/EJBs and a
Lisp process. On the Java side, the latest alpha 3 release
of Apache Axis is very good. On the Lisp side, I have
been hacking some SOAP support, but I keep hoping that
someone will release industrial strength SOAP support
for Common Lisp.

That said, if you own the Enterprise version of LispWorks
that has CORBA support, this would be a good fit. CORBA
support is very good and free in JDK 1.3.x/JDK1.4.x and J2EE.

-Mark

-- Mark Watson: Java consultant and author
-- Open Source and Open Content at www.markwatson.com
-- Commercial software: www.knowledgebooks.com
From: Dave Bakhash
Subject: Re: CL/Corba + J2EE
Date: 
Message-ID: <8a3667a0.0202091019.51473b55@posting.google.com>
Hey,

I admit to _not_ knowing much about Java, except what I read at
OnJava.com, hear, etc.  I try to stay abreast of what's going on in
the Java world, but as far as interfacing with Java...I can't say I
have a handle on it.

Corba is another story.  I use Corba, but I wouldn't call myself an
advanced Corba user:

 o I havn't used the Corba Notification Service
 o I havn't used DII or whatever that is (at least, not directly)

I have heard that in order to be compatible with J2EE, one has to use
a Corba-based system that's either CORBA 2.3.1 or higher.  Xanalys LW
(what I use) advertizes the following on their ORB:

  Support for version 2.0 of CORBA as well as relevant portions of 
  the 2.2 standard.

So my problem is that I don't know what J2EE is using that LW won't
support.

dave

"Mark Watson" <·····@markwatson.com> wrote in message news:<·······················@newsread1.prod.itd.earthlink.net>...
> Greetings Dave,
> 
> I have thought this same thing (I earn most of my
> living uing J2EE technologies, and just published a
> J2EE book, but I really like developing in Common Lisp).
> 
> Anyway, here are some of my ideas, which may be of
> a little help to you:
> 
> 1. Use J2EE for front end (servlets, JSPs) and perhaps
> database access, certainly transaction processing (if
> required).
> 2. Do the interesting stuff in Lisp, and use SOAP for
> communication between servlets/JSPs/EJBs and a
> Lisp process. On the Java side, the latest alpha 3 release
> of Apache Axis is very good. On the Lisp side, I have
> been hacking some SOAP support, but I keep hoping that
> someone will release industrial strength SOAP support
> for Common Lisp.
> 
> That said, if you own the Enterprise version of LispWorks
> that has CORBA support, this would be a good fit. CORBA
> support is very good and free in JDK 1.3.x/JDK1.4.x and J2EE.
> 
> -Mark
> 
> -- Mark Watson: Java consultant and author
> -- Open Source and Open Content at www.markwatson.com
> -- Commercial software: www.knowledgebooks.com
From: Mark Watson
Subject: Re: CL/Corba + J2EE
Date: 
Message-ID: <U7c98.21883$Hb6.1995399@newsread1.prod.itd.earthlink.net>
I had another thought: why not wrap any service
written in Common Lisp with a EJB that simply
opens a socket connection to a LispWorks
process. The EJB could have a work queue and
work out any application specific data format
that would make sense for communication over the
socket.  EJBs are not supposed to do such things,
but perhaps the EJB's initialization method could
Process.exec(...) the Lisp process, wait for it to
startup, and establish the socket connection. If
the Lisp-based service(s) are computationally expensive,
the wrapper EJB could use a pool of Lisp processes on
different servers for load balancing.

ALSO: this is not a usual design pattern, but I do it
anyway: a Java servlet of JSP can be persistent with
its own work thread. This means that you don't
necessarily need the heft and weight of a full
J2EE implementation to get EJBs: try something light like Apache
Tomcat (servlet/JSP container, and a built in web server)
and Apache Axis if you need a good and fast (uses SAX, not DOM
for XML processing) SOAP implementation.  In other words:
a servlet (or JSP) could be used to wrap a Lisp process instead
of a EJB. This decision should be based on whether you need
an EJB container for easier database access, transaction processing, etc.)

If I have time, I might write a little servlet with LispWorks
service process demo of this. A useful framework might
be only a few hundred lines of Java and Lisp code.

Have fun!

-Mark

-- Mark Watson: Java consultant and author
-- Open Source and Open Content at www.markwatson.com
-- Commercial software: www.knowledgebooks.com