SlideShare ist ein Scribd-Unternehmen logo
1 von 56
Downloaden Sie, um offline zu lesen
Java und Python Das Beste aus beiden Welten nutzen Java Users Group Köln (05.10.2009, Köln) Andreas Schreiber  <Andreas.Schreiber@dlr.de> Deutsches Zentrum für Luft- und Raumfahrt e.V. http://www.dlr.de/sc
Das DLR
[object Object],[object Object],[object Object],[object Object],[object Object]
Standorte und Personal ,[object Object],[object Object],[object Object],   Köln    Lampoldshausen    Stuttgart    Oberpfaffenhofen Braunschweig       Göttingen Berlin -      Bonn Trauen      Hamburg    Neustrelitz Weilheim    Bremen -  
Leitbild - Mission ,[object Object],[object Object],[object Object],[object Object],[object Object]
Einrichtung Simulations- und Softwaretechnik ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Software-Entwicklung im DLR
Software-Entwicklung im DLR Größenordnung Über 1000 Mitarbeiter des  DLR entwickeln Software DLR ist eines der größten  Software-Häuser Deutschlands Das sind >100 Millionen EUR  Personalkosten pro Jahr
Software-Entwicklungen in Luft- und Raumfahrt Klassifizierung ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
 
The Right Tool for the Job
Java Warum wird Java verwendet? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Python  Warum wird Python verwendet? ,[object Object],[object Object],[object Object],def  fakultaet(x): if  x >  1 : return  x * fakultaet(x -  1 ) else: return   1
Python in Forschung und Wissenschaft ,[object Object],[object Object],[object Object],[object Object],“ I want to design  planes,  not software!”
“ Python has the cleanest,  most-scientist- or engineer  friendly syntax and semantics. -Paul F. Dubois Paul F. Dubois. Ten good practices in scientific programming. Comp. In Sci. Eng., Jan/Feb 1999, pp.7-11
Das Beste aus beiden Welten nutzen Großartige  Libraries  und Tool- Unterstützung Unschlagbar leicht zu erlernende Sprach-Syntax
Das Beste aus beiden Welten nutzen  Embedded Scripting… ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Das Beste aus beiden Welten nutzen  Integration von Python-Code in Java-Anwendungen… ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Tools zur Python-Java-Integration
Tools zur Python-Java-Integration Übersicht ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Python  Interpreter Python  Interpreter Java Virtual Machine (JVM) Java Code (Anwendung) JEPP JNI Python  Code JPype Jython Python  Code Interface/Protokoll Python  Code Python  Code
Nutzung von Python aus Java-Anwendungen ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Jython ,[object Object],[object Object],[object Object],[object Object],Java Virtual Machine Jython Python  Code Java  Application Code
Jython Code-Beispiel 1: Java Code ,[object Object],import  org.python.util.PythonInterpreter ; import  org.python.core.*; class  TestClass { public   static   void  main(String[] args) { try  { org.python.util.PythonInterpreter python = new  org.python.util.PythonInterpreter (); python.execfile( &quot;python_script.py&quot; ); }  catch  (Exception e) { System.out.println( “Some error!&quot; ); } }
Jython Code-Beispiel 2: Python Code ,[object Object],from  javax.swing  import  * frame = JFrame( &quot;Hello Jython&quot; ) label = JLabel( &quot;Hello   Jython!&quot; , JLabel.CENTER) frame.add(label) frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE) frame.setSize( 200 ,  100 ) frame.show()
JEPP Java Embedded Python ,[object Object],[object Object],[object Object],Python Interpreter Java Virtual Machine Java Application  Code Python  Code JNI JEPP
JEPP Code-Beispiel ,[object Object],[object Object],Jep jep =  new  Jep(false, SCRIPT_PATH, cl); jep.eval( &quot;print 'hello'&quot; ); jep.close(); Jep jep =  new  Jep(false, SCRIPT_PATH, cl); jep.runScript(SCRIPT_PATH + file); jep.close();
Nutzung von Java aus Python-Anwendungen ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
JPype Java to Python Integration ,[object Object],[object Object],[object Object],Python Interpreter JNI JPype Python  Application Code Java Virtual Machine Java Application Code
JPype Code-Beispiel (1) ,[object Object],from  jpype  import  * # Start JVM startJVM ( path to jvm.dll ,  &quot;-ea&quot; ) # Print &quot;Hello World&quot; java.lang.System.out.println( &quot;Hello World&quot; ) # Shutdown JVM shutdownJVM()
JPype Code-Beispiel (2) ,[object Object],import  jpype # Start JVM jpype.startJVM( path to jvm.dll ,  &quot;-ea&quot; ) # Create reference to java package javaPackage = jpype.JPackage( &quot;JavaPackageName&quot; ) # Create reference to java class javaClass = javaPackage.JavaClassName # Create instance of java class javaObject = javaClass() # Call java methods javaObject.JavaMethodName() # Shutdown JVM jpype.shutdownJVM()
JCC PyLucene's Code Generator ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Python Interpreter JNI Python Code Java Virtual Machine Java Application Code pythonExtension() Generated C++ Wrapper Code JCC Code Generator
JCC Code-Beispiel ,[object Object],import  jcc # Start JVM jcc.initVM(maxheap= ‘2000m’ , …)
JCC Code-Beispiel Nutzung von PyLucene: Durchsuchen des Lucene Index ,[object Object],from  lucene  import  QueryParser, IndexSearcher, StandardAnalyzer, FSDirectory, Hit, VERSION, initVM, CLASSPATH initVM(CLASSPATH) directory = FSDirectory.getDirectory( “index” , False) searcher = IndexSearcher(directory) analyzer = StandardAnalyzer() command = raw_input( &quot;Query:&quot; ) query = QueryParser( &quot;contents&quot; , analyzer).parse(command) hits = searcher.search(query) for  hit  in  hits: doc = Hit.cast_(hit).getDocument() print  'path:' , doc.get( &quot;path&quot; ), 'name:', doc.get( &quot;name&quot; ) searcher.close()
Interprozess-Kommunikation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Object Request Broker (ORBs) CORBA Java Virtual Machine Generated Java Code (Stub) Python Interpreter ORB Python  Application Code (Server) Generated  Python Code (Skeleton) Java Application Code (Client) IDL Compiler IDL
CORBA-Implementierungen für Python ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
CORBA-Beispiel Interface ,[object Object],module  HelloWorld { const  string Message =  &quot;Hello CORBA World!&quot; ; interface  Hello { string hello_world(); }; };
CORBA-Beispiel Python Server (Fnorb): Implementierung des Interfaces # Standard/built-in modules. import  sys # Fnorb modules. from  Fnorb.orb  import  BOA, CORBA # Stubs and skeletons generated by 'fnidl'. import  HelloWorld, HelloWorld_skel class  HelloWorldServer(HelloWorld_skel.Hello_skel): &quot;&quot;&quot; Implementation of the 'Hello' interface. &quot;&quot;&quot; def  hello_world(self):  print HelloWorld.Message  return  HelloWorld.Message
CORBA-Beispiel Python Server (Fnorb): Main Function def  main(argv):  # Initialise ORB and BOA orb = CORBA.ORB_init(argv, CORBA.ORB_ID) boa = BOA.BOA_init(argv, BOA.BOA_ID) # Create object reference obj = boa.create( 'fred' , HelloWorldServer._FNORB_ID) # Create an instance of the implementation class. impl = HelloWorldServer() # Activate the implementation   boa.obj_is_ready(obj, impl) # Write the stringified object reference to a file   open( 'Server.ref' ,  'w' ).write(orb.object_to_string(obj)) boa._fnorb_mainloop()  # Start the event loop return  0
CORBA-Beispiel  Java Client public   class  Client { public   static   void  main ( String args[] ) { java.util.Properties props = System.getProperties();  try  { org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args,props); org.omg.CORBA.Object obj = null; java.io.BufferedReader in =  new  java.io.BufferedReader( new  java.io.FileReader( “Server.ref&quot; )); String ref = in.readLine(); obj = orb.string_to_object(ref); Hello hello = HelloHelper.narrow(obj); hello.hello_world(); orb.destroy(); }  catch  (Exception e) { e.printStackTrace(); } }
Web Services SOAP Java Virtual Machine Servlet Container Java Application Code (Server) Python Interpreter Generated  Python Code (Stub) Python  Application Code (Client) Generated Java Code (Skeleton) WSDL Compiler WSDL
Web Services SOAP ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Weitere Remote Object Libraries ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Beispiele
Beispiel QF-Test – Automatisiertes Test von GUIs
Beispiel TENT – Software Integration and Workflow Management
Use Cases für Python-Scripting (1) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Use Cases für Python-Scripting (2) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Beispiel: Codes mit Python-Schnittstellen Numerische Simulations-Software in C++ bzw. Fortran  ,[object Object],[object Object],[object Object],[object Object],Eurofighter X-31
DataFinder ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
DataFinder-Erweiterung mit Java-Bibliotheken (1) Grid Application Toolkit (GAT) ,[object Object],[object Object],[object Object],[object Object]
DataFinder-Erweiterung mit Java-Bibliotheken (1) Provenance-Aufzeichnung ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Beispiel Provenance-Informationen in Simulations-Workflows Interaktionen: Konfiguration Prozessablauf  Monitoring Datentransfer Relationen: - r0:  i0  causes  i1 - r1:  i1  causes  i2 - r2:  i2  causes  i3 - r3:  i2  causes  i4 - r4:  i3  causes  i2 - r5:  i2  causes  m1 - r6:  i2  causes d1 - r7:  i0  causes d2 Status Akteur Process control File-Server Pre- Processing Parameter variation Simulation Visualization i0 i1 i2 i3 i4 m1 d1 d2 c1  c-1 c2  c-2 c3  c-3 c4 c-4
Hinweise
pyCologne Die Python User Group Köln ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Fragen? Kontakt www.andreas-schreiber.net twitter.com/onyame [email_address]

Weitere ähnliche Inhalte

Andere mochten auch

Recurso 2.4. complementario. ejer acti-tareas combas,-ifiie[1]
Recurso 2.4. complementario. ejer acti-tareas combas,-ifiie[1]Recurso 2.4. complementario. ejer acti-tareas combas,-ifiie[1]
Recurso 2.4. complementario. ejer acti-tareas combas,-ifiie[1]instilascumbres
 
Grey Oaks Partners
Grey Oaks PartnersGrey Oaks Partners
Grey Oaks PartnersThomasR595
 
Recipes for a successful production cloudfoundry deployment - CF Summit 2014
Recipes for a successful production cloudfoundry deployment - CF Summit 2014Recipes for a successful production cloudfoundry deployment - CF Summit 2014
Recipes for a successful production cloudfoundry deployment - CF Summit 2014Vinícius Carvalho
 
Trendlab Telco Report 2013/14 - Global Trends and Challenges for Companies an...
Trendlab Telco Report 2013/14 - Global Trends and Challenges for Companies an...Trendlab Telco Report 2013/14 - Global Trends and Challenges for Companies an...
Trendlab Telco Report 2013/14 - Global Trends and Challenges for Companies an...Sasserath Munzinger Plus
 
Dte scholarship advt
Dte scholarship advtDte scholarship advt
Dte scholarship advtgangarmitesh
 
Temario de gabinete
Temario de gabineteTemario de gabinete
Temario de gabineteTorreani
 
YesEuropa Building Bridges Association
YesEuropa Building Bridges AssociationYesEuropa Building Bridges Association
YesEuropa Building Bridges AssociationYesEuropa
 
DS-Rendite-Fonds: Ausschüttungen werden zurückgefordert! Können Anleger sich ...
DS-Rendite-Fonds: Ausschüttungen werden zurückgefordert! Können Anleger sich ...DS-Rendite-Fonds: Ausschüttungen werden zurückgefordert! Können Anleger sich ...
DS-Rendite-Fonds: Ausschüttungen werden zurückgefordert! Können Anleger sich ...Mathias Nittel
 
How to start and run a sanctuary
How to start and run a sanctuaryHow to start and run a sanctuary
How to start and run a sanctuaryBigCatRescue
 
BANGALORE LAWYERS / BANGALORE LAW FIRMS
BANGALORE LAWYERS / BANGALORE LAW FIRMSBANGALORE LAWYERS / BANGALORE LAW FIRMS
BANGALORE LAWYERS / BANGALORE LAW FIRMSsangam kumar
 
Mercadotecnia digital y redes sociales en México 2013
Mercadotecnia digital y redes sociales en México 2013Mercadotecnia digital y redes sociales en México 2013
Mercadotecnia digital y redes sociales en México 2013Brenda Treviño
 
International Ayurvedic Medical Journal (IAMJ - Sep 2016) - An Ayurvedic appr...
International Ayurvedic Medical Journal (IAMJ - Sep 2016) - An Ayurvedic appr...International Ayurvedic Medical Journal (IAMJ - Sep 2016) - An Ayurvedic appr...
International Ayurvedic Medical Journal (IAMJ - Sep 2016) - An Ayurvedic appr...Dr Amritha Edayilliam
 

Andere mochten auch (20)

Recurso 2.4. complementario. ejer acti-tareas combas,-ifiie[1]
Recurso 2.4. complementario. ejer acti-tareas combas,-ifiie[1]Recurso 2.4. complementario. ejer acti-tareas combas,-ifiie[1]
Recurso 2.4. complementario. ejer acti-tareas combas,-ifiie[1]
 
Grey Oaks Partners
Grey Oaks PartnersGrey Oaks Partners
Grey Oaks Partners
 
Recipes for a successful production cloudfoundry deployment - CF Summit 2014
Recipes for a successful production cloudfoundry deployment - CF Summit 2014Recipes for a successful production cloudfoundry deployment - CF Summit 2014
Recipes for a successful production cloudfoundry deployment - CF Summit 2014
 
AMIGOS UTA
AMIGOS  UTAAMIGOS  UTA
AMIGOS UTA
 
Trendlab Telco Report 2013/14 - Global Trends and Challenges for Companies an...
Trendlab Telco Report 2013/14 - Global Trends and Challenges for Companies an...Trendlab Telco Report 2013/14 - Global Trends and Challenges for Companies an...
Trendlab Telco Report 2013/14 - Global Trends and Challenges for Companies an...
 
Dte scholarship advt
Dte scholarship advtDte scholarship advt
Dte scholarship advt
 
Ucasocialmediav2
Ucasocialmediav2Ucasocialmediav2
Ucasocialmediav2
 
Temario de gabinete
Temario de gabineteTemario de gabinete
Temario de gabinete
 
Imprimir plinio
Imprimir plinioImprimir plinio
Imprimir plinio
 
YesEuropa Building Bridges Association
YesEuropa Building Bridges AssociationYesEuropa Building Bridges Association
YesEuropa Building Bridges Association
 
Lorenita
LorenitaLorenita
Lorenita
 
Los verdaderos ejercicios abdominales
Los verdaderos ejercicios abdominalesLos verdaderos ejercicios abdominales
Los verdaderos ejercicios abdominales
 
Seguro moto
Seguro motoSeguro moto
Seguro moto
 
Manual la responsabilidad_social_corporativa
Manual la responsabilidad_social_corporativaManual la responsabilidad_social_corporativa
Manual la responsabilidad_social_corporativa
 
DS-Rendite-Fonds: Ausschüttungen werden zurückgefordert! Können Anleger sich ...
DS-Rendite-Fonds: Ausschüttungen werden zurückgefordert! Können Anleger sich ...DS-Rendite-Fonds: Ausschüttungen werden zurückgefordert! Können Anleger sich ...
DS-Rendite-Fonds: Ausschüttungen werden zurückgefordert! Können Anleger sich ...
 
How to start and run a sanctuary
How to start and run a sanctuaryHow to start and run a sanctuary
How to start and run a sanctuary
 
BANGALORE LAWYERS / BANGALORE LAW FIRMS
BANGALORE LAWYERS / BANGALORE LAW FIRMSBANGALORE LAWYERS / BANGALORE LAW FIRMS
BANGALORE LAWYERS / BANGALORE LAW FIRMS
 
Manual+de+hirdoponia+sic
Manual+de+hirdoponia+sicManual+de+hirdoponia+sic
Manual+de+hirdoponia+sic
 
Mercadotecnia digital y redes sociales en México 2013
Mercadotecnia digital y redes sociales en México 2013Mercadotecnia digital y redes sociales en México 2013
Mercadotecnia digital y redes sociales en México 2013
 
International Ayurvedic Medical Journal (IAMJ - Sep 2016) - An Ayurvedic appr...
International Ayurvedic Medical Journal (IAMJ - Sep 2016) - An Ayurvedic appr...International Ayurvedic Medical Journal (IAMJ - Sep 2016) - An Ayurvedic appr...
International Ayurvedic Medical Journal (IAMJ - Sep 2016) - An Ayurvedic appr...
 

Ähnlich wie Java und Python - Das Beste aus beiden Welten nutzen

Python, Plone und Zope in der Luft- und Raumfahrtforschung
Python, Plone und Zope in der Luft- und RaumfahrtforschungPython, Plone und Zope in der Luft- und Raumfahrtforschung
Python, Plone und Zope in der Luft- und RaumfahrtforschungAndreas Schreiber
 
Python in der Luft- und Raumfahrt
Python in der Luft- und RaumfahrtPython in der Luft- und Raumfahrt
Python in der Luft- und RaumfahrtAndreas Schreiber
 
Einsatz von Subversion bei der Entwicklung technisch-wissenschaftlicher Software
Einsatz von Subversion bei der Entwicklung technisch-wissenschaftlicher SoftwareEinsatz von Subversion bei der Entwicklung technisch-wissenschaftlicher Software
Einsatz von Subversion bei der Entwicklung technisch-wissenschaftlicher SoftwareAndreas Schreiber
 
PyLucene@PyCon DE 2011
PyLucene@PyCon DE 2011PyLucene@PyCon DE 2011
PyLucene@PyCon DE 2011Thomas Koch
 
Abläufe mit PHP und Phing automatisieren
Abläufe mit PHP und Phing automatisierenAbläufe mit PHP und Phing automatisieren
Abläufe mit PHP und Phing automatisierenChristian Münch
 
Software-Engineering in der Luft- und Raumfahrt mit Open-Source-Tools
Software-Engineering in der Luft- und Raumfahrt mit Open-Source-ToolsSoftware-Engineering in der Luft- und Raumfahrt mit Open-Source-Tools
Software-Engineering in der Luft- und Raumfahrt mit Open-Source-ToolsAndreas Schreiber
 
B3 Lotus Expeditor Und Composite Applications
B3 Lotus Expeditor Und Composite ApplicationsB3 Lotus Expeditor Und Composite Applications
B3 Lotus Expeditor Und Composite ApplicationsAndreas Schulte
 
Ionic 2 - Hybridapps auf Steroiden
Ionic 2 - Hybridapps auf SteroidenIonic 2 - Hybridapps auf Steroiden
Ionic 2 - Hybridapps auf SteroidenHendrik Lösch
 
Hands-on Workshop: API-Dokumentation mit OpenAPI / Swagger in ASP.NET Core
Hands-on Workshop: API-Dokumentation mit OpenAPI / Swagger in ASP.NET CoreHands-on Workshop: API-Dokumentation mit OpenAPI / Swagger in ASP.NET Core
Hands-on Workshop: API-Dokumentation mit OpenAPI / Swagger in ASP.NET CoreGregor Biswanger
 
Gewinnung von OPEN SOURCE Techniken für junge Unternehmen
Gewinnung von OPEN SOURCE Techniken für junge UnternehmenGewinnung von OPEN SOURCE Techniken für junge Unternehmen
Gewinnung von OPEN SOURCE Techniken für junge UnternehmenBjoern Reinhold
 
20160229_ModernApplicationDevelopment_Python_KPatenge
20160229_ModernApplicationDevelopment_Python_KPatenge20160229_ModernApplicationDevelopment_Python_KPatenge
20160229_ModernApplicationDevelopment_Python_KPatengeKarin Patenge
 
Kuck mal, Node.js! Einstieg für .NET Entwickler mit Visual Studio Code und Ty...
Kuck mal, Node.js! Einstieg für .NET Entwickler mit Visual Studio Code und Ty...Kuck mal, Node.js! Einstieg für .NET Entwickler mit Visual Studio Code und Ty...
Kuck mal, Node.js! Einstieg für .NET Entwickler mit Visual Studio Code und Ty...Gregor Biswanger
 
Die freie Programmiersprache Python
Die freie Programmiersprache Python Die freie Programmiersprache Python
Die freie Programmiersprache Python Andreas Schreiber
 
fn project serverless computing
fn project serverless computingfn project serverless computing
fn project serverless computingWolfgang Weigend
 
Automatisierung von Windows-Anwendungen
Automatisierung von Windows-AnwendungenAutomatisierung von Windows-Anwendungen
Automatisierung von Windows-AnwendungenAndreas Schreiber
 
Der WordPress Wolpertinger
Der WordPress WolpertingerDer WordPress Wolpertinger
Der WordPress Wolpertingerfrankstaude
 
Vagrant, Puppet, Docker für Entwickler und Architekten
Vagrant, Puppet, Docker für Entwickler und ArchitektenVagrant, Puppet, Docker für Entwickler und Architekten
Vagrant, Puppet, Docker für Entwickler und ArchitektenOPITZ CONSULTING Deutschland
 
BASTA! 2017 Jubiläumskonferenz - Warum warten auf die IDE!?
BASTA! 2017 Jubiläumskonferenz - Warum warten auf die IDE!?BASTA! 2017 Jubiläumskonferenz - Warum warten auf die IDE!?
BASTA! 2017 Jubiläumskonferenz - Warum warten auf die IDE!?Robin Sedlaczek
 
Metaprogrammierung und Reflection
Metaprogrammierung und ReflectionMetaprogrammierung und Reflection
Metaprogrammierung und ReflectionStefan Marr
 

Ähnlich wie Java und Python - Das Beste aus beiden Welten nutzen (20)

Python, Plone und Zope in der Luft- und Raumfahrtforschung
Python, Plone und Zope in der Luft- und RaumfahrtforschungPython, Plone und Zope in der Luft- und Raumfahrtforschung
Python, Plone und Zope in der Luft- und Raumfahrtforschung
 
Python in der Luft- und Raumfahrt
Python in der Luft- und RaumfahrtPython in der Luft- und Raumfahrt
Python in der Luft- und Raumfahrt
 
Einsatz von Subversion bei der Entwicklung technisch-wissenschaftlicher Software
Einsatz von Subversion bei der Entwicklung technisch-wissenschaftlicher SoftwareEinsatz von Subversion bei der Entwicklung technisch-wissenschaftlicher Software
Einsatz von Subversion bei der Entwicklung technisch-wissenschaftlicher Software
 
PyLucene@PyCon DE 2011
PyLucene@PyCon DE 2011PyLucene@PyCon DE 2011
PyLucene@PyCon DE 2011
 
Abläufe mit PHP und Phing automatisieren
Abläufe mit PHP und Phing automatisierenAbläufe mit PHP und Phing automatisieren
Abläufe mit PHP und Phing automatisieren
 
Software-Engineering in der Luft- und Raumfahrt mit Open-Source-Tools
Software-Engineering in der Luft- und Raumfahrt mit Open-Source-ToolsSoftware-Engineering in der Luft- und Raumfahrt mit Open-Source-Tools
Software-Engineering in der Luft- und Raumfahrt mit Open-Source-Tools
 
B3 Lotus Expeditor Und Composite Applications
B3 Lotus Expeditor Und Composite ApplicationsB3 Lotus Expeditor Und Composite Applications
B3 Lotus Expeditor Und Composite Applications
 
Ionic 2 - Hybridapps auf Steroiden
Ionic 2 - Hybridapps auf SteroidenIonic 2 - Hybridapps auf Steroiden
Ionic 2 - Hybridapps auf Steroiden
 
Hands-on Workshop: API-Dokumentation mit OpenAPI / Swagger in ASP.NET Core
Hands-on Workshop: API-Dokumentation mit OpenAPI / Swagger in ASP.NET CoreHands-on Workshop: API-Dokumentation mit OpenAPI / Swagger in ASP.NET Core
Hands-on Workshop: API-Dokumentation mit OpenAPI / Swagger in ASP.NET Core
 
Gewinnung von OPEN SOURCE Techniken für junge Unternehmen
Gewinnung von OPEN SOURCE Techniken für junge UnternehmenGewinnung von OPEN SOURCE Techniken für junge Unternehmen
Gewinnung von OPEN SOURCE Techniken für junge Unternehmen
 
20160229_ModernApplicationDevelopment_Python_KPatenge
20160229_ModernApplicationDevelopment_Python_KPatenge20160229_ModernApplicationDevelopment_Python_KPatenge
20160229_ModernApplicationDevelopment_Python_KPatenge
 
Kuck mal, Node.js! Einstieg für .NET Entwickler mit Visual Studio Code und Ty...
Kuck mal, Node.js! Einstieg für .NET Entwickler mit Visual Studio Code und Ty...Kuck mal, Node.js! Einstieg für .NET Entwickler mit Visual Studio Code und Ty...
Kuck mal, Node.js! Einstieg für .NET Entwickler mit Visual Studio Code und Ty...
 
Die freie Programmiersprache Python
Die freie Programmiersprache Python Die freie Programmiersprache Python
Die freie Programmiersprache Python
 
Ionic 3
Ionic 3Ionic 3
Ionic 3
 
fn project serverless computing
fn project serverless computingfn project serverless computing
fn project serverless computing
 
Automatisierung von Windows-Anwendungen
Automatisierung von Windows-AnwendungenAutomatisierung von Windows-Anwendungen
Automatisierung von Windows-Anwendungen
 
Der WordPress Wolpertinger
Der WordPress WolpertingerDer WordPress Wolpertinger
Der WordPress Wolpertinger
 
Vagrant, Puppet, Docker für Entwickler und Architekten
Vagrant, Puppet, Docker für Entwickler und ArchitektenVagrant, Puppet, Docker für Entwickler und Architekten
Vagrant, Puppet, Docker für Entwickler und Architekten
 
BASTA! 2017 Jubiläumskonferenz - Warum warten auf die IDE!?
BASTA! 2017 Jubiläumskonferenz - Warum warten auf die IDE!?BASTA! 2017 Jubiläumskonferenz - Warum warten auf die IDE!?
BASTA! 2017 Jubiläumskonferenz - Warum warten auf die IDE!?
 
Metaprogrammierung und Reflection
Metaprogrammierung und ReflectionMetaprogrammierung und Reflection
Metaprogrammierung und Reflection
 

Mehr von Andreas Schreiber

Provenance-based Security Audits and its Application to COVID-19 Contact Trac...
Provenance-based Security Audits and its Application to COVID-19 Contact Trac...Provenance-based Security Audits and its Application to COVID-19 Contact Trac...
Provenance-based Security Audits and its Application to COVID-19 Contact Trac...Andreas Schreiber
 
Visualization of Software Architectures in Virtual Reality and Augmented Reality
Visualization of Software Architectures in Virtual Reality and Augmented RealityVisualization of Software Architectures in Virtual Reality and Augmented Reality
Visualization of Software Architectures in Virtual Reality and Augmented RealityAndreas Schreiber
 
Provenance as a building block for an open science infrastructure
Provenance as a building block for an open science infrastructureProvenance as a building block for an open science infrastructure
Provenance as a building block for an open science infrastructureAndreas Schreiber
 
Raising Awareness about Open Source Licensing at the German Aerospace Center
Raising Awareness about Open Source Licensing at the German Aerospace CenterRaising Awareness about Open Source Licensing at the German Aerospace Center
Raising Awareness about Open Source Licensing at the German Aerospace CenterAndreas Schreiber
 
Open Source Licensing for Rocket Scientists
Open Source Licensing for Rocket ScientistsOpen Source Licensing for Rocket Scientists
Open Source Licensing for Rocket ScientistsAndreas Schreiber
 
Interactive Visualization of Software Components with Virtual Reality Headsets
Interactive Visualization of Software Components with Virtual Reality HeadsetsInteractive Visualization of Software Components with Virtual Reality Headsets
Interactive Visualization of Software Components with Virtual Reality HeadsetsAndreas Schreiber
 
Provenance for Reproducible Data Science
Provenance for Reproducible Data ScienceProvenance for Reproducible Data Science
Provenance for Reproducible Data ScienceAndreas Schreiber
 
Visualizing Provenance using Comics
Visualizing Provenance using ComicsVisualizing Provenance using Comics
Visualizing Provenance using ComicsAndreas Schreiber
 
Nachvollziehbarkeit mit Hinblick auf Privacy-Verletzungen
Nachvollziehbarkeit mit Hinblick auf Privacy-VerletzungenNachvollziehbarkeit mit Hinblick auf Privacy-Verletzungen
Nachvollziehbarkeit mit Hinblick auf Privacy-VerletzungenAndreas Schreiber
 
Reproducible Science with Python
Reproducible Science with PythonReproducible Science with Python
Reproducible Science with PythonAndreas Schreiber
 
A Provenance Model for Quantified Self Data
A Provenance Model for Quantified Self DataA Provenance Model for Quantified Self Data
A Provenance Model for Quantified Self DataAndreas Schreiber
 
Tracking after Stroke: Doctors, Dogs and All The Rest
Tracking after Stroke: Doctors, Dogs and All The RestTracking after Stroke: Doctors, Dogs and All The Rest
Tracking after Stroke: Doctors, Dogs and All The RestAndreas Schreiber
 
High Throughput Processing of Space Debris Data
High Throughput Processing of Space Debris DataHigh Throughput Processing of Space Debris Data
High Throughput Processing of Space Debris DataAndreas Schreiber
 
Bericht von der QS15 Conference & Exposition
Bericht von der QS15 Conference & ExpositionBericht von der QS15 Conference & Exposition
Bericht von der QS15 Conference & ExpositionAndreas Schreiber
 
Telemedizin: Gesundheit, messbar für jedermann
Telemedizin: Gesundheit, messbar für jedermannTelemedizin: Gesundheit, messbar für jedermann
Telemedizin: Gesundheit, messbar für jedermannAndreas Schreiber
 
Quantified Self mit Wearable Devices und Smartphone-Sensoren
Quantified Self mit Wearable Devices und Smartphone-SensorenQuantified Self mit Wearable Devices und Smartphone-Sensoren
Quantified Self mit Wearable Devices und Smartphone-SensorenAndreas Schreiber
 

Mehr von Andreas Schreiber (20)

Provenance-based Security Audits and its Application to COVID-19 Contact Trac...
Provenance-based Security Audits and its Application to COVID-19 Contact Trac...Provenance-based Security Audits and its Application to COVID-19 Contact Trac...
Provenance-based Security Audits and its Application to COVID-19 Contact Trac...
 
Visualization of Software Architectures in Virtual Reality and Augmented Reality
Visualization of Software Architectures in Virtual Reality and Augmented RealityVisualization of Software Architectures in Virtual Reality and Augmented Reality
Visualization of Software Architectures in Virtual Reality and Augmented Reality
 
Provenance as a building block for an open science infrastructure
Provenance as a building block for an open science infrastructureProvenance as a building block for an open science infrastructure
Provenance as a building block for an open science infrastructure
 
Raising Awareness about Open Source Licensing at the German Aerospace Center
Raising Awareness about Open Source Licensing at the German Aerospace CenterRaising Awareness about Open Source Licensing at the German Aerospace Center
Raising Awareness about Open Source Licensing at the German Aerospace Center
 
Open Source Licensing for Rocket Scientists
Open Source Licensing for Rocket ScientistsOpen Source Licensing for Rocket Scientists
Open Source Licensing for Rocket Scientists
 
Interactive Visualization of Software Components with Virtual Reality Headsets
Interactive Visualization of Software Components with Virtual Reality HeadsetsInteractive Visualization of Software Components with Virtual Reality Headsets
Interactive Visualization of Software Components with Virtual Reality Headsets
 
Provenance for Reproducible Data Science
Provenance for Reproducible Data ScienceProvenance for Reproducible Data Science
Provenance for Reproducible Data Science
 
Visualizing Provenance using Comics
Visualizing Provenance using ComicsVisualizing Provenance using Comics
Visualizing Provenance using Comics
 
Quantified Self Comics
Quantified Self ComicsQuantified Self Comics
Quantified Self Comics
 
Nachvollziehbarkeit mit Hinblick auf Privacy-Verletzungen
Nachvollziehbarkeit mit Hinblick auf Privacy-VerletzungenNachvollziehbarkeit mit Hinblick auf Privacy-Verletzungen
Nachvollziehbarkeit mit Hinblick auf Privacy-Verletzungen
 
Reproducible Science with Python
Reproducible Science with PythonReproducible Science with Python
Reproducible Science with Python
 
Python at Warp Speed
Python at Warp SpeedPython at Warp Speed
Python at Warp Speed
 
A Provenance Model for Quantified Self Data
A Provenance Model for Quantified Self DataA Provenance Model for Quantified Self Data
A Provenance Model for Quantified Self Data
 
Open Source im DLR
Open Source im DLROpen Source im DLR
Open Source im DLR
 
Tracking after Stroke: Doctors, Dogs and All The Rest
Tracking after Stroke: Doctors, Dogs and All The RestTracking after Stroke: Doctors, Dogs and All The Rest
Tracking after Stroke: Doctors, Dogs and All The Rest
 
High Throughput Processing of Space Debris Data
High Throughput Processing of Space Debris DataHigh Throughput Processing of Space Debris Data
High Throughput Processing of Space Debris Data
 
Bericht von der QS15 Conference & Exposition
Bericht von der QS15 Conference & ExpositionBericht von der QS15 Conference & Exposition
Bericht von der QS15 Conference & Exposition
 
Telemedizin: Gesundheit, messbar für jedermann
Telemedizin: Gesundheit, messbar für jedermannTelemedizin: Gesundheit, messbar für jedermann
Telemedizin: Gesundheit, messbar für jedermann
 
Big Python
Big PythonBig Python
Big Python
 
Quantified Self mit Wearable Devices und Smartphone-Sensoren
Quantified Self mit Wearable Devices und Smartphone-SensorenQuantified Self mit Wearable Devices und Smartphone-Sensoren
Quantified Self mit Wearable Devices und Smartphone-Sensoren
 

Java und Python - Das Beste aus beiden Welten nutzen

  • 1. Java und Python Das Beste aus beiden Welten nutzen Java Users Group Köln (05.10.2009, Köln) Andreas Schreiber <Andreas.Schreiber@dlr.de> Deutsches Zentrum für Luft- und Raumfahrt e.V. http://www.dlr.de/sc
  • 3.
  • 4.
  • 5.
  • 6.
  • 8. Software-Entwicklung im DLR Größenordnung Über 1000 Mitarbeiter des DLR entwickeln Software DLR ist eines der größten Software-Häuser Deutschlands Das sind >100 Millionen EUR Personalkosten pro Jahr
  • 9.
  • 10.  
  • 11. The Right Tool for the Job
  • 12.
  • 13.
  • 14.
  • 15. “ Python has the cleanest, most-scientist- or engineer friendly syntax and semantics. -Paul F. Dubois Paul F. Dubois. Ten good practices in scientific programming. Comp. In Sci. Eng., Jan/Feb 1999, pp.7-11
  • 16. Das Beste aus beiden Welten nutzen Großartige Libraries und Tool- Unterstützung Unschlagbar leicht zu erlernende Sprach-Syntax
  • 17.
  • 18.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35. Object Request Broker (ORBs) CORBA Java Virtual Machine Generated Java Code (Stub) Python Interpreter ORB Python Application Code (Server) Generated Python Code (Skeleton) Java Application Code (Client) IDL Compiler IDL
  • 36.
  • 37.
  • 38. CORBA-Beispiel Python Server (Fnorb): Implementierung des Interfaces # Standard/built-in modules. import sys # Fnorb modules. from Fnorb.orb import BOA, CORBA # Stubs and skeletons generated by 'fnidl'. import HelloWorld, HelloWorld_skel class HelloWorldServer(HelloWorld_skel.Hello_skel): &quot;&quot;&quot; Implementation of the 'Hello' interface. &quot;&quot;&quot; def hello_world(self): print HelloWorld.Message return HelloWorld.Message
  • 39. CORBA-Beispiel Python Server (Fnorb): Main Function def main(argv): # Initialise ORB and BOA orb = CORBA.ORB_init(argv, CORBA.ORB_ID) boa = BOA.BOA_init(argv, BOA.BOA_ID) # Create object reference obj = boa.create( 'fred' , HelloWorldServer._FNORB_ID) # Create an instance of the implementation class. impl = HelloWorldServer() # Activate the implementation boa.obj_is_ready(obj, impl) # Write the stringified object reference to a file open( 'Server.ref' , 'w' ).write(orb.object_to_string(obj)) boa._fnorb_mainloop() # Start the event loop return 0
  • 40. CORBA-Beispiel Java Client public class Client { public static void main ( String args[] ) { java.util.Properties props = System.getProperties(); try { org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args,props); org.omg.CORBA.Object obj = null; java.io.BufferedReader in = new java.io.BufferedReader( new java.io.FileReader( “Server.ref&quot; )); String ref = in.readLine(); obj = orb.string_to_object(ref); Hello hello = HelloHelper.narrow(obj); hello.hello_world(); orb.destroy(); } catch (Exception e) { e.printStackTrace(); } }
  • 41. Web Services SOAP Java Virtual Machine Servlet Container Java Application Code (Server) Python Interpreter Generated Python Code (Stub) Python Application Code (Client) Generated Java Code (Skeleton) WSDL Compiler WSDL
  • 42.
  • 43.
  • 45. Beispiel QF-Test – Automatisiertes Test von GUIs
  • 46. Beispiel TENT – Software Integration and Workflow Management
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53. Beispiel Provenance-Informationen in Simulations-Workflows Interaktionen: Konfiguration Prozessablauf Monitoring Datentransfer Relationen: - r0: i0 causes i1 - r1: i1 causes i2 - r2: i2 causes i3 - r3: i2 causes i4 - r4: i3 causes i2 - r5: i2 causes m1 - r6: i2 causes d1 - r7: i0 causes d2 Status Akteur Process control File-Server Pre- Processing Parameter variation Simulation Visualization i0 i1 i2 i3 i4 m1 d1 d2 c1 c-1 c2 c-2 c3 c-3 c4 c-4
  • 55.
  • 56. Fragen? Kontakt www.andreas-schreiber.net twitter.com/onyame [email_address]