Jython in workflow and rules engines

975 views
842 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
975
On SlideShare
0
From Embeds
0
Number of Embeds
45
Actions
Shares
0
Downloads
10
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Jython in workflow and rules engines

  1. 1. @naPyVo 28.2.2013Jython--a powerful scripting languagefor workflow and rules engines Václav Tunka Software engineer, JBoss by Red Hat Twitter: @vtunka 1
  2. 2. Is JVM an unusual place?
  3. 3. Why Jython? No Global Interpreter Lock => true parallelism and concurrency. 3
  4. 4. Why Jython? 4
  5. 5. Why Jython?• Usage of the best Garbage Collectors including several concurrent GCs.• Native access to Java API.• Access to Java Concurrency libraries with support for concurrent collections.• Polyglot JVM – use the best tools for the job eg. Clojure for functional programming, Jython for scripting, etc.
  6. 6. Monitoring and profiling• VisualVM, jprofiler, NetBeans, and other JVM tools enabling: – CPU, memory and thread monitoring. – Heap analysis, – Etc.• Need to have minimal memory consumption in Cloud -> JVM tools might help.
  7. 7. Long time ago, in a galaxy..• I used to work as a core developer on unnamed “dark-side” closed source platform: – ITIL compatible ERP platform with support for workflow and rules engine. – Written in Java, Jython used as scripting language for the workflow and rules engine. – Nice data integration solution.
  8. 8. Workflow engines• Similar to state machines: defined states, transition rules, inputs & outputs etc.• Standardization process in place, mainly BPMN standard in 2.0 release.• Can be used for easy creation of Information systems & UI dialogs based on simple process definition.
  9. 9. Jython in Worfklow engines• Used to script custom tasks mainly because: – Python is easily readable, – Forces users to format their code properly, – Dynamic typing & better scripting capabilities than Java, – Runs on multiple platforms inside JVM.
  10. 10. Rules engines• Provide a declarative way to solve various repeating rule based tasks including NP problems, eg. Travelling salesman.• You declaratively define rules, for example in Jython.• The rules engine provides the resolution for you automatically.
  11. 11. Questions? 12
  12. 12. 13
  13. 13. On unrelated note - Project Odd• Project by Red Hat that aims to support dynamic languages running on JBoss Application Server for better asynchronous programming & concurrency support etc..• Provides native API for dynamic languages.• Currently: TorqueBox for Ruby, Dyn.JS for Javascript, Immutant for Closure.
  14. 14. Image References• Slide 7 image Courtesy of project presentations• Jython logo – slide 2: jython.org• PyVo community logo, courtesy of python.cz• Lock image from slide 3• Python image from slide 1 Courtesy of Michael Cvet

×