Download Web Services

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Airborne Networking wikipedia , lookup

Remote Desktop Services wikipedia , lookup

Cross-site scripting wikipedia , lookup

Hypertext Transfer Protocol wikipedia , lookup

Semantic Web wikipedia , lookup

Transcript
Web Services
Members
Troy
Tony
Ellen
Vincent
Web Services
•
•
•
•
•
•
What is it
Why is it useful
What have been solved
Demo
Alternative technologies
Question
What is Web Service
•
An XML technology which allows an
application to access a remote/local
application’s services with very little
code customization using ubiquitous
and standard communication protocols.
•
Standard Package:
1.
2.
3.
WSDL
UDDI
SOAP
How Does It Work?
How Does It Work?
Why Web Service Useful
•
“you can exchange data between different
applications and different platforms” (quoted from
W3Schools.com) for the following reasons:
1.
2.
3.
4.
5.
It is platform independent
It is language independent
It uses one of the most popular ways for data
communication – XML
Enabling the reuse of software components
Delivers a loosely coupled architecture (e.g. SOA)
What have been solved?
• Technical point of view:
Platforms / development languages conflict
• Business point of view:
enabling data exchange among different business partners while
each one of them may use different types of servers/languages
Web Service in the Real
World
•
•
•
•
LiveJournal - Blog Management
Google Map / Geocoding
PayPal
Protein Data Bank
Limitations of Web Service
•
Draw Back:
1.
2.
3.
Once implemented, no control in response time of the
service
XML (SOAP, WSDL) is easy for human (programmers) to
read but have poor processing performance
Have no way to know how the clients will use the result from
the web service. This limits the type of the data
analysis/mining that can be performed.
Demo
• Python (install fpconst, SOAPpy)
• Perl
Web Services Demo
Python
Perl
import SOAPpy
import random
use SOAP::Transport::HTTP;
use strict;
server = SOAPpy.SOAPServer(('localhost', 8080))
server.registerFunction(numberGenerator)
SOAP::Transport::HTTP::CGI
-> dispatch_to(‘Lottery')
-> handle;
def numberGenerator():
list = range(1,50)
lo_nums = []
i=0
while i < 6:
number = random.choice(list)
if (number != -1):
lo_nums = lo_nums + [number]
list[number-1] = -1
i=i+1
return lo_nums
package Lottery;
sub lotteryNumbers {
my ( $val, $seed) = @_;
$seed ? srand $seed : srand;
my @pools = ( 1 .. 49 );
my @numbers;
while ( @numbers < 6 ) {
my $n = int rand @pools;
( $pools[0], $pools[$n] ) = ( $pools[$n], $pools[0] );
push @numbers, shift @pools;
}
server.serve_forever()
return (@numbers);
Link to Demo
}
Alternative Technologies
• MQ Series (from IBM)
– Multi-platform and multi-language message queuing service
– Asynchronus
• One program queues messages
• Another program processes messages
• Managed by a Queue Manager; actions are event triggered
– Two types of queue connections (called channels)
• 1) Unidirectional and 2) Bidirectional
– Applications can be loosely coupled with MQ Series but they
must be contained within a cooperating system since
connections are pre-established and static.
Alternative Technologies
MQ Series
Transmitting
Message
Transmitting
Message
Alternate bi-directional
communication
Queue Manager (Triggers)
Queue 1
Queue 2
Queue Manager (Triggers)
Queued Message
Received Message
Queued Message
New Message
Received Message
Serving
Application
Consuming
Application
Retrieved Message
Alternative Technologies
• MQ Series (continued)
– Strengths
•
•
•
•
•
Support for multiple platforms
Well tested and generally considered stable
Simplifies inter-application communications
Workflow management and load balancing
Queuing
– Weaknesses
•
•
•
•
Message based rather than object based
Not stateful or persistent
Hard wired channels (communication links between apps)
Location is not transparent requiring more management
Alternative Technologies
• CORBA (Common Object Request Broker Architecture)
–
–
–
–
Platform and language independent
Object oriented component architecture
Stateful & persistent
Flexible features to decouple the client and object
implementation
– Performance is good enough for real-time applications
– Support for transactions, security and events notification.
– E.g. Linux Gnome – a network centric graphical user interface.
Alternative Technologies
Alternative Technologies
• CORBA (continued)
– Stengths
• Platform independent (as long as there is vendor support)
with multi-language support
• Stateful and persistent objects
• Widely deployed today
• Integrated security services including its own naming
service that minimizes the risk of spoofing, etc.
• Service discovery
– Weaknesses
• Fairly complex to configure and implement
• Not standardized for today’s network security issues.
• Not organized for easy integration with web apps
Alternative Technologies
• DCOM (Distributed Components)
– Object oriented
– Objects are stateful, persistent, can pass data, event driven, …
– Seamlessly connects local and remote COM objects into a
running process (e.g. transparent use of remote objects)
– Tightly interacts with ActiveX for web deployment and OLE.
– Primarily Windows.
• Microsoft support for MacOS and third party support for some
UNIX (although UNIX COM not supported by developers thus
very limited services)
– Early issues regarding security, complexity, load balancing and
others making it unsuitable for enterprise deployment.
• COM+ and Microsoft Transaction Server (MTS) attempted to fix
Alternative Technologies
• COM Object Access
Alternative Technologies
• COM (continued)
– Strengths
• Multi-language support (kind of)
• It doesn’t care where the object is sourced from
• Statefulness, persistence, native data transfer and event
capabilities (e.g. exceptions)
• Relatively mature technology
– Weaknesses
• Platform dependent (platform must understand binary
format)
• Supports COM-aware languages only
• Considered by many complex to develop and maintain
Our Comments
• What is cool…
Troy: “Loosely coupled architecture”
Vincent: “Free”
Tony: “Code Reuse”
Ellen: “Compatible”
References
http://www-128.ibm.com/developerworks/websphere/library/techarticles/0202_balani/balani.html
http://www.sei.cmu.edu/str/descriptions/com.html
http://www-128.ibm.com/developerworks/webservices/library/ws-exploring-corba/
http://www2002.org/CDROM/alternate/395/
http://www.cs.wustl.edu/~schmidt/corba-overview.html
Questions?