SlideShare a Scribd company logo
Django on Jython
       Frank Wierzbicki
  frank.wierzbicki@sun.com
Who am I?

• Frank Wierzbicki
• Project lead for Jython
• I work at Sun (Oracle?) on Jython fulltime
What is Jython?

• Python that runs on the JVM
• Compiled to Java bytecodes instead of
  Python bytecodes
• Call Java code seamlessly from Python code
Jython Status

• Current prod version 2.2 is not useful for
  Django
• Jython 2.5 beta4 is out
• First RC as early as this Friday
• So production release real-soon-now
Modjy

• Modjy implements WSGI for Jython
• Acts as a bridge to Java Servlets
• integrated into Jython’s core
• This is a big part of how we get Django
  working.
zxJDBC

• zxJDBC implements DB-API
• integrated into Jython’s core
• Another crucial piece to get Django
  working.
Jython on Django
         Status
• Works well with Django 1.0.3 and
  postgresql
• Other databases in progress: MySQL,
  Oracle, SQLite, MS SqlServer
• Django 1.1 has some refactorings that
  Jython will need to catch up on...
Why Jython?

• Massive amounts of Java code out there
• Some really useful Java libs
• Great JVM ecosystem
• Internal Java apps that are not yet exposed
  to the web
What can I use?

• setuptools
• ez_install
• virtualenv
• pip
• many more pure Python tools
What can’t I use yet?

• c-extensions
• PIL
• ctypes (but we’re working on this one!)
• iPython (working on this too!)
Configure Jython

• Get ez_setup.py
• run “jython ez_setup.py”
• In Jython’s bin directory will be an
  ez_install that runs from Jython
Installing Django on
          Jython
• Get 1.0.3+ Django - run “jython setup.py
  install”
• From http://django-jython.googlecode.com
  get django-jython-1.0b1.tar.gz, untar it and
  run “jython setup.py install”
• see the django-jython project on
  googlecode.com for more detail
Java Platform

• Now takes advantage of Java 5 libraries
• Java 5 concurrency libs: No GIL!
• Use a choice of Java garbage collectors
• Use Java native threads
• -J flag namespace for JVM config
Java Integration

• Jython integrates well with Java
• Java classes and interfaces can be
  subclassed from Jython
• These subclasses are now “new style”
  classes.
Example: The Java lib
 poi can read Excel
Jython on Django
Deployment

• run “jython manage.py war --include-java-
  libs=jdbcdriver.jar”
• This will produce a “war file”
• Copy this war file to the auto-deploy
  directory for most application servers (like
  GlassFish)
war format for doj
  |-- WEB-INF
|   |-- lib
|   `-- lib-python
|       |-- Lib
|       |-- django
|       |-- doj
|       `-- mysite
`-- media
Why Django on Jython?

• Lots of ops departments out there that
  want to deploy to Java App Servers - “give
  us a war file”
• They have lots of tools for monitoring, etc
• Jython has a good story for threading and
  performance - and it’s getting better.
Da Vinci Machine
• JVM gets friendlier to dynamic languages
• On the project plan for JDK 7 -- some of it
  has already there in a hidden state for JDK6
• Method Handles, Invokedynamic, etc
• Hotspot is one of the world’s best tuned
  VMs - about to be tuned better for us!
Jython Book due in
    2009 from Apress
• Josh Juneau
• Jim Baker
• Leo Soto
• Victor NG
• Frank Wierzbicki
Where to Find Out
       More
• http://www.jython.org
• http://wiki.python.org/jython
• http://fwierzbicki.blogspot.com
• Twitter: fwierzbicki
• http://www.netbeans.org/features/python/
• https://glassfish.dev.java.net/

More Related Content

What's hot

It is easy contributing to open source - JCON 2020
It is easy contributing to open source - JCON 2020It is easy contributing to open source - JCON 2020
It is easy contributing to open source - JCON 2020
César Hernández
 
GraalVM
GraalVMGraalVM
Keymetrics pm2
Keymetrics pm2Keymetrics pm2
Keymetrics pm2
Alexandre Strzelewicz
 
Towards component based web UI with ReactJS
Towards component based web UI with ReactJSTowards component based web UI with ReactJS
Towards component based web UI with ReactJS
Oliver Häger
 
React Django Presentation
React Django PresentationReact Django Presentation
React Django Presentation
Allison DiNapoli
 
TDD with Spock @xpdays_ua
TDD with Spock @xpdays_uaTDD with Spock @xpdays_ua
TDD with Spock @xpdays_ua
Izzet Mustafaiev
 
Git sourcecontrolpreso
Git sourcecontrolpresoGit sourcecontrolpreso
Git sourcecontrolpreso
ColdFusionConference
 
Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native
Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native
Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native
Codemotion
 
Keymetrics & PM2 - NodeJS NYC @ Microsoft
Keymetrics & PM2 - NodeJS NYC @ Microsoft Keymetrics & PM2 - NodeJS NYC @ Microsoft
Keymetrics & PM2 - NodeJS NYC @ Microsoft
Alexandre Strzelewicz
 
GradleのREPLプラグイン紹介 #jggug
GradleのREPLプラグイン紹介 #jggugGradleのREPLプラグイン紹介 #jggug
GradleのREPLプラグイン紹介 #jggug
kyon mm
 
All Work Responsibilities in my whole Life-Testing Profession
All Work Responsibilities in my whole  Life-Testing  ProfessionAll Work Responsibilities in my whole  Life-Testing  Profession
All Work Responsibilities in my whole Life-Testing Profession
Gopi Raghavendra
 
Developing and Testing with Enhanced Oscar
Developing and Testing with Enhanced OscarDeveloping and Testing with Enhanced Oscar
Developing and Testing with Enhanced Oscar
Jeff Scelza
 
Puppet Camp Denver 2015: Developing and Testing with Enhanced Oscar
Puppet Camp Denver 2015: Developing and Testing with Enhanced OscarPuppet Camp Denver 2015: Developing and Testing with Enhanced Oscar
Puppet Camp Denver 2015: Developing and Testing with Enhanced Oscar
Puppet
 
"How to deploy to production 10 times a day" Андрей Шумада
"How to deploy to production 10 times a day" Андрей Шумада"How to deploy to production 10 times a day" Андрей Шумада
"How to deploy to production 10 times a day" Андрей Шумада
Fwdays
 
Gradle起步走: 以CLI Application為例 @ JCConf 2014
Gradle起步走: 以CLI Application為例 @ JCConf 2014Gradle起步走: 以CLI Application為例 @ JCConf 2014
Gradle起步走: 以CLI Application為例 @ JCConf 2014
Chen-en Lu
 
Groovy and noteworthy
Groovy and noteworthyGroovy and noteworthy
Groovy and noteworthy
Izzet Mustafaiev
 
Buildr - build like you code
Buildr -  build like you codeBuildr -  build like you code
Buildr - build like you code
Izzet Mustafaiev
 
JS performance tools
JS performance toolsJS performance tools
JS performance tools
Dmytro Ovcharenko
 
Jenkins 101: Continuos Integration with Jenkins
Jenkins 101: Continuos Integration with JenkinsJenkins 101: Continuos Integration with Jenkins
Jenkins 101: Continuos Integration with Jenkins
All Things Open
 
Continuous Integration with Puppet
Continuous Integration with PuppetContinuous Integration with Puppet
Continuous Integration with Puppet
Miguel Zuniga
 

What's hot (20)

It is easy contributing to open source - JCON 2020
It is easy contributing to open source - JCON 2020It is easy contributing to open source - JCON 2020
It is easy contributing to open source - JCON 2020
 
GraalVM
GraalVMGraalVM
GraalVM
 
Keymetrics pm2
Keymetrics pm2Keymetrics pm2
Keymetrics pm2
 
Towards component based web UI with ReactJS
Towards component based web UI with ReactJSTowards component based web UI with ReactJS
Towards component based web UI with ReactJS
 
React Django Presentation
React Django PresentationReact Django Presentation
React Django Presentation
 
TDD with Spock @xpdays_ua
TDD with Spock @xpdays_uaTDD with Spock @xpdays_ua
TDD with Spock @xpdays_ua
 
Git sourcecontrolpreso
Git sourcecontrolpresoGit sourcecontrolpreso
Git sourcecontrolpreso
 
Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native
Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native
Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native
 
Keymetrics & PM2 - NodeJS NYC @ Microsoft
Keymetrics & PM2 - NodeJS NYC @ Microsoft Keymetrics & PM2 - NodeJS NYC @ Microsoft
Keymetrics & PM2 - NodeJS NYC @ Microsoft
 
GradleのREPLプラグイン紹介 #jggug
GradleのREPLプラグイン紹介 #jggugGradleのREPLプラグイン紹介 #jggug
GradleのREPLプラグイン紹介 #jggug
 
All Work Responsibilities in my whole Life-Testing Profession
All Work Responsibilities in my whole  Life-Testing  ProfessionAll Work Responsibilities in my whole  Life-Testing  Profession
All Work Responsibilities in my whole Life-Testing Profession
 
Developing and Testing with Enhanced Oscar
Developing and Testing with Enhanced OscarDeveloping and Testing with Enhanced Oscar
Developing and Testing with Enhanced Oscar
 
Puppet Camp Denver 2015: Developing and Testing with Enhanced Oscar
Puppet Camp Denver 2015: Developing and Testing with Enhanced OscarPuppet Camp Denver 2015: Developing and Testing with Enhanced Oscar
Puppet Camp Denver 2015: Developing and Testing with Enhanced Oscar
 
"How to deploy to production 10 times a day" Андрей Шумада
"How to deploy to production 10 times a day" Андрей Шумада"How to deploy to production 10 times a day" Андрей Шумада
"How to deploy to production 10 times a day" Андрей Шумада
 
Gradle起步走: 以CLI Application為例 @ JCConf 2014
Gradle起步走: 以CLI Application為例 @ JCConf 2014Gradle起步走: 以CLI Application為例 @ JCConf 2014
Gradle起步走: 以CLI Application為例 @ JCConf 2014
 
Groovy and noteworthy
Groovy and noteworthyGroovy and noteworthy
Groovy and noteworthy
 
Buildr - build like you code
Buildr -  build like you codeBuildr -  build like you code
Buildr - build like you code
 
JS performance tools
JS performance toolsJS performance tools
JS performance tools
 
Jenkins 101: Continuos Integration with Jenkins
Jenkins 101: Continuos Integration with JenkinsJenkins 101: Continuos Integration with Jenkins
Jenkins 101: Continuos Integration with Jenkins
 
Continuous Integration with Puppet
Continuous Integration with PuppetContinuous Integration with Puppet
Continuous Integration with Puppet
 

Viewers also liked

Garin Shomrat Reunion
Garin Shomrat ReunionGarin Shomrat Reunion
Garin Shomrat Reunion
Moshe Chertoff
 
MONG THONGDEE'S PAPER PLANE AND GREAT SCIENCE LEARNING
MONG THONGDEE'S PAPER PLANE AND GREAT SCIENCE LEARNINGMONG THONGDEE'S PAPER PLANE AND GREAT SCIENCE LEARNING
MONG THONGDEE'S PAPER PLANE AND GREAT SCIENCE LEARNING
NSTDA THAILAND
 
AdoptingForLife: Innovative Adoption Funding & Church Adoption Funds
AdoptingForLife: Innovative Adoption Funding & Church Adoption FundsAdoptingForLife: Innovative Adoption Funding & Church Adoption Funds
AdoptingForLife: Innovative Adoption Funding & Church Adoption Funds
Andy Lehman
 
U.S. Corporate & Org Social Media 2010
U.S. Corporate & Org Social Media 2010U.S. Corporate & Org Social Media 2010
U.S. Corporate & Org Social Media 2010
John Cass
 
איך להפיק את המטיב מהערכת ביצועים 3
איך להפיק את המטיב מהערכת ביצועים   3איך להפיק את המטיב מהערכת ביצועים   3
איך להפיק את המטיב מהערכת ביצועים 3
yossi koren
 
РИФ 2016, ПРАКТИКА // Хочу все знать. Или почему важно вовремя остановиться.
РИФ 2016, ПРАКТИКА // Хочу все знать. Или почему важно вовремя остановиться.РИФ 2016, ПРАКТИКА // Хочу все знать. Или почему важно вовремя остановиться.
РИФ 2016, ПРАКТИКА // Хочу все знать. Или почему важно вовремя остановиться.
Тарасов Константин
 
РИФ 2016, Исследовательская комиссия стандартизации Интернета вещей №20 Между...
РИФ 2016, Исследовательская комиссия стандартизации Интернета вещей №20 Между...РИФ 2016, Исследовательская комиссия стандартизации Интернета вещей №20 Между...
РИФ 2016, Исследовательская комиссия стандартизации Интернета вещей №20 Между...
Тарасов Константин
 
Say Hello 2 Bdd
Say Hello 2 BddSay Hello 2 Bdd
Say Hello 2 Bdd
mh_azad
 
Immersed In Inn Bangkok Post 191009
Immersed In Inn Bangkok Post 191009Immersed In Inn Bangkok Post 191009
Immersed In Inn Bangkok Post 191009
NSTDA THAILAND
 
ADADC Vegetarian Diets
ADADC  Vegetarian  DietsADADC  Vegetarian  Diets
ADADC Vegetarian Diets
animalrightsadvocates
 
Traverus Presentation 050509
Traverus Presentation 050509Traverus Presentation 050509
Traverus Presentation 050509
Holly Henderson
 
Siftables
SiftablesSiftables
Siftables
Nan Chen Chen
 
эффективная поисковая оптимизация и продвижение на европейском пространстве
эффективная поисковая оптимизация и продвижение на европейском пространствеэффективная поисковая оптимизация и продвижение на европейском пространстве
эффективная поисковая оптимизация и продвижение на европейском пространстве
Тарасов Константин
 
Full mooningreeceh
Full mooningreecehFull mooningreeceh
Full mooningreeceh
Kostas Tampakis
 
Philosophy foroldage
Philosophy foroldagePhilosophy foroldage
Philosophy foroldage
Kostas Tampakis
 
Llegandoaserunmaestroconstructivista
LlegandoaserunmaestroconstructivistaLlegandoaserunmaestroconstructivista
Llegandoaserunmaestroconstructivista
guest9dfe6f
 
Summitix draft adoptionfundingbreakout-110501223638-phpapp02
Summitix draft adoptionfundingbreakout-110501223638-phpapp02Summitix draft adoptionfundingbreakout-110501223638-phpapp02
Summitix draft adoptionfundingbreakout-110501223638-phpapp02
Andy Lehman
 

Viewers also liked (20)

Garin Shomrat Reunion
Garin Shomrat ReunionGarin Shomrat Reunion
Garin Shomrat Reunion
 
MONG THONGDEE'S PAPER PLANE AND GREAT SCIENCE LEARNING
MONG THONGDEE'S PAPER PLANE AND GREAT SCIENCE LEARNINGMONG THONGDEE'S PAPER PLANE AND GREAT SCIENCE LEARNING
MONG THONGDEE'S PAPER PLANE AND GREAT SCIENCE LEARNING
 
AdoptingForLife: Innovative Adoption Funding & Church Adoption Funds
AdoptingForLife: Innovative Adoption Funding & Church Adoption FundsAdoptingForLife: Innovative Adoption Funding & Church Adoption Funds
AdoptingForLife: Innovative Adoption Funding & Church Adoption Funds
 
U.S. Corporate & Org Social Media 2010
U.S. Corporate & Org Social Media 2010U.S. Corporate & Org Social Media 2010
U.S. Corporate & Org Social Media 2010
 
איך להפיק את המטיב מהערכת ביצועים 3
איך להפיק את המטיב מהערכת ביצועים   3איך להפיק את המטיב מהערכת ביצועים   3
איך להפיק את המטיב מהערכת ביצועים 3
 
Seo Astra-Web
Seo Astra-WebSeo Astra-Web
Seo Astra-Web
 
РИФ 2016, ПРАКТИКА // Хочу все знать. Или почему важно вовремя остановиться.
РИФ 2016, ПРАКТИКА // Хочу все знать. Или почему важно вовремя остановиться.РИФ 2016, ПРАКТИКА // Хочу все знать. Или почему важно вовремя остановиться.
РИФ 2016, ПРАКТИКА // Хочу все знать. Или почему важно вовремя остановиться.
 
Direct booklet
Direct bookletDirect booklet
Direct booklet
 
РИФ 2016, Исследовательская комиссия стандартизации Интернета вещей №20 Между...
РИФ 2016, Исследовательская комиссия стандартизации Интернета вещей №20 Между...РИФ 2016, Исследовательская комиссия стандартизации Интернета вещей №20 Между...
РИФ 2016, Исследовательская комиссия стандартизации Интернета вещей №20 Между...
 
Say Hello 2 Bdd
Say Hello 2 BddSay Hello 2 Bdd
Say Hello 2 Bdd
 
Immersed In Inn Bangkok Post 191009
Immersed In Inn Bangkok Post 191009Immersed In Inn Bangkok Post 191009
Immersed In Inn Bangkok Post 191009
 
ADADC Vegetarian Diets
ADADC  Vegetarian  DietsADADC  Vegetarian  Diets
ADADC Vegetarian Diets
 
Traverus Presentation 050509
Traverus Presentation 050509Traverus Presentation 050509
Traverus Presentation 050509
 
Siftables
SiftablesSiftables
Siftables
 
эффективная поисковая оптимизация и продвижение на европейском пространстве
эффективная поисковая оптимизация и продвижение на европейском пространствеэффективная поисковая оптимизация и продвижение на европейском пространстве
эффективная поисковая оптимизация и продвижение на европейском пространстве
 
Yandex Direct
Yandex DirectYandex Direct
Yandex Direct
 
Full mooningreeceh
Full mooningreecehFull mooningreeceh
Full mooningreeceh
 
Philosophy foroldage
Philosophy foroldagePhilosophy foroldage
Philosophy foroldage
 
Llegandoaserunmaestroconstructivista
LlegandoaserunmaestroconstructivistaLlegandoaserunmaestroconstructivista
Llegandoaserunmaestroconstructivista
 
Summitix draft adoptionfundingbreakout-110501223638-phpapp02
Summitix draft adoptionfundingbreakout-110501223638-phpapp02Summitix draft adoptionfundingbreakout-110501223638-phpapp02
Summitix draft adoptionfundingbreakout-110501223638-phpapp02
 

Similar to Jython on Django

Django On Jython (for Portland and Boulder Python user groups presentations)
Django On Jython (for Portland and Boulder Python user groups presentations)Django On Jython (for Portland and Boulder Python user groups presentations)
Django On Jython (for Portland and Boulder Python user groups presentations)
Leonardo Soto
 
Creating a reasonable project boilerplate
Creating a reasonable project boilerplateCreating a reasonable project boilerplate
Creating a reasonable project boilerplate
Stanislav Petrov
 
Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...
Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...
Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...
MarcinStachniuk
 
Django & Buildout (en)
Django & Buildout (en)Django & Buildout (en)
Django & Buildout (en)
zerok
 
Java Web Start czyli jak żyć z tą dziwną technologią & Continuous Delivery w ...
Java Web Start czyli jak żyć z tą dziwną technologią & Continuous Delivery w ...Java Web Start czyli jak żyć z tą dziwną technologią & Continuous Delivery w ...
Java Web Start czyli jak żyć z tą dziwną technologią & Continuous Delivery w ...
MarcinStachniuk
 
Django Deployment with Fabric
Django Deployment with FabricDjango Deployment with Fabric
Django Deployment with Fabric
Jonas Nockert
 
Django on Jython, PyCon 2009
Django on Jython, PyCon 2009Django on Jython, PyCon 2009
Django on Jython, PyCon 2009
Leonardo Soto
 
Lessons Learned from Migrating Legacy Enterprise Applications to Microservices
Lessons Learned from Migrating Legacy Enterprise Applications to MicroservicesLessons Learned from Migrating Legacy Enterprise Applications to Microservices
Lessons Learned from Migrating Legacy Enterprise Applications to Microservices
VMware Tanzu
 
Pipeline as code for your infrastructure as Code
Pipeline as code for your infrastructure as CodePipeline as code for your infrastructure as Code
Pipeline as code for your infrastructure as Code
Kris Buytaert
 
Pc54
Pc54Pc54
Audit your reactive applications
Audit your reactive applicationsAudit your reactive applications
Audit your reactive applications
OCTO Technology
 
Are app servers still fascinating
Are app servers still fascinatingAre app servers still fascinating
Are app servers still fascinating
Antonio Goncalves
 
State of jQuery June 2013 - Portland
State of jQuery June 2013 - PortlandState of jQuery June 2013 - Portland
State of jQuery June 2013 - Portland
dmethvin
 
Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...
Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...
Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...
adunne
 
Why Java
Why JavaWhy Java
Why Java
Kiki Ahmadi
 
Guides To Analyzing WebKit Performance
Guides To Analyzing WebKit PerformanceGuides To Analyzing WebKit Performance
Guides To Analyzing WebKit Performance
National Cheng Kung University
 
GeoServer Developers Workshop
GeoServer Developers WorkshopGeoServer Developers Workshop
GeoServer Developers Workshop
Jody Garnett
 
Jython in workflow and rules engines
Jython in workflow and rules enginesJython in workflow and rules engines
Jython in workflow and rules engines
Vaclav Tunka
 
Living in a multiligual world: Internationalization for Web 2.0 Applications
Living in a multiligual world: Internationalization for Web 2.0 ApplicationsLiving in a multiligual world: Internationalization for Web 2.0 Applications
Living in a multiligual world: Internationalization for Web 2.0 Applications
Lars Trieloff
 
Java virtual machine
Java virtual machineJava virtual machine

Similar to Jython on Django (20)

Django On Jython (for Portland and Boulder Python user groups presentations)
Django On Jython (for Portland and Boulder Python user groups presentations)Django On Jython (for Portland and Boulder Python user groups presentations)
Django On Jython (for Portland and Boulder Python user groups presentations)
 
Creating a reasonable project boilerplate
Creating a reasonable project boilerplateCreating a reasonable project boilerplate
Creating a reasonable project boilerplate
 
Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...
Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...
Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...
 
Django & Buildout (en)
Django & Buildout (en)Django & Buildout (en)
Django & Buildout (en)
 
Java Web Start czyli jak żyć z tą dziwną technologią & Continuous Delivery w ...
Java Web Start czyli jak żyć z tą dziwną technologią & Continuous Delivery w ...Java Web Start czyli jak żyć z tą dziwną technologią & Continuous Delivery w ...
Java Web Start czyli jak żyć z tą dziwną technologią & Continuous Delivery w ...
 
Django Deployment with Fabric
Django Deployment with FabricDjango Deployment with Fabric
Django Deployment with Fabric
 
Django on Jython, PyCon 2009
Django on Jython, PyCon 2009Django on Jython, PyCon 2009
Django on Jython, PyCon 2009
 
Lessons Learned from Migrating Legacy Enterprise Applications to Microservices
Lessons Learned from Migrating Legacy Enterprise Applications to MicroservicesLessons Learned from Migrating Legacy Enterprise Applications to Microservices
Lessons Learned from Migrating Legacy Enterprise Applications to Microservices
 
Pipeline as code for your infrastructure as Code
Pipeline as code for your infrastructure as CodePipeline as code for your infrastructure as Code
Pipeline as code for your infrastructure as Code
 
Pc54
Pc54Pc54
Pc54
 
Audit your reactive applications
Audit your reactive applicationsAudit your reactive applications
Audit your reactive applications
 
Are app servers still fascinating
Are app servers still fascinatingAre app servers still fascinating
Are app servers still fascinating
 
State of jQuery June 2013 - Portland
State of jQuery June 2013 - PortlandState of jQuery June 2013 - Portland
State of jQuery June 2013 - Portland
 
Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...
Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...
Living in a Multi-lingual World: Internationalization in Web and Desktop Appl...
 
Why Java
Why JavaWhy Java
Why Java
 
Guides To Analyzing WebKit Performance
Guides To Analyzing WebKit PerformanceGuides To Analyzing WebKit Performance
Guides To Analyzing WebKit Performance
 
GeoServer Developers Workshop
GeoServer Developers WorkshopGeoServer Developers Workshop
GeoServer Developers Workshop
 
Jython in workflow and rules engines
Jython in workflow and rules enginesJython in workflow and rules engines
Jython in workflow and rules engines
 
Living in a multiligual world: Internationalization for Web 2.0 Applications
Living in a multiligual world: Internationalization for Web 2.0 ApplicationsLiving in a multiligual world: Internationalization for Web 2.0 Applications
Living in a multiligual world: Internationalization for Web 2.0 Applications
 
Java virtual machine
Java virtual machineJava virtual machine
Java virtual machine
 

Jython on Django

  • 1. Django on Jython Frank Wierzbicki frank.wierzbicki@sun.com
  • 2. Who am I? • Frank Wierzbicki • Project lead for Jython • I work at Sun (Oracle?) on Jython fulltime
  • 3. What is Jython? • Python that runs on the JVM • Compiled to Java bytecodes instead of Python bytecodes • Call Java code seamlessly from Python code
  • 4. Jython Status • Current prod version 2.2 is not useful for Django • Jython 2.5 beta4 is out • First RC as early as this Friday • So production release real-soon-now
  • 5. Modjy • Modjy implements WSGI for Jython • Acts as a bridge to Java Servlets • integrated into Jython’s core • This is a big part of how we get Django working.
  • 6. zxJDBC • zxJDBC implements DB-API • integrated into Jython’s core • Another crucial piece to get Django working.
  • 7. Jython on Django Status • Works well with Django 1.0.3 and postgresql • Other databases in progress: MySQL, Oracle, SQLite, MS SqlServer • Django 1.1 has some refactorings that Jython will need to catch up on...
  • 8. Why Jython? • Massive amounts of Java code out there • Some really useful Java libs • Great JVM ecosystem • Internal Java apps that are not yet exposed to the web
  • 9. What can I use? • setuptools • ez_install • virtualenv • pip • many more pure Python tools
  • 10. What can’t I use yet? • c-extensions • PIL • ctypes (but we’re working on this one!) • iPython (working on this too!)
  • 11. Configure Jython • Get ez_setup.py • run “jython ez_setup.py” • In Jython’s bin directory will be an ez_install that runs from Jython
  • 12. Installing Django on Jython • Get 1.0.3+ Django - run “jython setup.py install” • From http://django-jython.googlecode.com get django-jython-1.0b1.tar.gz, untar it and run “jython setup.py install” • see the django-jython project on googlecode.com for more detail
  • 13. Java Platform • Now takes advantage of Java 5 libraries • Java 5 concurrency libs: No GIL! • Use a choice of Java garbage collectors • Use Java native threads • -J flag namespace for JVM config
  • 14. Java Integration • Jython integrates well with Java • Java classes and interfaces can be subclassed from Jython • These subclasses are now “new style” classes.
  • 15. Example: The Java lib poi can read Excel
  • 17. Deployment • run “jython manage.py war --include-java- libs=jdbcdriver.jar” • This will produce a “war file” • Copy this war file to the auto-deploy directory for most application servers (like GlassFish)
  • 18. war format for doj |-- WEB-INF | |-- lib | `-- lib-python | |-- Lib | |-- django | |-- doj | `-- mysite `-- media
  • 19. Why Django on Jython? • Lots of ops departments out there that want to deploy to Java App Servers - “give us a war file” • They have lots of tools for monitoring, etc • Jython has a good story for threading and performance - and it’s getting better.
  • 20. Da Vinci Machine • JVM gets friendlier to dynamic languages • On the project plan for JDK 7 -- some of it has already there in a hidden state for JDK6 • Method Handles, Invokedynamic, etc • Hotspot is one of the world’s best tuned VMs - about to be tuned better for us!
  • 21. Jython Book due in 2009 from Apress • Josh Juneau • Jim Baker • Leo Soto • Victor NG • Frank Wierzbicki
  • 22. Where to Find Out More • http://www.jython.org • http://wiki.python.org/jython • http://fwierzbicki.blogspot.com • Twitter: fwierzbicki • http://www.netbeans.org/features/python/ • https://glassfish.dev.java.net/