Professional Documents
Culture Documents
of Internet Services
Pawe Czarnul
pczarnul@eti.pg.gda.pl
http://pczarnul.eti.pg.gda.pl
Computer Architecture Department
Gdansk University of Technology, Poland
client
server
client
client
Object A
Object B
Object E
Object C
Object D
Service 2
Service 4
Service 5 Service 6
Agent A
Agent B
Agent E
Agent C
Agent D
Autonomic
Learning
ontologies
2012 Pawel Czarnul http://pczarnul.eti.pg.gda.pl email: pczarnul@eti.pg.gda.pl 9
Volunteer computing
volunteer
volunteer
Project
server
volunteer
volunteer
volunteer
Virtual
Virtual
Organization A
Organization B
Grid middleware
Virtual
Virtual Organization C
Organization D
Provider 1
client
Provider 2
Provider 3
1. Agent-based systems
Autonomic agents
Useful if one can send agents to perform certain work remotely where
they can communicate locally if remote communication is lost
Kind of a niche products, for specialized uses: gathering data inside
corporations etc.
Are there really any advamtages over client-server computing?
Agents vs client-server - discussion
OGSA
Off-the-shelf systems
1. Cloud Computing
Cloud Computing
UDDI
registry
s
i ce nd t i on
d ith ce a
v
e
er tain
a
sc lin s
w rvi turn
e r ma
s
r
or cer
r c
i k
i
se re
f ide serv info
ti s t
k of
o
v
3.
o ns o W
o
pr bout lish
. l o bl e s
2 pa i on A P ub
ca nct 1.
S
fu
l
D
is
L
t of
DL
4. get WS Service
5. retur
WSDL n
&
client s ing e .g . SO AP/HTTP(S) provider
u
6. call service 7. return result
s
SOAP is a protocol for transferring data between the source and the
destination through potential intermediate nodes:
see the AXIS users guide for more details more slides to follow
on this course
3. securing Web Service calls with HTTPS and HTTP basic auth see also next
slides
http://fox.eti.pg.gda.pl/~pczarnul/AUI-lab3-1.pdf
http://fox.eti.pg.gda.pl/~pczarnul/AUI-lab3-1.zip
and start:
/usr/local/axis2-1.6.2/bin# ./axis2server.sh
Using AXIS2_HOME: /usr/local/axis2-1.6.2
Using JAVA_HOME: /usr/local/jdk1.7.0_07
[INFO] [SimpleAxisServer] Starting
By default, it will start listening on port 8080
Install Apache Tomcat i.e. Download an archive and unpack it into e.g.:
/usr/local/apache-tomcat-5.5.28
Then copy the packaged AXIS2 into the webapps subdirectory of
Apache Tomcat i.e. Copy file:
axis2.war into that directory (can be downloaded separately)
Access AXIS2 at:
http://localhost:8080/axis2
Then you can perform AXIS administration using login/pass:
admin/axis2 by default
Solutions:
use HTTP BASIC authorization (requires login and password but sent
as plain text)
use HTTPS encryption (data is encrypted and cannot be decrypted by
third parties but no login/password is specified)
use mixed HTTPS/ HTTP BASIC technologies supports data
encryption and login/password
does not indicate that the user who has just logged in is the
particular person digital signature is required
any of the solutions above do not address more complex
communications scenarios (several calls issued discuss the
BeesyCluster solution)
No security:
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
import org.apache.axis.utils.Options;
import javax.xml.rpc.ParameterMode;
args = options.getRemainingArgs();
2012
String s1 =Pawel
new Czarnul http://pczarnul.eti.pg.gda.pl email: pczarnul@eti.pg.gda.pl
String(args[0]); 34
Web Service Simple Client No Security
No security:
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
import org.apache.axis.utils.Options;
import javax.xml.rpc.ParameterMode;
args = options.getRemainingArgs();
2012
String s1 =Pawel
new Czarnul http://pczarnul.eti.pg.gda.pl email: pczarnul@eti.pg.gda.pl
String(args[0]); 35
Web Service Simple Client BASIC AUTH Security
call.setUsername("runtaskuser");
call.setPassword(<password>");
Server configuration:
<tomcat-users>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="runtaskuser"/>
<role rolename="onjavauser"/>
<user username="tomcat" password=<password>" roles="tomcat"/>
<user username="role1" password=<password>" roles="role1"/>
<user username="both" password=<password>" roles="tomcat,role1"/>
<user username="runtaskuser" password=<password>" roles="runtaskuser"/>
<user username="bob" password=<password>" roles="onjavauser"/>
</tomcat-users>
Server configuration:
insert the following at the end of file jakarta-tomcat-
4.1.18/webapps/axis/WEB-INF/web.xml before </web-app>
ends:
<security-constraint>
<web-resource-collection>
<web-resource-name>RunTaskApplication</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>runtaskuser</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>RunTask Application</realm-name>
</login-config>
2012 Pawel Czarnul http://pczarnul.eti.pg.gda.pl email: pczarnul@eti.pg.gda.pl 38
Web Service Simple Client HTTPS encryption/decryption
String endpoint =
"https://localhost:8443/axis/accessedbyHTTPS/RunTaskServer.jw
s";
System.setProperty("javax.net.ssl.trustStore",
"/home/pczarnul/.keystore");
args = options.getRemainingArgs();
The server side the standard non-encrypted 8080 port still available:
<!--
Define a SSL Coyote HTTP/1.1 Connector on port 8443
-->
-
<Connector
className="org.apache.coyote.tomcat4.CoyoteConnector"
port="8443" minProcessors="5" maxProcessors="75"
enableLookups="true" acceptCount="100" debug="0"
scheme="https" secure="true" useURIValidationHack="false"
disableUploadTimeout="true">
<Factory
className="org.apache.coyote.tomcat4.CoyoteServerSocketFact
ory" clientAuth="false" protocol="TLS"/>
</Connector>
2012 Pawel Czarnul http://pczarnul.eti.pg.gda.pl email: pczarnul@eti.pg.gda.pl 40
Web Service Simple Client HTTPS encryption/decryption
keytool
System.setProperty("javax.net.ssl.trustStore",
"/home/pczarnul/.keystore");
serializers/deserializers
WSDD deployment)
see the reference guide of AXIS for terminology and the format of the
following files:
deploy.wsdd
undeploy.wsdd
others
AXIS assumes there is/are (a) transport module that listens for
messages on a certain port and passes data to the main AXIS module
the listener can be a 80 port listener
can be a specific listener waiting for a defined action e.g. when a
certain user logs in to the system
engine.invoke(mc);
Configuration Steps:
</handler>
it is necessary to provide the name and the class code for the handler
either:
flow (a sequence of defined handlers is executed)
request, pivot, response (before, the actual web service handler
and after the web service is invoked)
Features:
http://ws.apache.org/axis2/
What is WSDL?
http://www.w3.org/TR/wsdl
<wsdl:message name="SetDescriptionResponse">
</wsdl:message>
</wsdl:message>
<wsdl:message name="SetLeftUpperPointResponse1">
</wsdl:message>
</wsdl:message>
<wsdl:message name="SetDescriptionResponse">
</wsdl:message>
</wsdl:message>
complex type corresponding to
public class Point {
public int x;
public int y;
}
</wsdl:message>
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://DefaultNamespace">
<import
namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="Point">
<sequence>
<element name="x" type="xsd:int"/>
<element name="y" type="xsd:int"/>
</sequence>
</complexType>
</schema>
</wsdl:types>
2012 Pawel Czarnul http://pczarnul.eti.pg.gda.pl email: pczarnul@eti.pg.gda.pl 64
WSDL: portType
1. WSDL Elements
portType definition of a Web Service interface
Contains declarations of MANY operations to be called within the
discussed Web Service
Corresponds to a Java interface which defined various methods
(operations here)
Operations use messages and define whether they are input,
output or fault messages
Example
<wsdl:portType name="Rectangle">
<wsdl:operation name="SetLeftUpperPoint"
parameterOrder="in0">
<wsdl:input name="SetLeftUpperPointRequest"
message="impl:SetLeftUpperPointRequest"/>
<wsdl:output name="SetLeftUpperPointResponse"
message="impl:SetLeftUpperPointResponse"/>
</wsdl:operation>
<wsdl:port name="Rectangle"
binding="impl:RectangleSoapBinding">
<wsdlsoap:address
location="http://localhost:8080/axis/Rectangle"/>
</wsdl:port>
<wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="SetLeftUpperPoint">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="SetLeftUpperPointRequest">
<wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:Rectangle"/>
</wsdl:input>
2012 Pawel Czarnul http://pczarnul.eti.pg.gda.pl email: pczarnul@eti.pg.gda.pl 69
WSDL: Service
1. WSDL Elements
Service groups ports together why? Possibly for grouping ports
connected with different bindings (protocols) of one portType (interface)
OR for grouping connected but different portTypes
Example
<wsdl:service name="RectangleService">
<wsdl:port name="Rectangle"
binding="impl:RectangleSoapBinding">
<wsdlsoap:address
location="http://localhost:8080/axis/Rectangle"/>
</wsdl:port>
</wsdl:service>
Use the Java2WSDL tool to create a WSDL file from the interface
above.
Where:
* -o indicates the name of the output WSDL file
* -l indicates the location of the service
* -n is the target namespace of the WSDL file
* -p indicates a mapping from the package to a namespace. There
may be multiple mappings.
* the class specified contains the interface of the webservice.
generates rectangle.wsdl 72
2012 Pawel Czarnul http://pczarnul.eti.pg.gda.pl email: pczarnul@eti.pg.gda.pl
Web Services - UDDI
Universal Description, Discovery and Integration
1. Literature
S. Graham, S. Simeonov, T. Boubez, D. Davis, G. Daniels
Building Web Services with Java: Making Sense of XML, SOAP, WSDL
and UDDI
http://www.uddi.org/find.html
http://uddi4j.sourceforge.net/
http://www-
106.ibm.com/developerworks/webservices/library/ws-
uddi4j2.html
http://ws.apache.org/juddi/
one can issue these and other functions programmatically in the client
programs (full API is available) or through UDDI servers WWW (if
available)
1. Find details operations for the main structures in UDDI take lists
of ids and return data referring to these entities
get_businessDetail for businessEntity (company)
can include get_businessDetailExt (optional)
get_serviceDetail for businessService (service)
get_bindingDetail for businessBinding (binding)
get_tModelDetail for tModel
one can issue these and other functions programmatically in the client
programs (full API is available) or through UDDI servers WWW (if
available)
UDDI operators may define their own ways to obtain the auth token or
must implement get_authToken which returns the token. The token is
then used in the publication API queries
businessService:
attributes:
businessKey identifies businessEntity that contains this
businessService, a service can be registered with the
businessEntity (save_business) this attribute is set by the server
or by calling save_service (then it must be set to an existing
businessEntity)
serviceKey identifies the service, set by the UDDI operator,
cannot be modified, can be used for updates later
businessService:
elements:
name - mandatory
description optional
categoryBag
bindingTemplates includes elements bindingTemplate
(mandatory) define the implementation details of the services
bindingTemplates attributes:
bindingKey set by the UDDI operator
serviceKey defines the service the binding is associated with, the
bindingTemplate can be saved with save_service and save_binding
operations delete_* take authInfo and the key of the element to delete
compile uddi4j unpack and go to the root directory, type ant all
should compile without problems
samples will be compiled to build/samples
to run samples:
go to the samples directory, add uddi4j.jar to the CLASSPATH (note
whether do not use another uddi4j.jar like the modified version in
BeesyCluster)
configure the samples.prop file see the following slide
run java FindBusinessExample should contact the inquiry server
(e.g. IBMs or Microsofts) and return information about available
services
userid =
password =
# -----------------------------------------------------------------------
# Transport classname. Typically defined on commandline as
# -Dorg.uddi4j.TransportClassName=xxx.
# -----------------------------------------------------------------------
TransportClassName=org.uddi4j.transport.ApacheSOAPTransport
# TransportClassName=org.uddi4j.transport.ApacheAxisTransport
# TransportClassName=org.uddi4j.transport.HPSOAPTransport
http://www.oasis-open.org/committees/uddi-
spec/doc/tcspecs.htm#uddiv2
etc.
http://www.service-repository.com/
http://www.xmethods.net/ve2/index.po
http://seekda.com/
Mapping (WSDL->UDDI ver 2.0, what changes with respect to ver 1.0
see the Best Practice below):
http://www.oasis-open.org/committees/uddi-
spec/doc/tn/uddi-spec-tc-tn-wsdl-v202-20040631.htm
http://www.oasis-open.org/committees/uddi-
spec/doc/tn/uddi-spec-tc-tn-wsdl-v202-20040631.htm
see the mapping details of various (6) WSDL elements and their
attributes to UDDI elements in:
Types of workflows:
business traditionally control flow oriented e.g. exchange of
communication, orders, quotes etc. Between businesses
Order apples of the given sort, plums of the given sort, additional
ingredients such as sugar etc, transport them to the factory, produce
jam, transport to a storage location and then distribute based on orders
from large shops
Generate geometry for the given simulation i.e. files which describe
parameters of the simulation, points in space on which the code must
compute certain values, launch two different simulation codes (which
produce different output) on same input data (possibly in parallel),
merge results, in the meantime get additional data from measurements
and launch another simulation using the whole set, requires more than
one cluster because of the size of data as well as care when handling
data sets (large)
In business workflows:
partner may stop operation (goes out of business)
factory may close down (electricity failure)
partner may be late with payments
SLA not followed
In scientific workflows:
cluster may go down (restart simulation, maybe was checkpointed
before)
node where the data was stored goes down (should be able to restore
the data transparently to the user)
cluster gets overloaded (additional users how to cope with that?
Process/data Migration?) need for constant monitoring of the
simulation
Cost - sum of the costs of all services selected for the execution of the
workflow
Availability defined as e.g. MTBF (Mean Time Between Failrues) with a
proper weight to be incorporated into a final QoS metric composed of
this and other quality attributes
Accessibility - meant as the probability of being able to access the
service irrespective of whether the service itself is available or not -- this
in fact leads to the quality of the network/software infrastructure
between the client and the service nodes or high load caused by
requests from other users
Fidelity or conformance to predict the degree to which the task has been
performed by the service or whether and to what degree the
workflow/service are compliant with the published requirements or
standards
Proposed solutions:
genetic algorithm how to encode a genom?
divide-and-conquer distribute a deadline (or budget) among sections
of the graph and optimize locally
Various data formats (e.g. XML) are good in terms of syntax, however
the existence of many various formats used in both business and
scientific worlds does not allow automation of the integration of services,
in particular automatic reasoning and integration of services
Example:
Client wants to buy a certain type of plums
Provider publishes they sell plums
UDDI will not find this provider when searching for the particular type of
plums does not know it is plums we need an ontology which says
this sort is plums
Various data formats (e.g. XML) are good in terms of syntax, however
the existence of many various formats used in both business and
scientific worlds does not
Multiple contrains can be defined e.g. the car has one gearbox etc.
OWL versions:
The goal is for the service provider to describe their services using
OWL-S (and possibly store in UDDI) and then the client can use a
matching algorithm to match against the published information on
available services
business service
business entity
Require a format to write the information in, e.g. can be one of the
following:
OWL-S
WSDL-S
annotated WSDL
In a more general form this can also be done using one of the
languages used to model workflows e.g. BPEL4WS as in Meteor-S
This raises the issue of computing global QoS values from those of
individual tasks
http://www.alphaworks.ibm.com/tech/bpws4j
http://www-128.ibm.com/developerworks/webservices/library/w
http://www-
128.ibm.com/developerworks/webservices/library/ws-
bpelcol2/
2012 Pawel Czarnul http://pczarnul.eti.pg.gda.pl email: pczarnul@eti.pg.gda.pl 144
Flow and Interaction langugaes for business BPEL4WS
In arguments
Server
Client
Out args + ret val Object
Remote
Method Skeleton
Stub Invocation
Object Adapter
Relationship
An object fulfills a role when it participates
in a relationship
Multidirectional
Relationships can have attributes and
operations
Persistent Object Service
accessing the persistent state of other
objects
storing their own state persistently
objects are often stored in an object
oriented database management system
Data interchange
Supports the exchange of visible state
information between objects
Change management
Version identification
configuration management of object
interfaces, implementations and instances
Relationship
An object fulfills a role when it participates
in a relationship
Multidirectional
Relationships can have attributes and
operations
Persistent Object Service
accessing the persistent state of other
objects
storing their own state persistently
objects are often stored in an object
oriented database management system
};
2012 Pawel Czarnul http://pczarnul.eti.pg.gda.pl email: pczarnul@eti.pg.gda.pl 172
IDL Mapping
struct Cred {
Cred();
~Cred();
Cred( const Cred& s );
Cred& operator=( const Cred& s );
CORBA::Long login;
CORBA::Char password;
};
};
public static void write (org.omg.CORBA.portable.OutputStream
ostream, byte[]
value)
{
ostream.write_long (value.length);
ostream.write_octet_array (value, 0, value.length);
}
}
ByteBufferHelper.java CredHelper.java
ClusterHelper.java LongTableHelper.java
ByteBufferHolder.java CredHolder.java
ClusterHolder.java LongTableHolder.java
CORBA_sequence_set_release
CORBA_sequence_get_release
typedef struct
{
CORBA_long login;
CORBA_char password;
} Cred;
String:
in C/C++ mapped to char *
delimited by NULL compatible with the standard Clibrary (strcmp,
strlen etc.)
do not use new/delete, instead use:
String:
the user can see/use CORBA::String (same as char *)
and CORBA::String_var
struct:
Str s;
s.a=CORBA::string_alloc(...);
s.a=CORBA::string_alloc(...);
array:
::LongTable_slice corresponds to an element so a pointer to it should
be returned
LongTable_slice *lt=LongTable_alloc();
lt[3]=4;
LongTable_free(table );
any:
http://members.tripod.com/gsraj/corba/chapter/
get_buffer to read data
replace to replace data in the buffer
example:
LongSeq *ls=new LongSeq;
ls->length(25);
(*ls)[13]=445;
any:
this type can encapsulate any other type
can be combined with DII and DSI
operators <<= and >>= are available for insertion and extraction of data
e.g. (in C++) :
CORBA::Any any;
any <<= (CORBA::Double) 2.7172;
data can be extracted and cast to a certain type (trying the type) may
result in a fault then no data of this type is held in the CORBA::Any
type.
CORBA::Any an;
CORBA::Long lo;
if (TRUE==(a>>=lo)) printf(success)
else printf(fault);
alternatively
if (an.type()->equal(CORBA::_tc_long)) printf(success)
else printf(fault)
an <<= CORBA::Any::from_string(str,str_length);
----
any:
to/from CORBA::Any operators can be defined by the programmer
also they are needed for structs and arrays already generated for the
previous example find them!
the programmer writes operators <<= and >>= for their own e.g.
sequences (CORBA::Any &, Type &) e.g. write the length first and then
the elements
Literature:
OMG specification
M. Sawerwain CORBA, Programowanie w praktyce
JEE/J2EE Tiers:
Client tier Web tier Business tier EIS tier
Client
Application
EJB Database
Client JSP
Applet EJB
Servlet Database
EJB
Client
Browser J2EE
Server
JEE/J2EE elements:
Components
Executed on the client side:
Web client
Thin client heavy operations like database access,
computations, complex application logic is handled at the
server side
Thin client (a browser) receives pages generated by the
Web-tier components (servlets or JSP pages)
Security, reliability, load balancing handled at the server
side
Applet (a heavier client)
Application client an application that typically requires a fancy
interface (developed using Abstract Window Toolkit AWT or
Swing)
Usually access the logic in the business tier (EJBs)
Can also send requests to JSP pages or servlets
Java Beans can be used to manage data being exchanged
between a client and a server or a server and a database
2012 Pawel Czarnul http://pczarnul.eti.pg.gda.pl email: pczarnul@eti.pg.gda.pl 208
JEE/J2EE Elements (2) - Components
JEE/J2EE elements:
Components
Executed on the server side:
Web-tier (WWW) components (two complementary technologies,
one can substitute the other one but different target uses):
Servlets (should be used for application logic, should not
contain too many HTML lines)
JSP pages (should be used for presentation, should not
contain too much Java code)
Business-tier EJB (Enterprise Java Beans) components
used for application logic
Receives data from the web tier/ the client, processes,
sends to a database
Reads data from a database, processes and sends to the
client
can represent system resources (like a database)
through objects
JEE/J2EE Tiers:
Client tier Web tier Business tier EIS tier
Client
Application Web
Container
Application Container EJB Database
Mapping:
Roles to particular resources such as web components (URLs) or
EJBs (particular methods)
Users to the roles
Programming Interfaces:
Java Data Base Connectivity (JDBC)
Allows access to relational databases
Includes:
JDBC Core API (package java.sql.*)
JDBC Optional Package API (package javax.sql.*)
Allows to access data through DataSource objects that can
represent a database, a file etc.
Application server can open several database connections in
advance to avoid the high costs of opening connections at runtime
Clients can check out open connections really fast then
Programming Interfaces:
Enterprise Java Beans (EJBs)
Code with methods and fields that is used for application logic
Three types of beans:
(...)
Entities (Java Persistence API) an instance represents a row
in the relational database, the class represents the table
()
Programming Interfaces:
Enterprise Java Beans (EJBs)
Code with methods and fields that is used for application logic
Three types of beans:
(...)
Deployment Phase:
Use the deployment tool provided by the vendor to run an J2EE
application
Retrieve the application descriptor
In a loop:
Retrieve a module descriptor (e.g. required security or
transaction measures)
Install a component in a container
CLIENTS
Presentation servlets
Layer JSP KC TS Teamwork
Cluster Support
Commander
Web
EJB
AS -Authorization PS - PaymentServices Chat
Business Service AXIS UDDI
RA - Run Service Board
Layer Anywhere Server
J2EE servers
Servers
EIS Database
MySQL DM - Database
Layer xn Manager
Host n
Database
PROVIDERS
2012 Pawel Czarnul http://pczarnul.eti.pg.gda.pl email: pczarnul@eti.pg.gda.pl 233
File Manager via WWW
User
Layer
Presentation servlets
Layer CC
JSP Cluster
TS Teamwork
Support
Commander
xn Database
Host1
ssh ssh
holk (256 processors)
HPC galera (128 processors)
Layer small Linux clusters
Cluster 1 Cluster n
Philosophy:
multi-step
authenticator
ticket
why is it needed?
overhead?
multiple servers parts of the request can be routed to various servers
Client code:
multi-step
import java.io.*;
import as.interfaces.auth.*;
import as.interfaces.sign.*;
public class RunBeesyClusterTaskClient
{
public static void main(String [] args) throws Exception {
int i;
ASService service = new ASServiceLocator();
AS port = service.getAS();
try {
System.out.println("Trying to list login agent descriptions...");
LoginAgentDescription[] lad=port.listLoginAgents();
Client code:
multi-step
import java.io.*;
for(i=0;i<lad.length;i++)
System.out.println("Login agent "+i+": ID="+lad[i].getID()+"
description="+lad[i].getDescription());
for(i=0;i<sd.length;i++)
System.out.println("Signer "+i+": ID="+sd[i].getID()+"
description="+sd[i].getDescription());
// try to login now
String[] auth = port.logIn(new String[] {"<login>","<password>"},
id0,id1); // the latter arguments should be signer and login agent ids
Client code:
multi-step
Client code:
Assuming BeesyCluster's services are available at
beesycluster2.eti.pg.gda.pl
Refer to http://beesycluster2.eti.pg.gda.pl/axis/services/bc/KCWS?wsdl
and http://beesycluster2.eti.pg.gda.pl/axis/services/bc/AS?wsdl
Download descriptions of services available by these URLs save to
KCWS.wsdl and AS.wsdl respectively
AS interface is responsible for logging and authorization to BeesyCluster
KCWS interface allows calling commands on clusters via BeesyCluster
Client code:
Now see generated stubs and compile the client code:
pczarnul@wolf:~/BC-ws-comm-log/AUI-BC-WS-call$ ls
as AS.wsdl KCWS.wsdl pl RunBeesyClusterTaskClient.java
pczarnul@wolf:~/BC-ws-comm-log/AUI-BC-WS-call$ javac
RunBeesyClusterTaskClient.java
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
pczarnul@wolf:~/BC-ws-comm-log/AUI-BC-WS-call$ ls
as AS.wsdl KCWS.wsdl pl RunBeesyClusterTaskClient.class
RunBeesyClusterTaskClient.java
Client code:
Finally run the client code (if you see invalid credentials or account
expired it is possible that the account in BeesyCluster has simply
expired contact BeesyCluster admin then):
pczarnul@wolf:~/BC-ws-comm-log/AUI-BC-WS-call$ java
RunBeesyClusterTaskClient ls
- Unable to find required classes (javax.activation.DataHandler and
javax.mail.internet.MimeMultipart). Attachment support is disabled.
Trying to list login agent descriptions...
Login agent 0: ID=1 description=identyfikacja za pomoca loginu i hasla
Trying to list signer descriptions...
Signer 0: ID=1 description=podpisywanie kluczem symetrycznym
Login agent + Signer:0.0 s
Pokazuje elementy (2) autentykatora.
Auth element 0: 03%23%21class%3Das.tokens.Authenticator%0A.UID
%3D251%0A.validity_period%3D28800000%0A.timestamp
%3D1258303970834%0A.AS_ID%3D-
Id%253D1%250A.keyGeneration%253D0%250A.keyIndex
%253D1%250A.MAC%253D07E7FE88EAA5F00EA7CCD0313504F67D
%250A%0A
Auth element 1: Konto bedzie wazne jeszcze przez 364 dni
Login:0.58 s
Trying to call runCommand for ls
0
02.c
102023
()
calling:13.855 s
Total:15.905 s
pczarnul@wolf:~/BC-ws-comm-log/AUI-BC-WS-call$
SETTING UP AN ACCOUNT
A new user-provider sets up a BeesyCluster
account by submitting logins/passwords of
accounts available through SSH on the selected
cluster/PC and is able to log in via BeesyCluster
just after the administrator has granted access.
It is only required that the account(s) are
accessible via SSH. No other configuration is
necessary. This gives BeesyCluster an advantage
over the often complex process of deployment of
new sites in grid systems.
The user can set up a BeesyCluster account
without any cluster/PC accounts for use of free
services published by others.
PUBLISHING SERVICES:
The user can publish any of the applications
RUNNING SERVICES:
The user has full access to any of the
files/applications on their registered accounts on
the registered PCs/clusters, can:
access/edit files,
1. Agent
Autonomic, independent from other agents
Live somewhere in the system
Can migrate from node to node
Can learn about the environment and use the knowledge to make
intelligent decisions
Can interact, especially negotiate with other agents
Contains 25 specifications
http://www.fipa.org/repository/standardspecs.html
Covers:
agent communication,
agent transport,
agent management,
abstract architecture
applications.
http://www.fipa.org/specifications/index.html
Each platform (an environment for agents) must have at least one main
container (started as the first one in the row) and zero or more regular
containers
Each agent can implement one or more behaviours note that these
are being executed one by one, not in parallel by several threads! - may
need some more programming effort
DF Directory Facilitator
Agents can register services with the DF
An agent creates a DFAgentDescription, sets its own name in the
description and then adds a ServiceDescription to the agent
description
Then the agent description is registered with the DF
configuration:
in ~/.bashrc set:
export
JADECLASSPATH=/home/pczarnul/JADE/jade/lib/http.jar:/home/pczarnul/J
ADE/jade/lib/iiop.jar:/home/pczarnul/JADE/jade/lib/jade.jar:/home/pczarnul/J
ADE/jade/lib/jadeTools.jar
export CLASSPATH=$CLASSPATH:$AXISCLASSPATH:
$JADECLASSPATH
export CLASSPATH=$CLASSPATH:$AXISCLASSPATH:
$JADECLASSPATH:$JADEEXAMPLECLASSPATH
use the GUI to add new books, finally a book will be sold to the buyer
agent
1. Typical applications
Negotiations
volunteer
volunteer
Project
server
volunteer
volunteer
volunteer
Client-server architecture
Project server(s) that host projects, status data, particular results,
divide and schedule data to be distributed to the users
Project servers host executables that are distributed to the users, new
versions may be downloaded by clients automatically
Clients download client code that allows to join the project servers,
create a unique login/password, select project(s), set preferences and
policies, download and run executables downloaded from the
server(s)
Reliability of computations (client nodes may fail, the network may fail)
Can the client be trusted? Validation of results from two or more clients
(occasionally there might also be computation errors)
Giving credits to the clients based on CPU time + CPU type etc. from
the clients computing a particular piece of data
Privacy concerns what data is revealed to the server side? (can have
some advantages like tracking stolen computers if they are connected to
the network by the thieves and clients report Ips to the server(s)
Client performance some executables can use GPUs for some work
http://boinc.berkeley.edu/
The client side uses a client connecting to the server(s) via HTTP, a GUI
(using TCP to connect to the client), a screensaver and executables
managed by the client
User needs to download and run the client, choose (a) project(s),
download executables and data to process, process data, send output
files, report results and repeat the process
Virtual
Virtual
Organization A
Organization B
Grid middleware
Virtual
Virtual Organization C
Organization D
High level grid functions of Globus Toolkit (the architecture of the grid is
defined by OGSA Open Grid Services Architecture):
File management
Replicas
client
client
Cloud
(infrastructure,
CLOUD service,
platform)
client
client
client
Can provide better reliability than the standard processing (unless one
installs RAID, several computers etc. which is costly however)
Some claim that users can be forced to work with the cloud if they start
and that can allow driving costs too high