You are viewing a plain text version of this content. The canonical link for it is here.
Posted to community@apache.org by "David N. Welton" <da...@dedasys.com> on 2003/06/26 14:55:02 UTC

Java + Scripting languages

Hi guys, I saw this:

http://www.jcp.org/en/jsr/detail?id=223

        The specification may include a Java API that can be used,
        possibly through JNI, by an scripting language engine to
        access the desired Java objects.

Can anyone give us a more concrete description of what this is really
about?

It looks interesting, because... hey, who wouldn't want to associate
with a million dollar marketing machine:-)

-- 
David N. Welton
   Consulting: http://www.dedasys.com/
     Personal: http://www.dedasys.com/davidw/
Free Software: http://www.dedasys.com/freesoftware/
   Apache Tcl: http://tcl.apache.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: community-unsubscribe@apache.org
For additional commands, e-mail: community-help@apache.org


Re: Java + Scripting languages

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
I would also like to understand how this relates to BSF
    http://jakarta.apache.org/bsf

BSF also defines such an API ...

Sanjiva.

----- Original Message ----- 
From: "David N. Welton" <da...@dedasys.com>
To: <co...@apache.org>
Sent: Thursday, June 26, 2003 6:55 PM
Subject: Java + Scripting languages


> 
> Hi guys, I saw this:
> 
> http://www.jcp.org/en/jsr/detail?id=223
> 
>         The specification may include a Java API that can be used,
>         possibly through JNI, by an scripting language engine to
>         access the desired Java objects.
> 
> Can anyone give us a more concrete description of what this is really
> about?
> 
> It looks interesting, because... hey, who wouldn't want to associate
> with a million dollar marketing machine:-)
> 
> -- 
> David N. Welton
>    Consulting: http://www.dedasys.com/
>      Personal: http://www.dedasys.com/davidw/
> Free Software: http://www.dedasys.com/freesoftware/
>    Apache Tcl: http://tcl.apache.org/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: community-unsubscribe@apache.org
> For additional commands, e-mail: community-help@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: community-unsubscribe@apache.org
For additional commands, e-mail: community-help@apache.org


Re: Java + Scripting languages

Posted by Stefano Mazzocchi <st...@apache.org>.
on 6/27/03 5:58 AM Sam Ruby wrote:

> Sometimes it sucks to be four years ahead of your time.

Amen.

-- 
Stefano.



---------------------------------------------------------------------
To unsubscribe, e-mail: community-unsubscribe@apache.org
For additional commands, e-mail: community-help@apache.org


Re: Java + Scripting languages

Posted by Santiago Gala <sg...@hisitech.com>.
Sam Ruby escribió:
> 
> Sometimes it sucks to be four years ahead of your time.
> 

Read Marc Portier's blog entry today, ( 
http://radio.weblogs.com/0116284/ ), specifically the sentence:
"Mmmm. Bumpy lives for those that see, but fail to make others see..."

BTW, it is about Galileo

> - Sam Ruby
> 
> 
-- 
Santiago Gala
High Sierra Technology, S.L. (http://hisitech.com)
http://memojo.com?page=SantiagoGalaBlog



---------------------------------------------------------------------
To unsubscribe, e-mail: community-unsubscribe@apache.org
For additional commands, e-mail: community-help@apache.org


Re: Java + Scripting languages

Posted by Sam Ruby <ru...@apache.org>.
Craig R. McClanahan wrote:
> 
>>http://www.jcp.org/en/jsr/detail?id=223
>>
>>        The specification may include a Java API that can be used,
>>        possibly through JNI, by an scripting language engine to
>>        access the desired Java objects.
>>
>>Can anyone give us a more concrete description of what this is really
>>about?
> 
> The basis for this is exactly what that sentence states -- scripting
> language users have said they would like to be able to access business
> logic and data objects inside a servlet-based application from their
> scripts, in a portable manner.  The point of the JSR is to make that sort
> of thing possible.
> 
> As Stefano points out, Sam did indeed create some code to do this.  Just
> two little problem though, it's non-thread safe (uses instance variables
> for per-request state), and it's not scalable.  And, it only deals with
> PHP, but there's lots of other scripting languages (and scripting language
> users) in the world that could benefit from the same ability.

What I did with PHP was only a proof of concept.  My focus wasn't only 
on PHP, but on a wide number of languages.

I met personally with Eduardo on more than one occasion trying to 
generate interest in the subject.  At the time, it was clear that his 
focus on on the 'one true programming language'.

Sometimes it sucks to be four years ahead of your time.

- Sam Ruby





---------------------------------------------------------------------
To unsubscribe, e-mail: community-unsubscribe@apache.org
For additional commands, e-mail: community-help@apache.org


Re: Java + Scripting languages

Posted by "Victor J. Orlikowski" <vi...@alumni.duke.edu>.
On Thu, Jun 26, 2003 at 05:22:38PM -0700, Craig R. McClanahan wrote:
> Accessing Java objects defined in the system class loader doesn't require
> anything new -- JNI provides all the necessary hooks.  But, to interact
> with web app resources, you need to do things like load classes from the
> webapp's class loader, and gain access to the ServletContext instance,
> and perhaps even do nice things like utilize the servlet container's
> session mechanism for scripting languages that don't have such a notion.
> Such things can be designed and built for a particular server today, but
> there's no standard approach; hence the JSR.
> 

Hmmm.
It's going to be interesting to see the confluence of 223 and 045
(debugging support for other languages); I think the integration
of languages via JNI is going to present a near-brick wall when it
comes to sane debugging (that said, 045 assumes that compilation
to bytecode is possible, which may allow it to preclude some of
the languages brought in under 223).

But then, what do I know? :)

I will say that BSF does provide the object registry for languages
that are implemented in Java; it's up to the individual BSFEngine
implementation to mediate access to those objects. Having a
BSFEngine that "does the right thing" via JNI is not hard to
envision (in fact, I think the ActiveScript engine did something
similar for WSH).

Victor
-- 
Victor J. Orlikowski  | The Wall is Down, But the Threat Remains!
=================================================================
orlikowski@apache.org | victor.j.orlikowski@alumni.duke.edu

---------------------------------------------------------------------
To unsubscribe, e-mail: community-unsubscribe@apache.org
For additional commands, e-mail: community-help@apache.org


Re: Java + Scripting languages

Posted by "David N. Welton" <da...@dedasys.com>.
"Craig R. McClanahan" <cr...@apache.org> writes:

> On Thu, 26 Jun 2003, David N. Welton wrote:

> > Hi guys, I saw this:

> > http://www.jcp.org/en/jsr/detail?id=223

> >         The specification may include a Java API that can be used,
> >         possibly through JNI, by an scripting language engine to
> >         access the desired Java objects.

> > Can anyone give us a more concrete description of what this is
> > really about?

> The basis for this is exactly what that sentence states -- scripting
> language users have said they would like to be able to access
> business logic and data objects inside a servlet-based application
> from their scripts, in a portable manner.  The point of the JSR is
> to make that sort of thing possible.

Part of what made me ask was the 'may' and 'possibly'.  They don't
sound very convinced.

> Accessing Java objects defined in the system class loader doesn't
> require anything new -- JNI provides all the necessary hooks.  But,
> to interact with web app resources, you need to do things like load
> classes from the webapp's class loader, and gain access to the
> ServletContext instance, and perhaps even do nice things like
> utilize the servlet container's session mechanism for scripting
> languages that don't have such a notion.  Such things can be
> designed and built for a particular server today, but there's no
> standard approach; hence the JSR.

Neat, it could be interesting indeed - thankyou for the clear
explanation Craig.

-- 
David N. Welton
   Consulting: http://www.dedasys.com/
     Personal: http://www.dedasys.com/davidw/
Free Software: http://www.dedasys.com/freesoftware/
   Apache Tcl: http://tcl.apache.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: community-unsubscribe@apache.org
For additional commands, e-mail: community-help@apache.org


Re: Java + Scripting languages

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Thu, 26 Jun 2003, David N. Welton wrote:

> Date: 26 Jun 2003 14:55:02 +0200
> From: David N. Welton <da...@dedasys.com>
> Reply-To: community@apache.org
> To: community@apache.org
> Subject: Java + Scripting languages
>
>
> Hi guys, I saw this:
>
> http://www.jcp.org/en/jsr/detail?id=223
>
>         The specification may include a Java API that can be used,
>         possibly through JNI, by an scripting language engine to
>         access the desired Java objects.
>
> Can anyone give us a more concrete description of what this is really
> about?
>

The basis for this is exactly what that sentence states -- scripting
language users have said they would like to be able to access business
logic and data objects inside a servlet-based application from their
scripts, in a portable manner.  The point of the JSR is to make that sort
of thing possible.

As Stefano points out, Sam did indeed create some code to do this.  Just
two little problem though, it's non-thread safe (uses instance variables
for per-request state), and it's not scalable.  And, it only deals with
PHP, but there's lots of other scripting languages (and scripting language
users) in the world that could benefit from the same ability.

Doing this kind of integration for a scripting language written in Java
(or indirectly wrapped by something like BSF) is pretty easy, because the
Java code can directly talk to servlet APIs.  It's not quite that easy for
a scripting language implemented in a non-Java language (like PHP), where
you have to create some additional mechanisms to access web application
resources from a scripting page.

Accessing Java objects defined in the system class loader doesn't require
anything new -- JNI provides all the necessary hooks.  But, to interact
with web app resources, you need to do things like load classes from the
webapp's class loader, and gain access to the ServletContext instance,
and perhaps even do nice things like utilize the servlet container's
session mechanism for scripting languages that don't have such a notion.
Such things can be designed and built for a particular server today, but
there's no standard approach; hence the JSR.

> It looks interesting, because... hey, who wouldn't want to associate
> with a million dollar marketing machine:-)

It's actually going to be a pretty good win-win ... scripting language
users gain access to business logic and services already written in Java,
and the Java community has the opportunity to grow by virtue of being
useful to people who don't currently use it.

>
> --
> David N. Welton

Craig McClanahan

---------------------------------------------------------------------
To unsubscribe, e-mail: community-unsubscribe@apache.org
For additional commands, e-mail: community-help@apache.org


RE: Java + Scripting languages

Posted by "Noel J. Bergman" <no...@devtech.com>.
>>>http://www.jcp.org/en/jsr/detail?id=223

>>I am a priori discouraged because I don't see IBM represented.  To have
this
>>JSR without participation from the BSF folks seems wrong.  I don't know if
>>this is payback for Eclipse and the WS-I, an oversight, or what.

>Lack of warm bodies with the right skills who are not already booked
>110%.  I am twisting Chuck Murcko and Victor Orlikowski's arm to
>represent IBM.

Color me much relieved!  I've known about JSR 223 for a couple of weeks now
from another e-mail, was initially pleased to see that there was one, and
absolutely shocked (and dismayed) not to see BSF represented.

Should Chuck and Victor represent IBM or should they represent the ASF, now
that BSF has been transfered?  You, Chuck and Victor are all ASF Members.

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: community-unsubscribe@apache.org
For additional commands, e-mail: community-help@apache.org


Re: Java + Scripting languages

Posted by Bill Stoddard <bi...@wstoddard.com>.
Noel J. Bergman wrote:

>>>http://www.jcp.org/en/jsr/detail?id=223
>>>      
>>>
>
>  
>
>>At the end, I will not be surprised if this turns out to be yet another
>>JSP-like political compromise between vendors, with no technological
>>value associated to it.
>>    
>>
>
>I am a priori discouraged because I don't see IBM represented.  To have this
>JSR without participation from the BSF folks seems wrong.  I don't know if
>this is payback for Eclipse and the WS-I, an oversight, or what.
>
>	--- Noel
>
Lack of warm bodies with the right skills who are not already booked 
110%.  I am twisting Chuck Murcko and Victor Orlikowski's arm to 
represent IBM.

Bill


---------------------------------------------------------------------
To unsubscribe, e-mail: community-unsubscribe@apache.org
For additional commands, e-mail: community-help@apache.org


Re: Java + Scripting languages

Posted by "Victor J. Orlikowski" <vi...@alumni.duke.edu>.
On Thu, Jun 26, 2003 at 02:13:37PM -0400, Noel J. Bergman wrote:
> > > I am a priori discouraged because I don't see IBM represented.  To have
> this
> > > JSR without participation from the BSF folks seems wrong.  I don't know
> if
> > > this is payback for Eclipse and the WS-I, an oversight, or what.
> 
> > BSF is Apache now, not so ?
> 
> Politics and memories.  Hopefully this isn't what is happening.  It is just
> an obvious conclusion in lieu of facts.
> 
Eh. We were only recently made aware of 223, and either I or Chuck
plan on getting involved.

Victor
-- 
Victor J. Orlikowski  | The Wall is Down, But the Threat Remains!
=================================================================
orlikowski@apache.org | victor.j.orlikowski@alumni.duke.edu

---------------------------------------------------------------------
To unsubscribe, e-mail: community-unsubscribe@apache.org
For additional commands, e-mail: community-help@apache.org


RE: Java + Scripting languages

Posted by "Noel J. Bergman" <no...@devtech.com>.
> > I am a priori discouraged because I don't see IBM represented.  To have
this
> > JSR without participation from the BSF folks seems wrong.  I don't know
if
> > this is payback for Eclipse and the WS-I, an oversight, or what.

> BSF is Apache now, not so ?

Politics and memories.  Hopefully this isn't what is happening.  It is just
an obvious conclusion in lieu of facts.

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: community-unsubscribe@apache.org
For additional commands, e-mail: community-help@apache.org


RE: Java + Scripting languages

Posted by Paul Hammant <pa...@yahoo.com>.
> I am a priori discouraged because I don't see IBM represented.  To have this
> JSR without participation from the BSF folks seems wrong.  I don't know if
> this is payback for Eclipse and the WS-I, an oversight, or what.

BSF is Apache now, not so ?

- Paul

________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://uk.messenger.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: community-unsubscribe@apache.org
For additional commands, e-mail: community-help@apache.org


RE: Java + Scripting languages

Posted by "Noel J. Bergman" <no...@devtech.com>.
> > http://www.jcp.org/en/jsr/detail?id=223

> At the end, I will not be surprised if this turns out to be yet another
> JSP-like political compromise between vendors, with no technological
> value associated to it.

I am a priori discouraged because I don't see IBM represented.  To have this
JSR without participation from the BSF folks seems wrong.  I don't know if
this is payback for Eclipse and the WS-I, an oversight, or what.

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: community-unsubscribe@apache.org
For additional commands, e-mail: community-help@apache.org


Re: Java + Scripting languages

Posted by Stefano Mazzocchi <st...@apache.org>.
on 6/26/03 7:55 AM David N. Welton wrote:

> Hi guys, I saw this:
> 
> http://www.jcp.org/en/jsr/detail?id=223
> 
>         The specification may include a Java API that can be used,
>         possibly through JNI, by an scripting language engine to
>         access the desired Java objects.
> 
> Can anyone give us a more concrete description of what this is really
> about?

>From where I stand, it looks like the JSP folks changed gears in their
marketing engine. Now they want to make it easy to move millions of PHP
folks into the J2EE.

> It looks interesting, because... hey, who wouldn't want to associate
> with a million dollar marketing machine:-)

Yeah, that's exactly how they are going fishing for new market
opportunities, so you wait for them instead of doing your own stuff and
you get locked into their politics.

I heard rumors that PHP5 might be (partially) compiled into bytecode,
with JNI hooks to existing php libraries, or, on the other hand, use JNI
hooks to access the servlet API exposed objects.

btw, our good old Sam Ruby showed it's already possible both hooking
from java to php or from php to java. Code is already into PHP and there
was a time where you could write an XSP page for Cocoon using PHP as a
scripting language (but nobody cared and the code died)

At the end, I will not be surprised if this turns out to be yet another
JSP-like political compromise between vendors, with no technological
value associated to it.

[note: I was part of the JSP JSR and asked to be removed exactly because
I couldn't stand their political-driven design attitude.]

Sorry to sound cynical or rain on the party, but I lost hope in the JCP
(or all committee-driven design, for that matter) a long time ago and
it's simply getting worse.

My point is: you can hook to java *right* now, if you care (look at
Sam's code in PHP if you want to see how). JNI is there and it's all you
need.

It is true that a *common* native abstraction for hooking into
scriptable java objects would make it much easier to hook different
scripting languages to the java platform (today, you have to do
everything by hand for every language you hook), but then again, it's
nothing that is not already possible.

Hope this helps.

-- 
Stefano.



---------------------------------------------------------------------
To unsubscribe, e-mail: community-unsubscribe@apache.org
For additional commands, e-mail: community-help@apache.org