Java to C++: What would be needed ? Norman Graf (SLAC) ILC-CLIC Software, CERN May 28, 2009.

Slides:



Advertisements
Similar presentations
C++ Development on Linux Agenda Introduction Editors Debuggers GUI IDEs Make Automake Exploring further.
Advertisements

Using MapuSoft Instead of OS Vendor’s Simulators.
Internetteknologi (ITNET1) Extra Presentation Java IDE Tool Support.
Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
LCFI physics studies meeting, 28 th June 05 Sonja Hillertp. 1 Report from ILC simulation workshop, DESY June Aim of workshop: preparation for Snowmass;
got ? Research Project – April 1998 Hang Xia, Mark Wang, Richard S. Chang Updated: R Norman, August 1999.
Introduction to Java.
Java How to Program, 9/e Instructor: José M. Reyes Álamo © by Pearson Education, Inc. All Rights Reserved.
COP4020 Programming Languages
CS0007: Introduction to Computer Programming Setting Up Java.
L EC. 01: J AVA FUNDAMENTALS Fall Java Programming.
Apache Jakarta Tomcat Suh, Junho. Road Map Tomcat Overview Tomcat Overview History History What is Tomcat? What is Tomcat? Servlet Container.
Marlene Galea.  The JDK (Java Development Kit)  An IDE (Integrated Development Environment) ◦ Different IDEs include:  JCreator  NetBeans  BlueJ.
MSc Education Supporting Infrastructure Emil Doychev Vladimir Valkanov University of Plovdiv Bulgaria.
CMSC 202 Computer Science II for Majors Fall 2009 Introduction.
- Chaitanya Krishna Pappala Enterprise Architect- a tool for Business process modelling.
Lcsim A Java-based Reconstruction package for Particle Physics Tony Johnson on behalf of Norman Graf SLAC Scientific Computing Workshop June
Introduction to Java Programming. Contents 1. Java, etc. 2. Java's Advantages 3. Java's Disadvantages 4. Types of Java Code 5. Java Bytecodes 6. Steps.
CSC 110 A 1 CSC 110 Introduction to Python [Reading: chapter 1]
Starting Chapter 4 Starting. 1 Course Outline* Covered in first half until Dr. Li takes over. JAVA and OO: Review what is Object Oriented Programming.
Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.
Java Analysis Studio Tony Johnson Stanford Linear Accelerator Center CHEP 97 - April 1997.
CSCI 224 Introduction to Java Programming. Course Objectives  Learn the Java programming language: Syntax, Idioms Patterns, Styles  Become comfortable.
LCIO A persistency framework for LC detector simulation studies Frank Gaede, DESY, IT 4 th ECFA/DESY LC Workshop Amsterdam April 1 st -4 th 2003.
CSC300 Visual Programming Dr. Craig Reinhart. Objectives Teach the basics of C++ –You won’t be an expert but hopefully a very good novice –GUI development.
Marcelo de Paiva Guimarães Bruno Barberi Gnecco Marcelo Knorich Zuffo
CMSC 202 Computer Science II for Majors Object-Oriented Programming.
Advanced Analysis Environments What is the role of Java in physics analysis? Will programming languages at all be relevant? Can commercial products help.
Why Java? A brief introduction to Java and its features Prepared by Mithat Konar.
Org.lcsim Reconstruction and Analysis framework for ILC Detectors Tony Johnson SLAC July 2006.
BLU-ICE and the Distributed Control System Constraints for Software Development Strategies Timothy M. McPhillips Stanford Synchrotron Radiation Laboratory.
( )1 ISYE 7210 Simulation of Interactive, Real-Time Discrete Systems (in Java) Initial Notes Q: 2.day.2 9/20/2005 9:13 PM Christine M. Mitchell Center.
1 3. Computing System Fundamentals 3.1 Language Translators.
CPRG 215 Introduction to Object-Oriented Programming with Java Module 1-Introduction to Java Topic 1.1 Basics of Java Produced by Harvey Peters, 2008 Copyright.
Productivity Tools Ken Nguyen Department of Information Technology Clayton State University.
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
1CPSD Software Infrastructure for Application Development Laxmikant Kale David Padua Computer Science Department.
Getting started with Programming using IDE. JAVA JAVA IS A PROGRAMMING LANGUAGE AND A PLATFORM. IT CAN BE USED TO DELIVER AND RUN HIGHLY INTERACTIVE DYNAMIC.
PROGRAMMING LANGUAGES FOR WHEN USING QUANT ANALYSIS FOR HIGH FREQUENCY TRADING.
Computing System Fundamentals 3.1 Language Translators.
LC Software Workshop, May 2009, CERN P. Mato /CERN.
PRIOR TO WEB SERVICES THE OTHER TECHNOLOGIES ARE:.
1. An Introduction A Programming Language A Technology Java Development Kit Java API One Language: Three Editions Standard Edition Enterprise Edition.
Slide Advanced Programming 2004, based on LY Stefanus's slides Native Methods.
MONTE CARLO EVENT GENERATION IN A MULTILANGUAGE, MULTIPLATFORM ENVIRONMENT Norman Graf Tony Johnson Stanford Linear Accelerator Center Abstract: We discuss.
LCIO A persistency framework and data model for the linear collider CHEP 04, Interlaken Core Software, Wednesday Frank Gaede, DESY -IT-
Software Development Introduction
Predrag Buncic (CERN/PH-SFT) Software Packaging: Can Virtualization help?
การเขียนโปรแกรมภาษา จาวา Java Programming อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา Chapter 1.
“A Comprehensive Java-based Simulation Environment for Particle Physics” Tony Johnson SLAC September 2006.
SOFTWARE DEVELOPMENT FOUNDATIONS, 1/12/12 J. Yates Monteith, Clemson University.
Status of the ALCPG simulation & reconstruction Norman Graf (SLAC) TILC09, Tsukuba April 19, 2009.
Data Model: LCIO to LCIO2.0 Norman Graf (SLAC) ILC-CLIC Software, CERN May 28, 2009.
CMSC 202 Computer Science II for Majors Fall 2010 Introduction Version 9/101.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Introduction CMSC 202 Fall Instructors Mr. Ryan Bergeron – Lecture Section 01 Tues/Thu 1:00 – 2:15 am, Sondheim 111 – Lecture Section 04 Tues/Thu.
CS-140 Dick Steflik Lecture 3. Java C++ Interpreted optimized for the internet Runs on virtual ized machine Derived from C++ Good object model Widely.
The Basics of Android App Development Sankarshan Mridha Satadal Sengupta.
Applications Active Web Documents Active Web Documents.
Object Oriented Programming in
CST 1101 Problem Solving Using Computers
Before You Begin Nahla Abuel-ola /WIT.
Jim Fawcett CSE775 – Distributed Objects Spring 2012
Introduction Enosis Learning.
Introduction Enosis Learning.
Getting Started ARCS Lab..
CS-0401 INTERMEDIATE PROGRAMMING USING JAVA
F II 1. Background Objectives
JIT Compiler Design Maxine Virtual Machine Dhwani Pandya
from Lutz Dietrich and Hans Kluge
Presentation transcript:

Java to C++: What would be needed ? Norman Graf (SLAC) ILC-CLIC Software, CERN May 28, 2009

2 Problem Statement Need to identify areas where access to C++ from a Java environment is needed and/or provides an overwhelming benefit.

3

4 Why Java? Java is a pure Object Oriented Language  Simpler to learn and use than C++ Language design emphasizes ease-of-use Garbage collector takes care of freeing unused objects  Avoids distorting OO design by avoiding need for “ownership” Very powerful standard library  Large number of open-source libraries including libraries for scientific computing Platform independent, compile once just runs everywhere  Linux, Windows, Mac OSX) Physicist gets to concentrate on writing clean OO code to perform analysis tasks  Not understanding core dumps and learning difference between a pointer and a reference. Performance of Java code is close to that of C++  Dynamic (runtime) optimization can take into account actual usage patterns not available to static optimizers used by Fortran, C++  Garbage collection often more efficient than user malloc/free (or new/delete) Java is mainstream language  Taught in university courses  Used by majority of sourceforge “open-source” projects

5 Why Java? Full access to runtime information makes interface to scripting languages easy  Jython, JRuby, Pnuts, …  Get reflection for free because it is an OO language. Wide availability of tools  Several very powerful,free, IDE’s available: e.g. Netbeans, Eclipse Support editing, code completion, GUI building, debugging, performance profiling, refactoring, version control (CVS, Subversion), etc…  Advanced tools such as maven (Apache) make project management easy Maven is a Java based project management tool After checking out code, single command “maven”  downloads dependencies,  Required libraries  Test Data  compiles code  runs test suite  deploys code Maven can be integrated into IDE’s like Netbeans Excellent support for threads  Will become more important with hyper-core machines. Running on grid/cloud is straightforward.  JVM already provides the virtual machine Performance of org.lcsim in end-to-end LOI physics benchmarking exercise has been excellent

6 Technical possibilities JNI  Currently used to access legacy event generators Java  C++  Fortran  Also has been used to call C++ track-finding and fitting code as a proof-of-principle. JNA  Dynamically access native libraries from Java without JNI.

7 Interoperability – Next Step LCIO has been very successful in providing some interoperability between disparate ILC tools Obvious next step is to attempt “common geometry” system  org.lcsim and Marlin (GEAR) geometry already very similar  Have discussed this in the past (LCGO)  This is a good area for someone interested in ILC software to get involved. Java -> C++ interoperability  Ability to call C++ (MarlinReco) modules from org.lcsim?? Some experimentation ongoing with using SWIG to build glue code See somewhat related (pre-alpha) project G4Java 

8 Biases Mixing C++ and Java in same program does not work in a reasonable way. Passing objects back and forth between Java/C++ rapidly becomes a mess Lose all advantages of Java's portability Should only be a “last resort” Plug-compatibility, i.e. exchanging data via LCIO, works well and is our preferred method of proceeding.

9 ALCPG simulation & reconstruction group plans to continue development and support of SLIC and org.lcsim and SiD plans to continue to use these as their primary tools for detector optimization going forward in the short term.