Service Data in Grid Services  Service Data allows us to easily include a set of structured data to any service, which can then be processed directly.

Slides:



Advertisements
Similar presentations
Using RMI–IIOP in the Development of Distributed Applications Dr. P.G.Sarang, President & ABCOM Information Systems Private. Limited.,
Advertisements

Grid Services and Microsoft.NET The MS.NETGrid Project Dr. Mike Jackson EPCC All Hands Meeting.
OGSI on Microsoft.NET Daragh Byrne, Ally Hume, Mike Jackson EPCC Budapest, Hungary – November.
A1.1 Assignment 1 “Deploying a Simple Web Service” ITCS 4010/5010 Grid Computing, UNC-Charlotte B. Wilkinson, 2005.
Mini project /2 Jini - a new computing paradigm.
Remote method invocation. Introduction First introduced in JDK 1.1. Allows distributed Java programs to work with each others by behaving as if they are.
General introduction to Web services and an implementation example
Mark Holliday and Barry Wilkinson, 2004A2.1 Assignment 2 “Simple” Grid Services Assignment.
Web Services Web Services are the basic fundamental building blocks of invoking features that can be accessed by an application program. The accessibility.
Barry Wilkinson and Mark Holliday, 2004A1.1 Assignments Preliminaries Several computers are configured at WCU for the assignments. Here, terra.cs.wcu.edu.
A1.1 Assignment 1 “Deploying a Simple Web Service”
This product includes material developed by the Globus Project ( Introduction to Grid Services and GT3.
1 CENTER FOR PARALLEL COMPUTERS An Introduction to Globus Toolkit® 3 -Developing Interoperable Grid services.
Project team: Quddus & Rajesh CS590L – Winter ’02 (Project 1) EJB tutorial – Screenshot 1: Creating the remote interface, the session bean class, the home.
CS 571. Web services Web service: "a software system designed to support interoperable machine-to-machine interaction over a network“ – W3C In short,
Assignment 2 Modifying, Compiling, and Deploying a Simple Service Presenter Information goes Here.
A2.1 ITCS 4010/5010 Grid Computing, 2005, UNC-Charlotte, B. Wilkinson Assignment 2 “Simple” Grid Services Assignment.
4a.1 Grid Computing Infrastructure Software ITCS 4146/5146, UNC-Charlotte, B. Wilkinson, 2007 Feb 16, 2007,
Remote Method Invocation Chin-Chih Chang. Java Remote Object Invocation In Java, the object is serialized before being passed as a parameter to an RMI.
Java RMI. What is RMI? RMI is an RPC system for an object based language. Objects provide a natural granularity for the binding of functions. –RMI allows.
3b.1 Web Services Part II Implementation details ITCS 4010 Grid Computing, 2005, UNC-Charlotte, B. Wilkinson, slides 3b version 0.1.
Lecture 10: Web Services. Outline Overview of Web Services Create a Web Service with Sun J2EE (JAX-RPC)
1 Web Services – Part II CS , Spring 2008/9.
Assignment 1 “Deploying a Simple Web Service” Mark Holliday Department of Mathematics and Computer Science Western Carolina University.
Distributed Web Software  Presentation-based, e.g., dynamic web pages  Service-based – Web Services.
Java Remote Object Invocation (RMI) Overview of RMI Java RMI allowed programmer to execute remote function class using the same semantics as local functions.
Java RMI RMI = Remote Method Invocation. Allows Java programs to invoke methods of remote objects. Only between Java programs. Several versions (JDK-1.1,
Distributed Web Software Presentation-based, e.g., dynamic web pages Service-based – Web Services.
Intro to Apache Axis Siva Jagadeesan
Web Services CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
Web Services (tying it all together) and Introduction to Grid Services Concepts These slides are adapted from course material developed by Barry Wilkinson,
GT3 Tutorial Chapter 5, 6, and 7 Lecture for Cluster and Grid Computing, CSCE 490/590 Fall 2004, University of Arkansas, Dr. Amy Apon
Jonathan Schisler Advanced DBMS 2/10/2005 An Overview of Grid Computing.
1 Lecture 22 George Koutsogiannakis Summer 2011 CS441 CURRENT TOPICS IN PROGRAMMING LANGUAGES.
1 3. Implementing Web Services 1.Create SOAP proxy interfaces and WSDL based service descriptions 2.Register/publish services 3.Stores service descriptions.
© 2005 by IBM; made available under the EPL v1.0 | March 1, 2005 Tim deBoer Gorkem Ercan Extend WTP Server Tools for your.
WSDL Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
1 Notes adapted from Barry Wilkinson Grid Computing Course UNCC Web Service Resource Framework Creating Globus 4 services.
Grid Computing, B. Wilkinson, 20043b.1 Web Services Part II.
4c.1 Grid Computing, B. Wilkinson, 2005 Web Service Resource Framework Creating Globus 4 services.
COP 4991 Component Based Software Development Lecture #4 Java Web Services Onyeka Ezenwoye.
WSRF & WSRF’s Application in VO-DAS Haijun Tian ChinaVO
CS 584 Lecture 18 l Assignment » Glenda assignment extended to the Java RMI Deadline » No Java RMI Assignment l Test » Friday, Saturday, Monday.
Sun’s Jini Lab 2 Service Registration Client Lookup.
Introduction to Globus Toolkit 4 at LA Grid CIS 6612 – Autonomic Grid Computing Summer 2006 PresentersFernando FarfánMayelin Felipe AgnosticsDiego LópezRamakrishna.
The Globus Toolkit 4 (GT4) A brief introduction. Web Services, WSRF, OGSA and GT4.
Grid Services I - Concepts
Java Commodity Grid (Java CogKit) Java CogKits allow developers to use commodity technologies such as Java or Python in programming the Grid based on Globus.
Mike Jackson EPCC OGSA-DAI Architecture + Extensibility OGSA-DAI Tutorial GGF17, Tokyo.
1 Creating Web Services Presented by Ashraf Memon Hands-on Ghulam Memon, Longjiang Ding.
This product includes material developed by the Globus Project ( Excercise 3 Inspection: Add Service Data.
Project Demo- Grid Notification Presentation by: Ben Zhang.
How to Write a Grid Service  The grid service will do basic mathematical operations. The math grid service is going to have the following methods:  add:
GT3 Tutorial Chapter 3 and Chapter 4 Lecture for Cluster and Grid Computing, CSCE 490/590 Fall 2004, University of Arkansas, Dr. Amy Apon
Modern Programming Language. Web Container & Web Applications Web applications are server side applications The most essential requirement.
Creating Web Services Presented by Ashraf Memon Presented by Ashraf Memon.
® IBM Software Group © 2006 IBM Corporation Rational Asset Manager v7.2 Using Scripting Tutorial for using command line and scripting using Ant Tasks Carlos.
UMBC Distributed Computing with Objects RMI/Corba CMSC 432 Shon Vick.
WP3 Implementing R-GMA grid services in GT3 Abdeslem Djaoui & WP3 Grid Services Task Force 7 th EU Datagrid meeting 26/09/2003
DataGrid is a project funded by the European Commission EDG Conference, Heidelberg, Sep 26 – Oct under contract IST OGSI and GT3 Initial.
This product includes material developed by the Globus Project ( Exercise 8 Transience: Create and Destroy FileShares.
Netprog Java RMI1 Remote Method Invocation.
Net-centric Computing Web Services. Lecture Outline  What is Web Service  Web Service Architecture  Creating and using Java Web Services  Apache Axis.
January 14 th -15 th 2004 OGSI on Microsoft.NET Daragh Byrne – EPCC.
November, 2006 Developing Service using GT4 Writing Your First Stateful Web Service in 5 Simple Steps Adam Belloum.
Chapter 5 Remote Procedure Call
J2EE Application Development
Chapter 9 Web Services: JAX-RPC, WSDL, XML Schema, and SOAP
Introduction to Web Services
CS 584 Lecture 18 Assignment Glenda assignment extended to the Java RMI Deadline No Java RMI Assignment Test Friday, Saturday, Monday.
Presentation transcript:

Service Data in Grid Services  Service Data allows us to easily include a set of structured data to any service, which can then be processed directly through its interface.  State information: operation results, intermediate results…  Service metadata: system data, cost of using the service…

How to implement Service Data in Grid Services

 First, undeploy your previous Grid service.  cd $HOME/gt3  ant undeploy -Dgar.id=mathtutorial  Create a new directory called “servicedata” under $HOME/gt3/samples/.  cd $HOME/gt3/samples  mkdir servicedata

How to implement Service Data in Grid Services  Create the package directory structure:

How to implement Service Data in Grid Services  We require the following files:  Implementation file  Web service deployment descriptor that tells the web server how it should publish our Grid service.  Grid web service description language (GWSDL) file  Mappings file, which map GWSDL namespaces to Java packages  XML schema file (extension XSD) which specifies the complex data type of service data.  Client file to run the service.

How to implement Service Data in Grid Services  MathSDE.xsd: Create this file under mathtutorial/core/factory/schema directory.

How to implement Service Data in Grid Services  Service interface: Math.gwsdl which will be saved mathtutorial/core/factory/schema directory. <sd:serviceData name="MathData" type="data:MathDataType" minOccurs="1" maxOccurs="1" mutability="mutable" modifiable="false" nillable="false">

How to implement Service Data in Grid Services  Namespace file: namespace2package.mappings file to be saved under servicedata directory. http\:// http\:// http\:// http\:// http\://

How to implement Service Data in Grid Services  Implementation file: MathImpl.java file to be saved under mathtutorial/core/factory/ directory. package mathtutorial.core.factory.impl; import org.globus.ogsa.ServiceData; import org.globus.ogsa.impl.ogsi.GridServiceImpl; import org.globus.ogsa.GridContext; import org.globus.ogsa.GridServiceException; import mathtutorial.core.factory.Math.MathPortType; import mathtutorial.core.factory.MathDataType; import mathtutorial.core.factory.Math.*; import mathtutorial.core.factory.bindings.*; import mathtutorial.core.factory.service.*; import java.rmi.RemoteException;

How to implement Service Data in Grid Services  Implementation file: MathImpl.java file to be saved under mathtutorial/core/factory/impl directory. public class MathImpl extends GridServiceImpl implements MathPortType { private ServiceData mathDataSDE; private MathDataType mathDataValue; public MathImpl() { super("Simple MathService with Service Data");} public void postCreate(GridContext context) throws GridServiceException { super.postCreate(context); mathDataSDE = this.getServiceDataSet().create("MathData"); mathDataValue = new MathDataType(); mathDataValue.setLastOp("NONE"); mathDataValue.setNumOps(0); mathDataValue.setValue(0); mathDataSDE.setValue(mathDataValue); this.getServiceDataSet().add(mathDataSDE); }

How to implement Service Data in Grid Services  Implementation file: MathImpl.java file to be saved under mathtutorial/core/factory/impl directory. private void incrementOps() {int numOps = mathDataValue.getNumOps(); mathDataValue.setNumOps(numOps + 1); } public void add(int a) throws RemoteException {mathDataValue.setLastOp("Addition"); incrementOps(); mathDataValue.setValue(mathDataValue.getValue() + a); } public void subtract(int a) throws RemoteException {mathDataValue.setLastOp("Subtraction"); incrementOps(); mathDataValue.setValue(mathDataValue.getValue() - a); }

How to implement Service Data in Grid Services  WSDD file: Math. wsdd file to be saved under mathtutorial/core/factory/ directory. c <deployment name="defaultServerConfig" xmlns=" xmlns:java="

How to implement Service Data in Grid Services  Build.properties file: build.properties file to be saved under servicedata directory. ogsa.root=../.. interface.name=Math package.dir=./mathtutorial/core/factory package=mathtutorial.core.factory Copy build.xml file to be saved under servicedata directory.

How to implement Service Data in Grid Services  Client file: client.java to be saved under mathtutorial/core/factory/client directory. package mathtutorial.core.factory.client; import org.gridforum.ogsi.ExtensibilityType; import org.gridforum.ogsi.ServiceDataValuesType; import org.globus.ogsa.utils.AnyHelper; import org.globus.ogsa.utils.QueryHelper; import mathtutorial.core.factory.service.MathServiceGridLocator; import mathtutorial.core.factory.Math.MathPortType; import mathtutorial.core.factory.MathDataType; import java.net.URL;

How to implement Service Data in Grid Services  Client file: client.java to be saved under mathtutorial/core/factory/client directory. URL GSH = new java.net.URL(args[0]); int a = Integer.parseInt(args[1]); // Get a reference to the Math PortType MathServiceGridLocator mathServiceLocator = new MathServiceGridLocator(); MathPortType math = mathServiceLocator.getMathServicePort(GSH); // Get Service Data Element "MathData" ExtensibilityType extensibility = math.findServiceData(QueryHelper.getNamesQuery("MathData")); ServiceDataValuesType serviceData = AnyHelper.getAsServiceDataValues(extensibility); MathDataType mathData = (MathDataType) AnyHelper.getAsSingleObject(serviceData, MathDataType.class); // Write service data System.out.println("Value: " + mathData.getValue()); System.out.println("Previous operation: " + mathData.getLastOp()); System.out.println("# of operations: " + mathData.getNumOps()); // Call remote method math.add(a);

How to implement Service Data in Grid Services  Deployment:  Set the TUTORIAL_DIR environment variable to $HOME/gt3/samples/servicedata  setenv TUTORIAL_DIR $HOME/gt3/samples/servicedata  Deploy your service (Directory = $TUTORIAL_DIR)  ant -Dgwsdl.interface=true -Dpackage=mathtutorial.core.factory - Dinterface.name=Math -Dpackage.dir=mathtutorial/core/factory/ - Dgwsdl.interface=Math.gwsdl -Dsde.schema.file=MathSDE.xsd  Deploy in GT3 directory.  ant deploy - Dgar.name=$TUTORIAL_DIR/build/lib/mathtutorial.core.factory.Mat h.gar  Run your Grid service container:  globus-start-container –p $MYPORT

How to implement Service Data in Grid Services  Client Side:  Open another terminal.  Compile the Client.java:  javac -classpath./build/classes/:$CLASSPATH mathtutorial/core/factory/client/Client.java  Create an instance from your service.  ogsi-create-service /MathFactoryService math1  Run your client.  java -classpath./build/classes/:$CLASSPATH mathtutorial/core/factory/client/Client /MathFactoryService/math1 5