Jython on Google AppEngine: Why bother?

4 views
Skip to first unread message

Alan Kennedy

unread,
Nov 30, 2009, 9:45:30 AM11/30/09
to Python Ireland
Dear all,

In response to the assertion during the excellent "Python on
AppEngine" talk (given to Python Ireland by Google's Nick Johnson)
that there is no point in running jython on Google AppEngine, and that
one should just use the AppEngine cpython support instead, I have
written a blog post explaining why I think this assertion is wrong.

http://jython.xhaus.com/jython-on-google-appengine-why-bother/

Regards,

Alan.

Nick Johnson

unread,
Nov 30, 2009, 10:26:55 AM11/30/09
to python...@googlegroups.com
I responded on your blog; it's been flagged as spam. In the meantime, my response is reproduced below.

---

Hi Alan,

I think you're misconstruing my comments at the event. While I can't recall how I phrased it exactly, the gist of what I intended to say was that while it was possible to run Jython on App Engine, I couldn't think why you'd want to. I didn't mean to imply that I was certain it wasn't ever useful.

The use-case I described after the talk was one I'd encountered where a user wanted to port his Python app to Java (or vice-versa) progressively, without interrupting service - not a case of prototyping, but rather migration.

I also think your example of cryptography libraries for library support is perhaps not the best one: It's especially important in cryptography not to have a profusion of libraries, but rather to have at least one really good one. KeyCzar (http://www.keyczar.org/) is, in my opinion at least, an example of such a library - and it's available natively for both Python and Java.

Please don't take these corrections as criticism of the concept of Jython on App Engine, though. I love to see novel uses of App Engine and of programming languages in general. I'm sure an article on how to write a basic webapp in Jython on App Engine would be very well received - as would further practical examples of using the two together.

-Nick Johnson


--

You received this message because you are subscribed to the Google Groups "Python Ireland" group.
To post to this group, send email to python...@googlegroups.com.
To unsubscribe from this group, send email to pythonirelan...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pythonireland?hl=en.



Alan Kennedy

unread,
Dec 1, 2009, 2:00:28 PM12/1/09
to python...@googlegroups.com
[Nick]
> I'm sure an article on how to write a basic webapp in Jython
> on App Engine would be very well received – as would further
> practical examples of using the two together.

Challenge accepted: See my latest post, which explains how jython can
do something on Google AppEngine that cpython cannot do: XSLT
transforms.

Transforming with XSLT on Google AppEngine and jython.
http://jython.xhaus.com/transforming-with-xslt-on-google-appengine-and-jython/

I'm looking forward to seeing a comparable cpython implementation ;-)

Regards,

Alan.

Brian Quinlan

unread,
Dec 1, 2009, 5:40:39 PM12/1/09
to python...@googlegroups.com
Has 4suite not completed their pure-Python XSLT implementation yet?

Cheers,
Brian

Alan Kennedy

unread,
Dec 2, 2009, 7:52:41 AM12/2/09
to python...@googlegroups.com
[Brian]
> Has 4suite not completed their pure-Python XSLT implementation yet?

The 4suite project seems to be moribund.

Uche moved his energies to his Amara project, which seems more lively.

But the XSLT implementation still requires C extensions.

http://xml3k.org/Amara2/Install

Alan.

Gerard Flanagan

unread,
Dec 2, 2009, 12:02:43 PM12/2/09
to python...@googlegroups.com
Alan Kennedy wrote:
> Challenge accepted: See my latest post, which explains how jython can
> do something on Google AppEngine that cpython cannot do: XSLT
> transforms.
>
> Transforming with XSLT on Google AppEngine and jython.
> http://jython.xhaus.com/transforming-with-xslt-on-google-appengine-and-jython/
>
> I'm looking forward to seeing a comparable cpython implementation ;-)
>
>

Here you go:

http://pastebin.com/f66c44f10

Enjoy ;-)



Alan Kennedy

unread,
Dec 2, 2009, 2:37:16 PM12/2/09
to python...@googlegroups.com
[Alan]
>> Challenge accepted: See my latest post, which explains how jython can
>> do something on Google AppEngine that cpython cannot do: XSLT
>> transforms.
>>
>> Transforming with XSLT on Google AppEngine and jython.
>> http://jython.xhaus.com/transforming-with-xslt-on-google-appengine-and-jython/
>>
>> I'm looking forward to seeing a comparable cpython implementation ;-)

[Gerard]
> Here you go:
>
>    http://pastebin.com/f66c44f10

Sorry, I should have been more specific: I looking to seeing a
comparable cpython implementation which is usable for any XSLT
transform.

The translation process you undertook to ElementTree was made possible
by the trivial nature of little demo XSLT transform I wrote, which I
did for brevity to fit into a blog post.

But that approach is unworkable for any real world stylesheet, such as
the DocBook XSLT transforms, which contains more than 180,000 LOC

http://wiki.docbook.org/topic/DocBookXslStylesheets

Regards,

Alan.

Gerard Flanagan

unread,
Dec 2, 2009, 3:36:15 PM12/2/09
to python...@googlegroups.com
I know, it was tongue-in-cheek. I was trying to say - "you haven't
justified jython until you've justified XSLT, why not use django
templates, who cares how you make HTML". But fair enough point about
DocBook - stupid real world! I was going to come back with XML database
+ object binding, but I checked the only python object binder i know of
(PyXb) and it fails on the docbook XSD - and in any case you couldn't
have an XML database on AppEngine either, so again fair enough. I first
met XSLT early in my career and would go round the world to avoid it -
it's probably not that bad, but first impressions and all that.

Regards

G.F.

Reply all
Reply to author
Forward
0 new messages