

Ask HN: What is the status and future of Jython? - ertug

Hello HN,<p>I am considering to use Jython [1] for a large-scale web site together with Django. I have built a prototype and it seems pretty applicable. Also, the recent release (Jython 2.5.2 [2]) seems promising.<p>I am wondering how it will behave in a large-scale deployment and also the future of the project.<p>Is there any major companies you know using Jython?<p>In short, what do you think about Jython?<p>[1] http://www.jython.org/<p>[2] http://news.ycombinator.com/item?id=2300881
======
ibejoeb
Meetup uses it to some extent. I don't know how much, but I'm told by some of
the programmers I know. I think it was Andrew who gave a Jython talk at Meetup
HQ a few months back.

Jython is a great way to leverage the huge the amount of libraries and
infrastructure available on the JVM. It also lets you reuse what you might
already have, which might allow you to (covertly?) transition languages. I use
it regularly.

If you're not already entrenched in the Java world, you probably don't need
it. I use it because my clients are comfortable deploying WARs, EARs, JARs,
SARs, etc. Oracle and IBM sell a full stack, so there's never any scrutiny.

Technologically, you might want it. Despite the tendency to ignore them, Java
has a lot of superior tech that comes in handy. You'll get real threads,
connection pooling, distributed transactions, fantastic async I/O libraries;
Jython inherits all of this. If you need this, it's available. You don't have
to roll your own. (You will have to learn it, though, and I think that's what
_really_ drives NIHS...) Understand that Jython does come with a performance
penalty on some tasks, but pays dividends on others. You can also spot tune
with pure Java to some extent.

So it's really a strategic thing. If you're selling into orgs that have
established practices, or if you need really serious throughput, Jython will
probably be a good choice. If you're building a web app that you run on your
own infrastructure and you've already chosen Python and Django, you're
probably better off without the extra layer.

~~~
apgwoz
Andrew (from Meetup) here. While the main web app is written in plain ole
Java, the API is almost all Jython (the streaming stuff is Scala). The API
team was 1 person until last December, and Jython was a big reason for this.
The ability to glue all of the core logic and custom ORM into web.py on top of
the modjy Servlet container is really powerful.

And, I concur entirely with what ibejoeb says.

------
pan69
I'm not sure about the development state of Jyhton, but like others have
already said, using the JVM opens up an enormous box of Java platform goodies.
With Jython you can build your web app front-end with Django and your backend
business logic with Java, Scala or something else. It also gives you the
ability to create worker thread etc.

This is a great online book about using Jython:
<http://www.jython.org/jythonbook/en/1.0>

~~~
apgwoz
As of last week, Jython 2.5.2 was released, which is with some benchmarks is a
20% performance boost. I'm told that as of Pycon this past weekend, Jython 2.6
has been officially started, which will bring Jython closer to what you
currently get with CPython 2.6 (library wise, etc). I can't speak for the
project, but my guess is that it'll be sometime next year before that gets to
an alpha state.

------
ylem
You might talk to some of the people at the Diamond Synchrotron facility in
the UK. They are using it to allow scripting for control of their
instrumentation. In my own use, I do remember there being some annoyances with
getting a ^C into a text based client we were working on (from java), but that
might have just been me. Also, I would suggest being careful with the
possibility of memory leaks when calling java from jython (sorry, can't
remember the details now).

------
beaumartinez
> _Jython 2.5.2 Has Been Released (March 3, 2011)_

It's being actively developed. I know IBM uses it, at least in WebSphere.

About scalabilty I don't know, but it compiles to Java bytecode and the JVM is
very mature (with Jython itself being mature as well), I'd wager that it
scales well.

However, why are you using Jython with Django when you can use CPython? You're
adding an additional layer of abstraction that will incur a performance hit.

~~~
ertug
Thanks for the response. Not CPython because we want something that runs on
JVM and also be able to utilize existing Java code/technologies.

