Four current methods of distributed computing

Download Report

Transcript Four current methods of distributed computing

Distributed Computing Technologies –
Selecting an Appropriate Approach
Philip Maechling
Web Services Workshop
UNAVCO/IRIS Joint
Workshop
8 June 2005
Outline
• Discuss different approaches to distributed
computing with examples from real life.
• Based largely on: Seismic Hazard Analysis Using
Distributed Computing in the SCEC Community
Modeling Environment : March/April 2005 Electronic
Seismologist Column
June 8, 2006
UNAVCO/IRIS Web Services Workshop
2
A New Computing Model for Scientific
Computing
• Can we utilize a distributed, componentbased computing model to do science?
• What technologies are available?
• What are the advantages/disadvantages
for each?
June 8, 2006
UNAVCO/IRIS Web Services Workshop
3
A New Computing Model for Scientific
Computing
• Premise is that there is no “one-best” approach
that fits all Projects or needs (unfortunately).
• Encourage Discussion and groups experiences
with these technologies
June 8, 2006
UNAVCO/IRIS Web Services Workshop
4
A New Computing Model for Scientific
Computing
Program 1 Program 2 Program 3 Program 4 Program 5
USC
P1
P2
IRIS
June 8, 2006
P3
SDSC
UNAVCO/IRIS Web Services Workshop
P4
SCEC
P5
JPL
5
A New Computing Model for Scientific
Computing
June 8, 2006
UNAVCO/IRIS Web Services Workshop
6
Why is this a hard problem ?
• Multiple programming languages
• Multiple hardware platforms
• Multiple operating systems
• Multiple data types and data formats
• Reliability/Stability of components
• Discovering what is available
• Communications bandwidth and reliability
• Practical issues of support, development, tools,
infrastructure, funding etc.
June 8, 2006
UNAVCO/IRIS Web Services Workshop
7
Characteristics of Technologies that impact
selection
•
Where does program run (Client Side or Server Side)
•
Input and output and output data types
•
How a components is called (API)
•
Support for Objects
•
Statefulness of components
•
Blocking versus non-blocking calls
•
Communication Protocol
•
Speed
•
Robustness
•
Scalability Number of Clients by a Server
•
Server Security
•
Client and Server Program languages
•
Peer to Peer between computers or Client Server Model
June 8, 2006
UNAVCO/IRIS Web Services Workshop
8
Desirable Characteristics of a Solution
• Distributed
• Secure
• Multi-organizational
• Multi-language
• Loose coupling
• High cohesion
• Minimal modifications to existing codes
• Minimal costs
• Minimal training time
• Standards-based
June 8, 2006
UNAVCO/IRIS Web Services Workshop
9
Component Characteristic
• Stateful
– A stateful component maintains information
about previous calls.
• Object Oriented
– An object oriented component allows you to
create an stateful instance of the
component. It provides user defined
interfaces to the component.
June 8, 2006
UNAVCO/IRIS Web Services Workshop
10
Technologies Not Considered
Existing Distributed Computing technologies not consider
here due to limited inroads into geophysics community:
• Remote Procedure Calls (RPC)
• DCOM
• Enterprise Java Beans
• .Net
• Common Component Architecture (CCA)
June 8, 2006
UNAVCO/IRIS Web Services Workshop
11
Client Side Techniques
Example Client Side Technologies
• Java Applets
• JavaScript
• Macromedia Flash
• Active X
June 8, 2006
UNAVCO/IRIS Web Services Workshop
12
Client Side Techniques
• Java Applet Advantages
– Download the program into your browser
– Program runs on your computer
– Rich User Interfaces
– Reasonably Secure
June 8, 2006
UNAVCO/IRIS Web Services Workshop
13
Client Side Techniques
• Java Applet Disadvantages
– Uses CPU on the client
– Distribution of code only, not shared computing
processing
– Required JVM in browser on client
– Security limitations on what applet can do (e.g. accessing
files on local machine may be restricted)
June 8, 2006
UNAVCO/IRIS Web Services Workshop
14
Considering Using Java Applets When….
• Want rich interface including graphics
• Want users to use their own computer
• Want secure run-time on users platform
• Want to distribute new versions of code
• Want platform independence
June 8, 2006
UNAVCO/IRIS Web Services Workshop
15
Common Distributed Programs
• Web Browsers
– Variety of Client side and Server Side execution
– Standards-based (W3C)
– Great Interoperability for non-dynamic content
– Interoperability issues typically on client side
technologies (JavaScript, Flash etc)
– Where’s the click stream
June 8, 2006
UNAVCO/IRIS Web Services Workshop
16
Common Gateway Interface (CGI Scripts)
June 8, 2006
UNAVCO/IRIS Web Services Workshop
17
HTTP based Program calls
• Parameters are passed as parameter_name=parameter_value pair
during invocation of cgi-bin or servlet
Examples:
• http://www.SOMEWHERE.org/cgi-bin/ice_cream.plx?flavor=mint
• http://66.102.7.104/search?q=cache:AU7xpnWlL0wJ:pyre.thirdbit.com/2004-fall/tomcat.ppt+History+of+Servlet+Containers&hl=en
June 8, 2006
UNAVCO/IRIS Web Services Workshop
18
CGI Disadvantages
• May overwhelm server
• Security issues
• Not stateful
• Practical issue relating to web server
technologies such as web server capacities
and communications timeouts.
June 8, 2006
UNAVCO/IRIS Web Services Workshop
19
Considering Using CGI When….
• Want minimal installation and operation
• Small number of users
• Want to use common
programming/scripting languages (perl,
php)
• Dynamic web pages
• Display data from database
June 8, 2006
UNAVCO/IRIS Web Services Workshop
20
Java Servlets
• Java-based server side technology
• Adds memory and process management
(improves scalability) through the user of a
“servlet engine” or “servlet container”
• Security and performance improvements
June 8, 2006
UNAVCO/IRIS Web Services Workshop
21
Java Servlet Interface
June 8, 2006
UNAVCO/IRIS Web Services Workshop
22
Servlet Advantages
• Executable stays in memory once it is called
• Container provides memory and process
management
• Added safety and security
• Easy to add statefulness
• Server side code is Java, so it’s platform
independent.
June 8, 2006
UNAVCO/IRIS Web Services Workshop
23
Servlet Advantages
• Executable stays in memory once it is called
• Container provides memory and process
management
• Added safety and security
• Easy to add statefulness
June 8, 2006
UNAVCO/IRIS Web Services Workshop
24
Servlet Disadvantages
• Not Object Oriented Interface
• Not inherently Stateful
• Limitations on input and output types
• Practical issues with size of data in and out
(e.g. web server time-outs)
June 8, 2006
UNAVCO/IRIS Web Services Workshop
25
Considering Using Servlets When….
• Want higher performance from server
• Want to protect server from being
overwhelmed by calls
• Want to build Dynamic web pages
• Display data from database
• Want platform independence on server side
code
• Want to work in Java including access to all the
Java Libraries
June 8, 2006
UNAVCO/IRIS Web Services Workshop
26
Web Services
• Standards-based approach to distributed
computing.
• Follows Model of Web Browser/Web Server
Technology
• Establishes Exchange Format (XML),
Communication Protocol (SOAP), and Interface
Definition (WSDL)
June 8, 2006
UNAVCO/IRIS Web Services Workshop
27
Web Services Interface
June 8, 2006
UNAVCO/IRIS Web Services Workshop
28
Web Services XML Request/Response
June 8, 2006
UNAVCO/IRIS Web Services Workshop
29
Web Services Advantages
• Could transform distributed computing like WWW
has transformed information sharing
• Standards-based
• Uses standard ports
• Interoperability between languages
• Hardware independent
June 8, 2006
UNAVCO/IRIS Web Services Workshop
30
Web Services Disadvantages
• Not Object Oriented Interface
• Not Stateful
• Limitations on input and output types
• Trades performance for interoperability
• Many standards
• Large data transfers typically done out of band losing
interoperability advantages
June 8, 2006
UNAVCO/IRIS Web Services Workshop
31
Considering Using Web Services When….
• Interoperability is more important
performance
• Want to interoperate between languages
• Want standards based system
• Want access to commercial tools and
techniques
June 8, 2006
UNAVCO/IRIS Web Services Workshop
32
Common Object Request Broker
Architecture (CORBA)
• CORBA is a specification for distributed object
technology
– Language independent (Supports C, C++, Fortran,
Java, others)
– Full Object Support
– Robust communication Protocol
• Stable, mature CORBA implementations are
available including open source and real-time
versions.
June 8, 2006
UNAVCO/IRIS Web Services Workshop
33
CORBA Operation
June 8, 2006
UNAVCO/IRIS Web Services Workshop
34
CORBA Operation
June 8, 2006
UNAVCO/IRIS Web Services Workshop
35
CORBA Advantages
• Object oriented, robust, well supported
• Many features such as object discovery
June 8, 2006
UNAVCO/IRIS Web Services Workshop
36
CORBA Disadvantages
• Fairly complex
• May have more features than you need
June 8, 2006
UNAVCO/IRIS Web Services Workshop
37
CORBA Pro/Cons
June 8, 2006
UNAVCO/IRIS Web Services Workshop
38
Considering Using CORBA When….
• Multi-language support
• Very high reliability
• Object oriented systems
• Dynamic discovery of object and services
June 8, 2006
UNAVCO/IRIS Web Services Workshop
39
Java Remote Method Invocation (Java
RMI)
• Java RMI is distributed object technology
developed to work with the Java Language
• Comprehensive, Object-oriented, platform
independent, robust, mature
• Distributed without cost by Sun
June 8, 2006
UNAVCO/IRIS Web Services Workshop
40
Java RMI Architecture
June 8, 2006
UNAVCO/IRIS Web Services Workshop
41
Java Remote Method Invocation (RMI
Interface)
import java.rmi.Remote; import java.rmi.RemoteException;
public interface EUStats extends Remote
{
String getMainLanguages(String CountryName) throws
RemoteException;
int getPopulation(String CountryName) throws
RemoteException;
String getCapitalName(String CountryName) throws
RemoteException;
}
June 8, 2006
UNAVCO/IRIS Web Services Workshop
42
Java RMI Disadvantages
• Java RMI only supports Java
• Proprietary protocol by single vendor
• Requires RMI-lookup
• Requires non-standard port
June 8, 2006
UNAVCO/IRIS Web Services Workshop
43
Java RMI Advantages
• Full object support
• Cross platform capabilities
• Robust communications
• Large objects
• Security for client and servers
• Distribution/updates of codes
June 8, 2006
UNAVCO/IRIS Web Services Workshop
44
RMI Pros/Cons
June 8, 2006
UNAVCO/IRIS Web Services Workshop
45
Conclusions
• Distributed computing allows sharing and
re-use
• Introduces uncertainties
• Explore existing solutions before inventing
your own.
June 8, 2006
UNAVCO/IRIS Web Services Workshop
46