SlideShare una empresa de Scribd logo
1 de 36
Abstract
• Web Services is a technology applicable for
computationally distributed problems, including
access to large databases
– What other technologies were/are available and how
they compare with Web Services?
• The main buzzwords:
– Integration & Standardization & Access by programs
Why to use more than one
computer?
• Distributed resources
– access to shared data
– access to shared programs
– access to CPU (e.g. many desktop PCs together), to
memory, to special devices (e.g. printer)
• Complete independence on the internal
implementation
Distributed architecture
• gives
– access to distributed resources
– development encapsulation
• maintainability, re-usability, legacy-awareness
– implementation independence
• requires
– adding a communication layer between parts
– synchronization of efforts
• including such nasty things as distributed garbage
collection
Sending
requests,
getting
results
Waiting for
requests
(known location,
known port)
Communication protocol, Data format
Distributed architecture
• Basic questions are:
– What kind of protocol to use, and what data to
transmit
– What to do with requests on the server side
Sending
requests,
getting
results
Waiting for
requests
(known location,
known port)
Data as name/value pairs
Traditional CGI-based approach
• cgi-bin scripts:
– Data transmitted as name-value pairs (HTML forms)
– Transport over (state-less) HTTP protocol
– no standards for keeping user sessions (state-fullness)
– server side: a script is called
Web Services
Sending
requests,
getting
results
Waiting for
requests
(known location,
known port)
Data in binary format
CORBA-based approach
• CORBA:
– Data transmitted as objects (at least it looks like that)
– Transport (usually) over well standardised IIOP protocol
– user sessions (state-fullness) very inter-operable
– server side: an RPC call is made
Sending
requests,
getting
results
Waiting for
requests
(known location,
known port)
Data in XML format
SOAP-based communication
• SOAP:
– Data in a well-defined XML format
– Transport over various protocols
• HTTP, SMTP are the most used, perhaps because they are
firewall-friendly
– server side: either an RPC call or a message delivered
Web services
• A collection of XML-based technologies
developed by the e-business community to
address issues of:
– service discovery
– interoperable data exchange and/or application
invocation
– service compositions (workflow, business processes)
• Major developers include:
– Apache, IBM, HP, SUN & Microsoft (.NET)
• http://www.webservices.org/
W3C (working group) definition
• "A Web service is a software application identified by a
URI, whose interfaces and bindings are capable of being
defined, described and discovered as XML artefacts. A
Web service supports direct interactions with other
software agents using XML based messages exchanged
via internet-based protocols."
• http://www.w3c.org/TR/2002/WD-wsa-reqs-20020819
Web Services Architecture
Let a program “click on a web page”
Web Services Stack
SOAP
• Simple Object Access Protocol
– http://www.w3c.org/TR/SOAP/
• A lightweight protocol for exchange of
information in a decentralised, distributed
environment
• Two different styles to use:
– to encapsulate RPC calls using the extensibility and
flexibility of XML
– …or to deliver a whole document without any
method calls encapsulated
Request:
setHelloMessage
Request:
getHelloMessage
XML Messaging Using SOAP
WSDL
• Web Services Definition Language
– http://www.w3.org/TR/wsdl/
• An XML-based language for describing Web
Services
– what the service does (description)
– how to use it (method signatures)
– where to find the service
• It does not depend on the underlying protocol
• But: It is not much human-readable
Hello.wsdl<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://localhost:8080/axis/services/Hello"
xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:SOAP-
ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:impl="http://localhost:8080/axis/services/Hello-impl"
xmlns:intf="http://localhost:8080/axis/services/Hello"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <wsdl:message
name="setHelloMessageRequest"> <wsdl:part name="in0" type="xsd:string"/>
</wsdl:message> <wsdl:message name="getHelloMessageResponse"> <wsdl:part
name="return" type="xsd:string"/> </wsdl:message> <wsdl:message
name="setHelloMessageResponse"> </wsdl:message> <wsdl:message
name="getHelloMessageRequest"> </wsdl:message> <wsdl:portType
name="HelloWorldService"> <wsdl:operation name="getHelloMessage">
<wsdl:input message="intf:getHelloMessageRequest"/> <wsdl:output
message="intf:getHelloMessageResponse"/> </wsdl:operation> <wsdl:operation
name="setHelloMessage" parameterOrder="in0"> <wsdl:input
message="intf:setHelloMessageRequest"/> <wsdl:output
message="intf:setHelloMessageResponse"/> </wsdl:operation> </wsdl:portType>
<wsdl:binding name="HelloSoapBinding" type="intf:HelloWorldService">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getHelloMessage"> <wsdlsoap:operation soapAction=""/>
<wsdl:input> <wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="getHelloMessage" use="encoded"/> </wsdl:input> <wsdl:output>
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://localhost:8080/axis/services/Hello" use="encoded"/>
</wsdl:output> </wsdl:operation> <wsdl:operation name="setHelloMessage">
<wsdlsoap:operation soapAction=""/> <wsdl:input> <wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="setHelloMessage" use="encoded"/> </wsdl:input> <wsdl:output>
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://localhost:8080/axis/services/Hello" use="encoded"/>
</wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service
name="HelloWorldServiceService"> <wsdl:port binding="intf:HelloSoapBinding"
name="Hello"> <wsdlsoap:address
location="http://localhost:8080/axis/services/Hello"/> </wsdl:port>
</wsdl:service>
</wsdl:definitions>
UDDI (and alternatives)
• Universal Description, Discovery and Integration
– http://www.uddi.org
• UDDI creates a platform-independent, open
framework & registry for:
– Describing services
– Discovering businesses
– Integrating business services
• The UDDI may be less used than predicted,
especially on the Internet level
• BioMoby - an alternative for Life Sciences domain?
BioMoby
http://biomoby.org
A Web Service example in Java
SOAP-aware
Servlet
(e.g. Apache Axis)
Any class
processing
the incoming
requests
(“business logic”
Any class
processing
the incoming
requests
(“business logic”
Any class
processing
the incoming
requests
(“business logic”
Any class
processing
the incoming
requests
(“business logic”
HTTP Server
Servlet engine (e.g. Apache Tomcat)
Sending
requests,
getting
results
Usual principles of Java toolkits
• Writing server is easier than writing clients (but only
regarding the toolkit, not the business logic)
• Servers may be written independently on the used
toolkit
• Always test interoperability with a non-Java client
(because of data serialization and de-serialization)
• Steps:
– write your service implementation
– make all your classes available to the toolkit
– deploy your service (usually done just once)
– restart the whole servlet engine
– test it with a client request
Java SOAP Toolkits
• Apache SOAP (was IBM’s SOAP4J)
• Apache Axis (a follow-on to the Apache SOAP)
• …and many others
• …but let’s stay with Apache Axis:
– http://ws.apache.org/axis/
package hello;
public interface HelloWorld {
String getHelloMessage();
void setHelloMessage (String newHello);
}
package hello;
public class HelloWorldService
implements HelloWorld {
String message = "Hello, world!";
public String getHelloMessage() {
return message;
}
public void setHelloMessage (String newMessage) {
message = newMessage;
}
}
hello/HelloWorld.java
hello/HelloWorldService.java
import org.apache.axis.client.*;
public class HelloWorldClient {
public static void main (String [] args) {
try {
// prepare the call (the same for all called methods)
Call call = (Call) new Service().createCall();
call.setTargetEndpointAddress
(new java.net.URL("http://localhost:8080/axis/services/Hello"));
// call "get message"
if (args.length == 0) {
call.setOperationName ("getHelloMessage");
String result = (String) call.invoke ( new Object [] {} );
System.out.println (result);
System.exit (0);
}
// call "set message" and afterwards "get message"
call.setMaintainSession (true); // TRY also without this line...
call.setOperationName ("setHelloMessage");
call.invoke ( new Object [] { args[0] } );
call.setOperationName ("getHelloMessage");
System.out.println (call.invoke ( new Object [] {} ));
} catch (Exception e) {
System.err.println ("ERROR:n" + e.toString());
}
}
}
HelloWorldClient.java
Generated for HelloWorld
HelloWorldServiceLocator
implements
HelloWorldService
HelloSoapBindingStub
implements
HelloWorld
getHello()
1. Make an instance of this
3. Call methods on this proxy object
2. Use it to make an instance of this
public class HelloWorldClientFromStubs {
public static void main (String [] args) {
try {
// prepare the calls (the same for all called methods)
hello.generated.HelloWorldService service =
new hello.generated.HelloWorldServiceLocator();
hello.generated.HelloWorld myHelloProxy = service.getHello();
// call "get message"
if (args.length == 0) {
String result = myHelloProxy.getHelloMessage()
System.out.println (result);
System.exit (0);
}
// call "set message" and afterwards "get message”
myHelloProxy.setHelloMessage (args[0]);
System.out.println (myHelloProxy.getHelloMessage());
} catch (Exception e) {
System.err.println ("ERROR:n" + e.toString());
}
}
}
HelloWorldClientFromStubs.java
Java <=> XML Data Mapping
• How Java objects are converted to/from XML
data (in order to be able to be put into SOAP
messages)
• Important especially for the non-basic data types
• It’s easier if your non-basic data types are Java
Beans (having set/get methods for members)
A Web Service example in Perl
This is a module implementing
the “business logic”
package HelloPerl;
use strict;
use vars qw( $Message );
$Message = 'Hello, here is Perl.';
sub getHelloMessage { $Message; }
sub setHelloMessage { $Message = shift; }
1;
This is a cgi-bin
script
#!/usr/bin/perl -w -- Perl –
use SOAP::Transport::HTTP;
SOAP::Transport::HTTP::CGI
-> dispatch_to('HelloPerl')
-> handle;
#!/usr/bin/perl –w
use SOAP::Lite
on_fault => sub {…};
print SOAP::Lite
-> uri ('HelloPerl')
-> proxy ('http://localhost/cgi-bin/helloserver.cgi')
-> getHelloMessage
-> result;
This is a client
SOAP::Lite
• a collection of (many) modules
– but they are loaded automatically when needed
• supports SOAP 1.1 specification
• all methods can be used for both setting and
retrieving values:
– if you provide no parameters, you will get current value, and if parameters
are provided, a new value will be assigned to the object
– and the method in question will return the current object (if not stated
otherwise) which is is suitable for stacking these calls like:
$lite = SOAP::Lite
-> uri(’openBQS')
-> proxy('http://industry.ebi.ac.uk/soap/openBQS')
;
Using “wsdl” - directly
#!/usr/bin/perl -w
use SOAP::Lite on_fault => sub {…};
print SOAP::Lite
-> service ('file:/home/senger/ws-ws/perl/Hello.wsdl')
-> setHelloMessage (123);
• getting “.wsdl” file by using its URL
• then, you do not need to worry about autotyping
#!/usr/bin/perl -w
use SOAP::Lite on_fault => sub {…};
my $service = SOAP::Lite -> service ('file:./Hello.wsdl');
$service->setHelloMessage ($ARGV[0] or "Hello!!!");
print $service->getHelloMessage, "n";
Why to use Web Services…
(comparing to CORBA)
• WS are easier to deploy because of their firewall-
friendliness
• WS are quite well marketed (both from IT
companies and Open Source projects)
• However:
– user sessions are less standardised
– many parts yet-to-be-done (notification, transactions,
security, etc.)
• The programming effort and maintainability is
similar to other distributed technologies
1. What is similar
• The programming effort and maintainability is
roughly the same both for Web Services and
CORBA
– For CORBA I need an ORB
• …but do you know anybody doing WS without a SOAP
toolkit?
– For CORBA I need an IDL compiler
• …not always (ask Perl folks)
• …for WS you use frequently stubs generated from WSDL
– …similar answers for valuetype/custom encoding, etc.
2. What is (IMHO) better
• WS are easier to deploy because of their firewall-
friendliness
• WS are quite well marketed (both from IT
companies and Open Source projects)
• Integration of WS into workflows seems to be
very dynamic and very real topic
– comparing with CORBA Components
3. What is (IMHO) worse
• Peer-to-peer access is problematic
– notification by “server-push” is harder to achieve
• User sessions (server’s state-fullness) are less
standardised
– …and therefore less inter-operable
• Many parts yet-to-be-done, or they are quite
complex (notification, transactions, security,
etc.)
So what?
• Don't throw the baby out with the bathwater
– combine the existing projects with a new Web
Services layer; in most cases it is not so difficult
• Apply existing standards to new Web Services
projects
– think MDA – it may help, even without the whole
OMG adoption process
Conclusions
• Distributed computing is inevitable
• More accesses by programs than by clicking on
hyperlinks
• More technologies of distributed architecture
will collaborate
• The better standards we have the better results
we’ll get
• Web Services is not a new hype but a trend to
follow

Más contenido relacionado

La actualidad más candente

Even faster django
Even faster djangoEven faster django
Even faster djangoGage Tseng
 
RESTful Web services using JAX-RS
RESTful Web services using JAX-RSRESTful Web services using JAX-RS
RESTful Web services using JAX-RSArun Gupta
 
Mojo – Simple REST Server
Mojo – Simple REST ServerMojo – Simple REST Server
Mojo – Simple REST Serverhendrikvb
 
Java web application development
Java web application developmentJava web application development
Java web application developmentRitikRathaur
 
Internet Explorer 8
Internet Explorer 8Internet Explorer 8
Internet Explorer 8David Chou
 
OSCON 2011 CouchApps
OSCON 2011 CouchAppsOSCON 2011 CouchApps
OSCON 2011 CouchAppsBradley Holt
 
Php &amp; my sql - how do pdo, mysq-li, and x devapi do what they do
Php &amp; my sql  - how do pdo, mysq-li, and x devapi do what they doPhp &amp; my sql  - how do pdo, mysq-li, and x devapi do what they do
Php &amp; my sql - how do pdo, mysq-li, and x devapi do what they doDave Stokes
 
Servletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postServletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postvamsi krishna
 
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPStaying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPOscar Merida
 
Jsp/Servlet
Jsp/ServletJsp/Servlet
Jsp/ServletSunil OS
 
Introduction to Ajax programming
Introduction to Ajax programmingIntroduction to Ajax programming
Introduction to Ajax programmingFulvio Corno
 
Open Source World June '21 -- JSON Within a Relational Database
Open Source World June '21 -- JSON Within a Relational DatabaseOpen Source World June '21 -- JSON Within a Relational Database
Open Source World June '21 -- JSON Within a Relational DatabaseDave Stokes
 
HTML5 Server Sent Events/JSF JAX 2011 Conference
HTML5 Server Sent Events/JSF  JAX 2011 ConferenceHTML5 Server Sent Events/JSF  JAX 2011 Conference
HTML5 Server Sent Events/JSF JAX 2011 ConferenceRoger Kitain
 
Stop Making The Web Harder Than It Is; Real-world REST, HATEOAS, and Hypermed...
Stop Making The Web Harder Than It Is; Real-world REST, HATEOAS, and Hypermed...Stop Making The Web Harder Than It Is; Real-world REST, HATEOAS, and Hypermed...
Stop Making The Web Harder Than It Is; Real-world REST, HATEOAS, and Hypermed...kiphampton
 

La actualidad más candente (20)

Even faster django
Even faster djangoEven faster django
Even faster django
 
RESTful Web services using JAX-RS
RESTful Web services using JAX-RSRESTful Web services using JAX-RS
RESTful Web services using JAX-RS
 
Mojo – Simple REST Server
Mojo – Simple REST ServerMojo – Simple REST Server
Mojo – Simple REST Server
 
Java web application development
Java web application developmentJava web application development
Java web application development
 
Internet Explorer 8
Internet Explorer 8Internet Explorer 8
Internet Explorer 8
 
OSCON 2011 CouchApps
OSCON 2011 CouchAppsOSCON 2011 CouchApps
OSCON 2011 CouchApps
 
Web services tutorial
Web services tutorialWeb services tutorial
Web services tutorial
 
Php &amp; my sql - how do pdo, mysq-li, and x devapi do what they do
Php &amp; my sql  - how do pdo, mysq-li, and x devapi do what they doPhp &amp; my sql  - how do pdo, mysq-li, and x devapi do what they do
Php &amp; my sql - how do pdo, mysq-li, and x devapi do what they do
 
Servletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postServletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,post
 
Ws rest
Ws restWs rest
Ws rest
 
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPStaying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHP
 
Jersey and JAX-RS
Jersey and JAX-RSJersey and JAX-RS
Jersey and JAX-RS
 
Jsp/Servlet
Jsp/ServletJsp/Servlet
Jsp/Servlet
 
Introduction to Ajax programming
Introduction to Ajax programmingIntroduction to Ajax programming
Introduction to Ajax programming
 
Open Source World June '21 -- JSON Within a Relational Database
Open Source World June '21 -- JSON Within a Relational DatabaseOpen Source World June '21 -- JSON Within a Relational Database
Open Source World June '21 -- JSON Within a Relational Database
 
HTML5 Server Sent Events/JSF JAX 2011 Conference
HTML5 Server Sent Events/JSF  JAX 2011 ConferenceHTML5 Server Sent Events/JSF  JAX 2011 Conference
HTML5 Server Sent Events/JSF JAX 2011 Conference
 
Stop Making The Web Harder Than It Is; Real-world REST, HATEOAS, and Hypermed...
Stop Making The Web Harder Than It Is; Real-world REST, HATEOAS, and Hypermed...Stop Making The Web Harder Than It Is; Real-world REST, HATEOAS, and Hypermed...
Stop Making The Web Harder Than It Is; Real-world REST, HATEOAS, and Hypermed...
 
Servlets
ServletsServlets
Servlets
 
Servlets
ServletsServlets
Servlets
 
JavaScript JQUERY AJAX
JavaScript JQUERY AJAXJavaScript JQUERY AJAX
JavaScript JQUERY AJAX
 

Similar a Webservices

An Introduction to Tornado
An Introduction to TornadoAn Introduction to Tornado
An Introduction to TornadoGavin Roy
 
Synapseindia dot net development web applications with ajax
Synapseindia dot net development  web applications with ajaxSynapseindia dot net development  web applications with ajax
Synapseindia dot net development web applications with ajaxSynapseindiappsdevelopment
 
nodejs_at_a_glance.ppt
nodejs_at_a_glance.pptnodejs_at_a_glance.ppt
nodejs_at_a_glance.pptWalaSidhom1
 
WebServices introduction in Mule
WebServices introduction in MuleWebServices introduction in Mule
WebServices introduction in MuleF K
 
WebServices SOAP WSDL and UDDI
WebServices SOAP WSDL and UDDIWebServices SOAP WSDL and UDDI
WebServices SOAP WSDL and UDDIRajkattamuri
 
SOAP, WSDL and UDDI
SOAP, WSDL and UDDISOAP, WSDL and UDDI
SOAP, WSDL and UDDIShahid Shaik
 
Web services101
Web services101Web services101
Web services101chaos41
 
Introducing Node.js in an Oracle technology environment (including hands-on)
Introducing Node.js in an Oracle technology environment (including hands-on)Introducing Node.js in an Oracle technology environment (including hands-on)
Introducing Node.js in an Oracle technology environment (including hands-on)Lucas Jellema
 
jkljklj
jkljkljjkljklj
jkljkljhoefo
 
GWT Web Socket and data serialization
GWT Web Socket and data serializationGWT Web Socket and data serialization
GWT Web Socket and data serializationGWTcon
 
HTML5/JavaScript Communication APIs - DPC 2014
HTML5/JavaScript Communication APIs - DPC 2014HTML5/JavaScript Communication APIs - DPC 2014
HTML5/JavaScript Communication APIs - DPC 2014Christian Wenz
 
Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSam Brannen
 
Introduction to Node (15th May 2017)
Introduction to Node (15th May 2017)Introduction to Node (15th May 2017)
Introduction to Node (15th May 2017)Lucas Jellema
 

Similar a Webservices (20)

An Introduction to Tornado
An Introduction to TornadoAn Introduction to Tornado
An Introduction to Tornado
 
Synapseindia dot net development web applications with ajax
Synapseindia dot net development  web applications with ajaxSynapseindia dot net development  web applications with ajax
Synapseindia dot net development web applications with ajax
 
nodejs_at_a_glance.ppt
nodejs_at_a_glance.pptnodejs_at_a_glance.ppt
nodejs_at_a_glance.ppt
 
Ntg web services
Ntg   web servicesNtg   web services
Ntg web services
 
C# Unit5 Notes
C# Unit5 NotesC# Unit5 Notes
C# Unit5 Notes
 
WebServices introduction in Mule
WebServices introduction in MuleWebServices introduction in Mule
WebServices introduction in Mule
 
WebServices SOAP WSDL and UDDI
WebServices SOAP WSDL and UDDIWebServices SOAP WSDL and UDDI
WebServices SOAP WSDL and UDDI
 
SOAP, WSDL and UDDI
SOAP, WSDL and UDDISOAP, WSDL and UDDI
SOAP, WSDL and UDDI
 
WebServices
WebServicesWebServices
WebServices
 
Web services101
Web services101Web services101
Web services101
 
Introducing Node.js in an Oracle technology environment (including hands-on)
Introducing Node.js in an Oracle technology environment (including hands-on)Introducing Node.js in an Oracle technology environment (including hands-on)
Introducing Node.js in an Oracle technology environment (including hands-on)
 
5-WebServers.ppt
5-WebServers.ppt5-WebServers.ppt
5-WebServers.ppt
 
5.node js
5.node js5.node js
5.node js
 
jkljklj
jkljkljjkljklj
jkljklj
 
GWT Web Socket and data serialization
GWT Web Socket and data serializationGWT Web Socket and data serialization
GWT Web Socket and data serialization
 
Practical OData
Practical ODataPractical OData
Practical OData
 
HTML5/JavaScript Communication APIs - DPC 2014
HTML5/JavaScript Communication APIs - DPC 2014HTML5/JavaScript Communication APIs - DPC 2014
HTML5/JavaScript Communication APIs - DPC 2014
 
Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. REST
 
AJppt.pptx
AJppt.pptxAJppt.pptx
AJppt.pptx
 
Introduction to Node (15th May 2017)
Introduction to Node (15th May 2017)Introduction to Node (15th May 2017)
Introduction to Node (15th May 2017)
 

Más de s4al_com

Spring talk111204
Spring talk111204Spring talk111204
Spring talk111204s4al_com
 
Orm and hibernate
Orm and hibernateOrm and hibernate
Orm and hibernates4al_com
 
Online gas booking project in java
Online gas booking project in javaOnline gas booking project in java
Online gas booking project in javas4al_com
 
Introduction to ejb and struts framework
Introduction to ejb and struts frameworkIntroduction to ejb and struts framework
Introduction to ejb and struts frameworks4al_com
 

Más de s4al_com (7)

Struts
StrutsStruts
Struts
 
Spring talk111204
Spring talk111204Spring talk111204
Spring talk111204
 
Spring
SpringSpring
Spring
 
Orm and hibernate
Orm and hibernateOrm and hibernate
Orm and hibernate
 
Java
JavaJava
Java
 
Online gas booking project in java
Online gas booking project in javaOnline gas booking project in java
Online gas booking project in java
 
Introduction to ejb and struts framework
Introduction to ejb and struts frameworkIntroduction to ejb and struts framework
Introduction to ejb and struts framework
 

Último

Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 

Último (20)

Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 

Webservices

  • 1. Abstract • Web Services is a technology applicable for computationally distributed problems, including access to large databases – What other technologies were/are available and how they compare with Web Services? • The main buzzwords: – Integration & Standardization & Access by programs
  • 2. Why to use more than one computer? • Distributed resources – access to shared data – access to shared programs – access to CPU (e.g. many desktop PCs together), to memory, to special devices (e.g. printer) • Complete independence on the internal implementation
  • 3. Distributed architecture • gives – access to distributed resources – development encapsulation • maintainability, re-usability, legacy-awareness – implementation independence • requires – adding a communication layer between parts – synchronization of efforts • including such nasty things as distributed garbage collection
  • 4. Sending requests, getting results Waiting for requests (known location, known port) Communication protocol, Data format Distributed architecture • Basic questions are: – What kind of protocol to use, and what data to transmit – What to do with requests on the server side
  • 5. Sending requests, getting results Waiting for requests (known location, known port) Data as name/value pairs Traditional CGI-based approach • cgi-bin scripts: – Data transmitted as name-value pairs (HTML forms) – Transport over (state-less) HTTP protocol – no standards for keeping user sessions (state-fullness) – server side: a script is called
  • 7. Sending requests, getting results Waiting for requests (known location, known port) Data in binary format CORBA-based approach • CORBA: – Data transmitted as objects (at least it looks like that) – Transport (usually) over well standardised IIOP protocol – user sessions (state-fullness) very inter-operable – server side: an RPC call is made
  • 8. Sending requests, getting results Waiting for requests (known location, known port) Data in XML format SOAP-based communication • SOAP: – Data in a well-defined XML format – Transport over various protocols • HTTP, SMTP are the most used, perhaps because they are firewall-friendly – server side: either an RPC call or a message delivered
  • 9. Web services • A collection of XML-based technologies developed by the e-business community to address issues of: – service discovery – interoperable data exchange and/or application invocation – service compositions (workflow, business processes) • Major developers include: – Apache, IBM, HP, SUN & Microsoft (.NET) • http://www.webservices.org/
  • 10. W3C (working group) definition • "A Web service is a software application identified by a URI, whose interfaces and bindings are capable of being defined, described and discovered as XML artefacts. A Web service supports direct interactions with other software agents using XML based messages exchanged via internet-based protocols." • http://www.w3c.org/TR/2002/WD-wsa-reqs-20020819
  • 11. Web Services Architecture Let a program “click on a web page”
  • 13. SOAP • Simple Object Access Protocol – http://www.w3c.org/TR/SOAP/ • A lightweight protocol for exchange of information in a decentralised, distributed environment • Two different styles to use: – to encapsulate RPC calls using the extensibility and flexibility of XML – …or to deliver a whole document without any method calls encapsulated
  • 16. WSDL • Web Services Definition Language – http://www.w3.org/TR/wsdl/ • An XML-based language for describing Web Services – what the service does (description) – how to use it (method signatures) – where to find the service • It does not depend on the underlying protocol • But: It is not much human-readable
  • 17. Hello.wsdl<?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions targetNamespace="http://localhost:8080/axis/services/Hello" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:SOAP- ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:impl="http://localhost:8080/axis/services/Hello-impl" xmlns:intf="http://localhost:8080/axis/services/Hello" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <wsdl:message name="setHelloMessageRequest"> <wsdl:part name="in0" type="xsd:string"/> </wsdl:message> <wsdl:message name="getHelloMessageResponse"> <wsdl:part name="return" type="xsd:string"/> </wsdl:message> <wsdl:message name="setHelloMessageResponse"> </wsdl:message> <wsdl:message name="getHelloMessageRequest"> </wsdl:message> <wsdl:portType name="HelloWorldService"> <wsdl:operation name="getHelloMessage"> <wsdl:input message="intf:getHelloMessageRequest"/> <wsdl:output message="intf:getHelloMessageResponse"/> </wsdl:operation> <wsdl:operation name="setHelloMessage" parameterOrder="in0"> <wsdl:input message="intf:setHelloMessageRequest"/> <wsdl:output message="intf:setHelloMessageResponse"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="HelloSoapBinding" type="intf:HelloWorldService"> <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="getHelloMessage"> <wsdlsoap:operation soapAction=""/> <wsdl:input> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="getHelloMessage" use="encoded"/> </wsdl:input> <wsdl:output> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost:8080/axis/services/Hello" use="encoded"/> </wsdl:output> </wsdl:operation> <wsdl:operation name="setHelloMessage"> <wsdlsoap:operation soapAction=""/> <wsdl:input> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="setHelloMessage" use="encoded"/> </wsdl:input> <wsdl:output> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost:8080/axis/services/Hello" use="encoded"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="HelloWorldServiceService"> <wsdl:port binding="intf:HelloSoapBinding" name="Hello"> <wsdlsoap:address location="http://localhost:8080/axis/services/Hello"/> </wsdl:port> </wsdl:service> </wsdl:definitions>
  • 18. UDDI (and alternatives) • Universal Description, Discovery and Integration – http://www.uddi.org • UDDI creates a platform-independent, open framework & registry for: – Describing services – Discovering businesses – Integrating business services • The UDDI may be less used than predicted, especially on the Internet level • BioMoby - an alternative for Life Sciences domain?
  • 20. A Web Service example in Java SOAP-aware Servlet (e.g. Apache Axis) Any class processing the incoming requests (“business logic” Any class processing the incoming requests (“business logic” Any class processing the incoming requests (“business logic” Any class processing the incoming requests (“business logic” HTTP Server Servlet engine (e.g. Apache Tomcat) Sending requests, getting results
  • 21. Usual principles of Java toolkits • Writing server is easier than writing clients (but only regarding the toolkit, not the business logic) • Servers may be written independently on the used toolkit • Always test interoperability with a non-Java client (because of data serialization and de-serialization) • Steps: – write your service implementation – make all your classes available to the toolkit – deploy your service (usually done just once) – restart the whole servlet engine – test it with a client request
  • 22. Java SOAP Toolkits • Apache SOAP (was IBM’s SOAP4J) • Apache Axis (a follow-on to the Apache SOAP) • …and many others • …but let’s stay with Apache Axis: – http://ws.apache.org/axis/
  • 23. package hello; public interface HelloWorld { String getHelloMessage(); void setHelloMessage (String newHello); } package hello; public class HelloWorldService implements HelloWorld { String message = "Hello, world!"; public String getHelloMessage() { return message; } public void setHelloMessage (String newMessage) { message = newMessage; } } hello/HelloWorld.java hello/HelloWorldService.java
  • 24. import org.apache.axis.client.*; public class HelloWorldClient { public static void main (String [] args) { try { // prepare the call (the same for all called methods) Call call = (Call) new Service().createCall(); call.setTargetEndpointAddress (new java.net.URL("http://localhost:8080/axis/services/Hello")); // call "get message" if (args.length == 0) { call.setOperationName ("getHelloMessage"); String result = (String) call.invoke ( new Object [] {} ); System.out.println (result); System.exit (0); } // call "set message" and afterwards "get message" call.setMaintainSession (true); // TRY also without this line... call.setOperationName ("setHelloMessage"); call.invoke ( new Object [] { args[0] } ); call.setOperationName ("getHelloMessage"); System.out.println (call.invoke ( new Object [] {} )); } catch (Exception e) { System.err.println ("ERROR:n" + e.toString()); } } } HelloWorldClient.java
  • 25. Generated for HelloWorld HelloWorldServiceLocator implements HelloWorldService HelloSoapBindingStub implements HelloWorld getHello() 1. Make an instance of this 3. Call methods on this proxy object 2. Use it to make an instance of this
  • 26. public class HelloWorldClientFromStubs { public static void main (String [] args) { try { // prepare the calls (the same for all called methods) hello.generated.HelloWorldService service = new hello.generated.HelloWorldServiceLocator(); hello.generated.HelloWorld myHelloProxy = service.getHello(); // call "get message" if (args.length == 0) { String result = myHelloProxy.getHelloMessage() System.out.println (result); System.exit (0); } // call "set message" and afterwards "get message” myHelloProxy.setHelloMessage (args[0]); System.out.println (myHelloProxy.getHelloMessage()); } catch (Exception e) { System.err.println ("ERROR:n" + e.toString()); } } } HelloWorldClientFromStubs.java
  • 27. Java <=> XML Data Mapping • How Java objects are converted to/from XML data (in order to be able to be put into SOAP messages) • Important especially for the non-basic data types • It’s easier if your non-basic data types are Java Beans (having set/get methods for members)
  • 28. A Web Service example in Perl This is a module implementing the “business logic” package HelloPerl; use strict; use vars qw( $Message ); $Message = 'Hello, here is Perl.'; sub getHelloMessage { $Message; } sub setHelloMessage { $Message = shift; } 1; This is a cgi-bin script #!/usr/bin/perl -w -- Perl – use SOAP::Transport::HTTP; SOAP::Transport::HTTP::CGI -> dispatch_to('HelloPerl') -> handle; #!/usr/bin/perl –w use SOAP::Lite on_fault => sub {…}; print SOAP::Lite -> uri ('HelloPerl') -> proxy ('http://localhost/cgi-bin/helloserver.cgi') -> getHelloMessage -> result; This is a client
  • 29. SOAP::Lite • a collection of (many) modules – but they are loaded automatically when needed • supports SOAP 1.1 specification • all methods can be used for both setting and retrieving values: – if you provide no parameters, you will get current value, and if parameters are provided, a new value will be assigned to the object – and the method in question will return the current object (if not stated otherwise) which is is suitable for stacking these calls like: $lite = SOAP::Lite -> uri(’openBQS') -> proxy('http://industry.ebi.ac.uk/soap/openBQS') ;
  • 30. Using “wsdl” - directly #!/usr/bin/perl -w use SOAP::Lite on_fault => sub {…}; print SOAP::Lite -> service ('file:/home/senger/ws-ws/perl/Hello.wsdl') -> setHelloMessage (123); • getting “.wsdl” file by using its URL • then, you do not need to worry about autotyping #!/usr/bin/perl -w use SOAP::Lite on_fault => sub {…}; my $service = SOAP::Lite -> service ('file:./Hello.wsdl'); $service->setHelloMessage ($ARGV[0] or "Hello!!!"); print $service->getHelloMessage, "n";
  • 31. Why to use Web Services… (comparing to CORBA) • WS are easier to deploy because of their firewall- friendliness • WS are quite well marketed (both from IT companies and Open Source projects) • However: – user sessions are less standardised – many parts yet-to-be-done (notification, transactions, security, etc.) • The programming effort and maintainability is similar to other distributed technologies
  • 32. 1. What is similar • The programming effort and maintainability is roughly the same both for Web Services and CORBA – For CORBA I need an ORB • …but do you know anybody doing WS without a SOAP toolkit? – For CORBA I need an IDL compiler • …not always (ask Perl folks) • …for WS you use frequently stubs generated from WSDL – …similar answers for valuetype/custom encoding, etc.
  • 33. 2. What is (IMHO) better • WS are easier to deploy because of their firewall- friendliness • WS are quite well marketed (both from IT companies and Open Source projects) • Integration of WS into workflows seems to be very dynamic and very real topic – comparing with CORBA Components
  • 34. 3. What is (IMHO) worse • Peer-to-peer access is problematic – notification by “server-push” is harder to achieve • User sessions (server’s state-fullness) are less standardised – …and therefore less inter-operable • Many parts yet-to-be-done, or they are quite complex (notification, transactions, security, etc.)
  • 35. So what? • Don't throw the baby out with the bathwater – combine the existing projects with a new Web Services layer; in most cases it is not so difficult • Apply existing standards to new Web Services projects – think MDA – it may help, even without the whole OMG adoption process
  • 36. Conclusions • Distributed computing is inevitable • More accesses by programs than by clicking on hyperlinks • More technologies of distributed architecture will collaborate • The better standards we have the better results we’ll get • Web Services is not a new hype but a trend to follow