Introduction to JXPL UNCW Grid Group Jeff Brown 11/13/2018.

Slides:



Advertisements
Similar presentations
Copyright 2001, ActiveState. XSLT and Scripting Languages or…XSLT: what is everyone so hot and bothered about?
Advertisements

Advanced XSLT. Branching in XSLT XSLT is functional programming –The program evaluates a function –The function transforms one structure into another.
JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
CS105 INTRODUCTION TO COMPUTER CONCEPTS INTRO TO PROGRAMMING Instructor: Cuong (Charlie) Pham.
1 IEEE SoutheastCon 2005, April 8-10, 2005, Ft. Lauderdale, Florida. JXPL: An XML-based Scripting Language for Workflow Execution in a Grid Environment.
1 IEEE SoutheastCon 2005, April 8-10, 2005, Ft. Lauderdale, Florida. JXPL: An XML-based Scripting Language for Workflow Execution in a Grid Environment.
Guide To UNIX Using Linux Third Edition
Mgt 240 Lecture Website Construction: Software and Language Alternatives March 29, 2005.
1 Chapter 20 — Creating Web Projects Microsoft Visual Basic.NET, Introduction to Programming.
XIS™ XML Intranet System. XIS, the XML Intranet System provides the foundation for your database production and management. XIS maximizes the flexible.
XP New Perspectives on Microsoft Access 2002 Tutorial 71 Microsoft Access 2002 Tutorial 7 – Integrating Access With the Web and With Other Programs.
TIBCO Designer TIBCO BusinessWorks is a scalable, extensible, and easy to use integration platform that allows you to develop, deploy, and run integration.
UNIT-V The MVC architecture and Struts Framework.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
AIT 616 Fall 2002 PHP. AIT 616 Fall 2002 PHP  Special scripting language used to dynamically generate web documents  Open source – Free!!!  Performs.
 2003 Prentice Hall, Inc. All rights reserved. CHAPTER 3 JavaScript 1.
Zhonghua Qu and Ovidiu Daescu December 24, 2009 University of Texas at Dallas.
COMPUTER PROGRAMMING Source: Computing Concepts (the I-series) by Haag, Cummings, and Rhea, McGraw-Hill/Irwin, 2002.
XML and its applications: 4. Processing XML using PHP.
1 HKU CSIS DB Seminar: HKU CSIS DB Seminar: Web Services Oriented Data Processing and Integration Speaker: Eric Lo.
JAVA SERVER PAGES. 2 SERVLETS The purpose of a servlet is to create a Web page in response to a client request Servlets are written in Java, with a little.
Web Services for Satellite Emulation Development Kathy J. LiszkaAllen P. Holtz The University of AkronNASA Glenn Research Center.
 2003 Prentice Hall, Inc. All rights reserved. CHAPTER 3 JavaScript 1.
Chapter 1 Introduction Chapter 1 Introduction 1 st Semester 2015 CSC 1101 Computer Programming-1.
Overview of Form and Javascript fundamentals. Brief matching exercise 1. This is the software that allows a user to access and view HTML documents 2.
CHAPTER 1 INTRODUCTION 2 nd Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
COSC617 Project XML Tools Mark Liu Sanjay Srivastava Junping Zhang.
Martin Kruliš by Martin Kruliš (v1.1)1.
Lecture 11 Introduction to R and Accessing USGS Data from Web Services Jeffery S. Horsburgh Hydroinformatics Fall 2013 This work was funded by National.
Lecture Transforming Data: Using Apache Xalan to apply XSLT transformations Marc Dumontier Blueprint Initiative Samuel Lunenfeld Research Institute.
USING ANDROID WITH THE INTERNET. Slide 2 Lecture Summary Getting network permissions Working with the HTTP protocol Sending HTTP requests Getting results.
Chapter 1 Introduction 2nd Semester H
Invitation to Computer Science 6th Edition
Advanced Computer Systems
Development Environment
Unit 4 Representing Web Data: XML
WWW and HTTP King Fahd University of Petroleum & Minerals
Objectives You should be able to describe: Interactive Keyboard Input
Spark Presentation.
The Selection Structure
XML in Web Technologies
Array.
Chapter 4 Computer Software.
IPC144 Introduction to Programming Using C Week 2 – Lesson 1
Chapter 11 Introduction to Programming in C
Lecture 1: Multi-tier Architecture Overview
Programming Fundamentals (750113) Ch1. Problem Solving
Topics Introduction Hardware and Software How Computers Store Data
Introduction CSC 111.
Chapter 11 Introduction to Programming in C
PHP.
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
CS105 Introduction to Computer Concepts Intro to programming
CMP 131 Introduction to Computer Programming
HYPERTEXT PREPROCESSOR BY : UMA KAKKAR
Chapter 11 Introduction to Programming in C
Topics Introduction to Value-returning Functions: Generating Random Numbers Writing Your Own Value-Returning Functions The math Module Storing Functions.
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
Programming Fundamentals (750113) Ch1. Problem Solving
A QUICK START TO OPL IBM ILOG OPL V6.3 > Starting Kit >
Lecture 8 Programming Paradigm & Languages. Programming Languages The process of telling the computer what to do Also known as coding.
Tutorial 7 – Integrating Access With the Web and With Other Programs
Tonga Institute of Higher Education IT 141: Information Systems
Programming Fundamentals (750113) Ch1. Problem Solving
Tonga Institute of Higher Education IT 141: Information Systems
An Introduction to JavaScript
XML and its applications: 4. Processing XML using PHP
CS105 Introduction to Computer Concepts Intro to programming
Unit 6 - XML Transformations
Presentation transcript:

Introduction to JXPL UNCW Grid Group Jeff Brown 11/13/2018

Outline Language Basics Origin Extensibility Application: OGSA-DAI Remote Processors Future Work Jeff Brown 11/13/2018

XML for Scripting Parsers are already written Many applications can create or edit scripts XSLT and XPath now available in J2SE and allow easy manipulation XML Schemas for validation Jeff Brown 11/13/2018

JXPL Arithmetic Arbitrary precision decimal calculations Exact integer calculations Exact rational arithmetic Jeff Brown 11/13/2018

Arithmetic Example <list xmlns="http://www.jxpl.org/script"> <primitive name="Math"> <property name="operation" value="pow"/> </primitive> <rational numerator="2345" denominator="1234"/> <integer value="21"/> </list> <rational numerator="59292503524459543483574528608696565761146402210435228762149810791015625" denominator="82721490990729572354240341674519931579954868568357449865241821184"/> Jeff Brown 11/13/2018

User-defined Functions Local variables Support recursion Extend language User-defined functions are treated exactly like built-in primitives Functions can overwrite built-in primitives Jeff Brown 11/13/2018

Before JXPL MathBoard Java Applet WYSIWYG mathematical environment User-defined functions Graphing Symbolic manipulation http://people.uncw.edu/brownj/mathboard/help Jeff Brown 11/13/2018

MathBoard Screen Shot Jeff Brown 11/13/2018 Basic formula editing on Getting Started page Bottom of page, sum n=1 to n=20 of n^3 / n! Change size. Change color. F(a,b)=a^b+a/b, F(2,3) and F(2,x). Now define x=6, and reevaluate f(2.x) g(x)=x^x D ctl-j x g ctl-z symbolic diff H(x)=8*sin(x)/x ctl-q drag to graph Jeff Brown 11/13/2018

MathBoard Data Structures Based on LISP Flexible function evaluation Easy symbolic manipulation Simple to string encode and parse Jeff Brown 11/13/2018

Saving State MathBoard can write an applet tag that causes it to appear in its present state Example <APPLET ALIGN="MIDDLE" ARCHIVE="jme.jar" CODE="jme.MathBoard.class" WIDTH=346 HEIGHT=127> <PARAM NAME="inline" VALUE="true"> <PARAM NAME="1" VALUE="c:73:76:Serif:0:20: 3 [ 5 ] sup [ 4 ] [ 7 ] / - "> </APPLET> Look at Taylor Polynomial example Applet writes state for presentation purposes Jeff Brown 11/13/2018

MathBoard Programming Functions LISP Cond statement Create simple programs in MathBoard Jeff Brown 11/13/2018

BKKC Calendar 1996 Burger King Kid Club activity calendar Game for September All players put marker on day 1 All players flip coin If heads, move forward If tails, move back, unless on day 1 First player to day 30 wins http://people.uncw.edu/brownj/MtBike/bkkc.html -- applet to simulate game http://people.uncw.edu/brownj/mathboard/help/game.html Jeff Brown 11/13/2018

BKKC in MathBoard people.uncw.edu/brownj/mathboard/help/game.html Underlying data structure makes it easy to extend MathBoard Going from mathematics language to general purpose processor is natural Jeff Brown 11/13/2018

Origin lf JXPL MathBoard encoded postfix strings XML structure perfect for LISP XML + MathBoard Engine = JXPL Jeff Brown 11/13/2018

JXPL Internal Data XML converted to Java objects Java objects easier to manipulate than XML DOM elements (may change in future) JxplElement: common super class JxplList JxplSymbol etc Jeff Brown 11/13/2018

DOM Level 3 JAX in Java 1.5 supports DOM level 3 Use XPath to query DOM XMLQuery ?? Advances in XML support might make it feasible for JXPL to use DOM internally instead of Java objects. Jeff Brown 11/13/2018

Extensibility: Defun JXPL does not provide a way to get the length of a list Use Defun to define function “length” Now you can use “length” just as if it were a built-in primitive Jeff Brown 11/13/2018

Extensibility: Primitive Interface public JxplElement evaluate(JxplElement input) Extend JXPL by implementing simple interface Create class mypackage.MyPrimitive Use name “mypackage.MyPrimitive” just as you would use the name of a built-in primitive JXPL processor searches CLASSPATH for your primitive Jeff Brown 11/13/2018

Application: OGSA-DAI DAI: Data Access and Integration Special type of Grid service called Grid Data Service (GDS) Access to databases, relational and XML Transformation of data (example: XSL) Deliver data to a variety of sinks, such as GridFTP, file system, email, other GDS Jeff Brown 11/13/2018

GDS Scripts GDS is controlled by an OGSA-DAI XML script OGSA-DAI scripting is not sophisticated enough to manage interaction between services Some GDS scripts need to be created at runtime Jeff Brown 11/13/2018

GDS Example GDS named source will query a database GDS named sink will transform data Source delivers its output to sink OGSA-DAI uses common data format (WebRowSet) for service interaction. Jeff Brown 11/13/2018

Managing GDS Interaction Use factory to create sink instance and store the handle of the instance Run sink service in separate thread so that it can wait for data delivery Create GDS script to control source service, incorporating handle of sink Use factory to create source and submit script Jeff Brown 11/13/2018

Managing GDS with JXPL A JXPL script can spawn a new thread for execution JXPL programs can wait for JXPL code in another thread to finish JXPL programs can create new scripts at runtime Many languages could be used to manage GDS interaction, but JXPL can be created in the graphical GridNexus environment Jeff Brown 11/13/2018

Remote JXPL Processors Each JXPL processor has a URI Processors can communicate with each other A processor might send a script to a remote site for evaluation Processors can get/set variables on remote processors Jeff Brown 11/13/2018

JXPL URIs ogsa://152.21.222.213/…/instanceName This uri is used by a JXPL processor whose evaluate method is exposed as a Grid service rmi://152.21.222.213/Jxpl This is the uri of a processor available through Remote Method Invocation (RMI) socket://152.21.222.213:1090/Jxpl Uri of processor accessed via http Jeff Brown 11/13/2018

JxplSymbol A symbol is the name of a JXPL variable Symbols use XML namespaces to indicate the uri of processor where the data is stored When a processor evaluates a symbol it checks the symbol’s namespace. If that namespace is different from it’s uri, it contacts the remote processor for the data. Jeff Brown 11/13/2018

Symbol Example <symbol xmlns:fire=“rmi://15.0.0.1/Jxpl” name=“fire:foo bar”/> When a processor evaluates the symbol “foo bar” it contacts the remote processor. If a processor is directed to store data as that symbol, then it stores it on the remote processor. Sections of a JXPL script can be named in a similar fashion, indicating that they should be executed remotely. Jeff Brown 11/13/2018

Future Work: Primality Proving Given a large integer n, determine whether or not n is prime (cannot be factored in a nontrivial way) Agrawal, Kayal and Saxena have recently proved that there is a polynomial-time algorithm for primality proving. The AKS algorithm is readily parallelizable. Jeff Brown 11/13/2018

MIRACL Multiprecision Integer and Rational C/C++ Library Designed specifically for the type of work needed in AKS, and other cryptography applications. Very efficient. Jeff Brown 11/13/2018

AKS Algorithm The algorithm involves modular arithmetic on polynomials over a finite ring. One polynomial must be raised to a very high power (n) and divided by another polynomial. Repeated squaring and dividing. Jeff Brown 11/13/2018

JXPL and MIRACL JXPL uses the Java Native Interface (JNI) to access MIRACL functions. It is necessary to create shared libraries for the different platforms that the JXPL processor might run on (libmiracl.so, miracl.dll) Jeff Brown 11/13/2018

Parallel AKS Start remote JXPL processors on machines in labs and classrooms on campus. Run a JXPL script on one machine that divvies the work, sends it to remote processors and waits for the results. Jeff Brown 11/13/2018

Summary JXPL is flexible enough for a variety of different tasks. XML format makes it easy for programs to write JXPL scripts. Designed for extensibility Network aware GridNexus makes it possible for non-programmers to use JXPL. Jeff Brown 11/13/2018