SlideShare una empresa de Scribd logo
1 de 15
Descargar para leer sin conexión
@naPyVo
                                                   28.2.2013




Jython
--a powerful scripting language
for workflow and rules engines
                     Václav Tunka
                     Software engineer, JBoss by Red Hat
                     Twitter: @vtunka

                                                           1
Is JVM an unusual place?
Why Jython?




       No Global
       Interpreter Lock =>
       true parallelism and
       concurrency.
                          3
Why Jython?




              4
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.
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.
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.
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.
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.
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.
Questions?




             12
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.
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

Más contenido relacionado

Similar a Jython in workflow and rules engines

Introduction to Java Part-2
Introduction to Java Part-2Introduction to Java Part-2
Introduction to Java Part-2RatnaJava
 
Understand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java ApplicationsUnderstand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java ApplicationsC4Media
 
Introduction to Java
Introduction to Java Introduction to Java
Introduction to Java Hitesh-Java
 
JBCNConf: jBPM & Vert.x Reactive and Polyglot BPM
JBCNConf: jBPM & Vert.x Reactive and Polyglot BPMJBCNConf: jBPM & Vert.x Reactive and Polyglot BPM
JBCNConf: jBPM & Vert.x Reactive and Polyglot BPMMauricio (Salaboy) Salatino
 
Simple tweaks to get the most out of your jvm
Simple tweaks to get the most out of your jvmSimple tweaks to get the most out of your jvm
Simple tweaks to get the most out of your jvmJamie Coleman
 
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning StudioIntroduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning StudioMuralidharan Deenathayalan
 
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning StudioIntroduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning StudioMuralidharan Deenathayalan
 
Session 01 - Introduction to Java
Session 01 - Introduction to JavaSession 01 - Introduction to Java
Session 01 - Introduction to JavaPawanMM
 
Node.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel AvivNode.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel AvivRon Perlmuter
 
Lec 1-of-oop2
Lec 1-of-oop2Lec 1-of-oop2
Lec 1-of-oop2SM Rasel
 
Simple tweaks to get the most out of your JVM
Simple tweaks to get the most out of your JVMSimple tweaks to get the most out of your JVM
Simple tweaks to get the most out of your JVMJamie Coleman
 
Java Performance & Profiling
Java Performance & ProfilingJava Performance & Profiling
Java Performance & ProfilingIsuru Perera
 
Microsoft power point automation-opensourcetestingtools_matrix-1
Microsoft power point   automation-opensourcetestingtools_matrix-1Microsoft power point   automation-opensourcetestingtools_matrix-1
Microsoft power point automation-opensourcetestingtools_matrix-1tactqa
 
Microsoft power point automation-opensourcetestingtools_matrix-1
Microsoft power point   automation-opensourcetestingtools_matrix-1Microsoft power point   automation-opensourcetestingtools_matrix-1
Microsoft power point automation-opensourcetestingtools_matrix-1tactqa
 
Geoscience and Microservices
Geoscience and Microservices Geoscience and Microservices
Geoscience and Microservices Matthew Gerring
 

Similar a Jython in workflow and rules engines (20)

Introduction to Java Part-2
Introduction to Java Part-2Introduction to Java Part-2
Introduction to Java Part-2
 
Understand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java ApplicationsUnderstand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java Applications
 
Introduction to Java
Introduction to Java Introduction to Java
Introduction to Java
 
JBCNConf: jBPM & Vert.x Reactive and Polyglot BPM
JBCNConf: jBPM & Vert.x Reactive and Polyglot BPMJBCNConf: jBPM & Vert.x Reactive and Polyglot BPM
JBCNConf: jBPM & Vert.x Reactive and Polyglot BPM
 
Simple tweaks to get the most out of your jvm
Simple tweaks to get the most out of your jvmSimple tweaks to get the most out of your jvm
Simple tweaks to get the most out of your jvm
 
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning StudioIntroduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
 
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning StudioIntroduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
 
JAVA INTRODUCTION - 1
JAVA INTRODUCTION - 1JAVA INTRODUCTION - 1
JAVA INTRODUCTION - 1
 
Java Introduction
Java IntroductionJava Introduction
Java Introduction
 
Session 01 - Introduction to Java
Session 01 - Introduction to JavaSession 01 - Introduction to Java
Session 01 - Introduction to Java
 
Java virtual machine
Java virtual machineJava virtual machine
Java virtual machine
 
Node.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel AvivNode.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel Aviv
 
Lec 1-of-oop2
Lec 1-of-oop2Lec 1-of-oop2
Lec 1-of-oop2
 
Simple tweaks to get the most out of your JVM
Simple tweaks to get the most out of your JVMSimple tweaks to get the most out of your JVM
Simple tweaks to get the most out of your JVM
 
Java Performance & Profiling
Java Performance & ProfilingJava Performance & Profiling
Java Performance & Profiling
 
IPT 2.pptx
IPT 2.pptxIPT 2.pptx
IPT 2.pptx
 
Microsoft power point automation-opensourcetestingtools_matrix-1
Microsoft power point   automation-opensourcetestingtools_matrix-1Microsoft power point   automation-opensourcetestingtools_matrix-1
Microsoft power point automation-opensourcetestingtools_matrix-1
 
Microsoft power point automation-opensourcetestingtools_matrix-1
Microsoft power point   automation-opensourcetestingtools_matrix-1Microsoft power point   automation-opensourcetestingtools_matrix-1
Microsoft power point automation-opensourcetestingtools_matrix-1
 
Geoscience and Microservices
Geoscience and Microservices Geoscience and Microservices
Geoscience and Microservices
 
An Introduction to PyPy
An Introduction to PyPyAn Introduction to PyPy
An Introduction to PyPy
 

Jython in workflow and rules engines

  • 1. @naPyVo 28.2.2013 Jython --a powerful scripting language for workflow and rules engines Václav Tunka Software engineer, JBoss by Red Hat Twitter: @vtunka 1
  • 2. Is JVM an unusual place?
  • 3. Why Jython? No Global Interpreter Lock => true parallelism and concurrency. 3
  • 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. 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.
  • 8. 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.
  • 9. 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.
  • 10. 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.
  • 11. 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.
  • 13. 13
  • 14. 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.
  • 15. 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