On Fri, Aug 22, 2008 at 11:59 AM, Kapil Sachdeva <ksachdeva17@...> wrote:
> Dear all,
> First of all thanks for the excellent work done by Leo on making django work
> on jython (and hence the JVM, App Servers etc).
> - Would django on Jython running on Java web platforms (Tomcat, Glassfish
> etc) would be a good choice for highly available and scablable web
> application ?
I think that the standard answer apply here: It depends! Moreover,
there seem to be many approaches. For example, you may want to try the
J2EE approach of distributing state across machines. Or you can try
share-nothing strategy and focus your efforts on your database or
whatever data store you use.
Also, IMHO, there are no magical solutions. Almost every massive and
highly available/scalable system I know about have been built
incrementally, changing parts of the system once they see where their
scalability problems are.
Anyway, my answer is that I don't know if it is a good choice, but I
think that it is certainly possible to make highly available and
scalable applications using Django/Jython.
Please note that I'm not an expert on the subject. Feel free to ignore
everything I've written so far and asking an actual expert ;-). Now I
can talk about the stuff I'm more familiar with...
> - Java AppServers/containers manage the HttpSession which can be clustered
> using various ways - Terracaotta or container provider clustering where as
> django does the session management by itself.
Django has a pluggable session backend mechanism. You can use the DB
(as it is per default) to store sessions and share it across different
web frontends, or try the (also builtin) cache backend which enables
you to use memcached, if the DB ends up being a bottleneck.
Even if the options shown above are insufficient, you have the freedom
to write your own Terracota session backend. It even sounds like a
cool idea to make it easy to deploy django projects on Java-based
environments which may have a Terracota infraestructure and no
> - Default choice for django to do caching would be memcache but does that
> work for Java web platforms or it is even a right direction ?
It should work. I personally have not checked if the Python memcached
bindings have any problem running on Jython, but it shouldn't. Anyway,
even if it don't work and if the problem not easy to fix (very
unlikely scenario!), we can use the Java bindings (Isn't Jython
Even if I think that memcached is a very good solution, I understand
that it may not be available on some Java-based environments. Again,
thanks to the flexibility of Django, a cache backend that uses
whatever Java technology you need to use can be written.
I guess that in many scenarios the time you save by using powerful
tools such as Jython and Django is more than the time you spend
adapting them to some particular needs. And once people starts writing
and sharing these particular solutions, you get a huge ball rolling...
Hope that helps,
Leo Soto M.