Types of Cloud Computing

Similar documents
MOBILE APPLICATIONS AND CLOUD COMPUTING. Roberto Beraldi

MOBILE APPLICATIONS AND CLOUD COMPUTING. Roberto Beraldi

T Network Application Frameworks and XML Web Services and WSDL Tancred Lindholm

1.Remote Procedure Call Basics Requests Types Response Strategies/Goals FAQ...

REST web services. Representational State Transfer Author: Nemanja Kojic

XML Processing and Web Services. Chapter 17

02267: Software Development of Web Services

Oracle Service Bus Examples and Tutorials

XIII. Service Oriented Computing. Laurea Triennale in Informatica Corso di Ingegneria del Software I A.A. 2006/2007 Andrea Polini

ISM/ISC Middleware Module

ITP 140 Mobile Technologies. Mobile Topics

Application layer Web 2.0

Cloud Powered Mobile Apps with Microsoft Azure

Fairsail REST API: Guide for Developers

WEB SERVICES. Revised 9/29/2015

What is a Web service?

VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANKULATHUR DEPARTMENT OF COMPUTER APPLICATIONS SUBJECT : MC7502 SERVICE ORIENTED ARCHITECTURE

The presentation explains how to create and access the web services using the user interface. WebServices.ppt. Page 1 of 14

Web Services Technologies

Developing a Web Server Platform with SAPI Support for AJAX RPC using JSON

Middleware Lou Somers

Universal Event Monitor for SOA Reference Guide

02267: Software Development of Web Services

rpafi/jl open source Apache Axis2 Web Services 2nd Edition using Apache Axis2 Deepal Jayasinghe Create secure, reliable, and easy-to-use web services

Accessing Data with ADOBE FLEX 4.6

WEB SERVICES FOR MOBILE COMPUTING

Lesson 4 Web Service Interface Definition (Part I)

Contents. 2 Alfresco API Version 1.0

The Great Office 365 Adventure

place/business fetch details, removefromfavorite () function, 189 search button handler bind, B BlackBerry build environment

Enhanced Mobile Cloud Computing Platform

Mobile Push Architectures

Experimental Comparison of Hybrid and Native Applications for Mobile Systems

Introduction to the EIS Guide

Example. Represent this as XML

Designing RESTful Web Applications

Closer Look at Enterprise Service Bus. Deb L. Ayers Sr. Principle Product Manager Oracle Service Bus SOA Fusion Middleware Division

Oracle Service Bus. User Guide 10g Release 3 Maintenance Pack 1 (10.3.1) June 2009

IBM SPSS Collaboration and Deployment Services Version 6 Release 0. Single Sign-On Services Developer's Guide

Learning Web App Development

AquaLogic Service Bus

GOA365: The Great Office 365 Adventure

Cloud Powered Mobile Apps with Azure

REST vs. SOAP: Making the Right Architectural Decision

2. Define Contemporary SOA. Contemporary SOA represents an architecture that promotes service orientation through the use of web services.

WIRIS quizzes web services Getting started with PHP and Java

Apigee Gateway Specifications

WWW. World Wide Web Aka The Internet. dr. C. P. J. Koymans. Informatics Institute Universiteit van Amsterdam. November 30, 2007

Developing Java Web Services

No Trade Secrets. Microsoft does not claim any trade secret rights in this documentation.

Cloud Computing. Chapter 2 Software as a Service (SaaS)

A standards-based approach to application integration

Literature Review Service Frameworks and Architectural Design Patterns in Web Development

Integration of Hotel Property Management Systems (HPMS) with Global Internet Reservation Systems

tibbr Now, the Information Finds You.

Performance Testing for Ajax Applications

SOA CERTIFIED JAVA DEVELOPER (7 Days)

70-487: Developing Windows Azure and Web Services

Introduction to the. Barracuda Embedded Web-Server

Implementing Mobile Thin client Architecture For Enterprise Application

Building and Using Web Services With JDeveloper 11g

Java Web Services Training

Leveraging Cloud Storage Through Mobile Applications Using Mezeo Cloud Storage Platform REST API. John Eastman Mezeo

SoapUI NG Pro and Ready! API Platform Two-Day Training Course Syllabus

Copyright 2012, Oracle and/or its affiliates. All rights reserved.

Experimenting in the domain of RIA's and Web 2.0

An Oracle White Paper June RESTful Web Services for the Oracle Database Cloud - Multitenant Edition

1 What Are Web Services?

1 What Are Web Services?

An IDL for Web Services

Beyond The Web Drupal Meets The Desktop (And Mobile) Justin Miller Code Sorcery Workshop, LLC

ITP 342 Mobile App Development. APIs

JBoss SOAP Web Services User Guide. Version: M5

Cross-domain Identity Management System for Cloud Environment

Understanding Evolution's Architecture A Technical Overview

Mobility Information Series

WhitePaper. Web services: Benefits, challenges, and a unique, visual development solution

Developer Guide: REST API Applications. SAP Mobile Platform 2.3 SP03

A Tool for Evaluation and Optimization of Web Application Performance

TIBCO ActiveMatrix Service Bus Getting Started. Software Release 2.3 February 2010

An introduction to creating Web 2.0 applications in Rational Application Developer Version 8.0

Enabling REST Services with SAP PI. Michael Le Peter Ha

Welcome to the Force.com Developer Day

STUDY ON IMPROVING WEB SECURITY USING SAML TOKEN

CST6445: Web Services Development with Java and XML Lesson 1 Introduction To Web Services Skilltop Technology Limited. All rights reserved.

Web Services Strategy

The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into

JVA-561. Developing SOAP Web Services in Java

ITS. Java WebService. ITS Data-Solutions Pvt Ltd BENEFITS OF ATTENDANCE:

An introduction to creating JSF applications in Rational Application Developer Version 8.0

Web Services Tutorial

Security Testing For RESTful Applications

Agents and Web Services

Smartphone Application Development using HTML5-based Cross- Platform Framework

Budget Event Management Design Document

How To Test Your Web Site On Wapt On A Pc Or Mac Or Mac (Or Mac) On A Mac Or Ipad Or Ipa (Or Ipa) On Pc Or Ipam (Or Pc Or Pc) On An Ip

Transcription:

Types of Cloud Computing (SaaS)Software as a Service XaaS (PaaS) Platform as a Service (IaaS) Infrastructure as a Service

Access to Cloud computing Service Web URL (standard HTTP methods) web brower HTTP IaaS PaaS SaaS Rest,XML-RPC,etc HTTP Application Programmatic Service Access (many methods) A service is delivered through two access points: Standard web browsing (HTTP) and Programmatic access (Rest,XML-RPC,SOAP, etc. over HTTP)

What is a service? Technology A SERVICE INTERFACE Technology B -------- -------- -------- -------- Technology C Interface definition (e.g., WSDL)

Web services Represent an established and common medium for sophisticated, web-based service logic. The technologies exploited in a WS are WSDL (Web Service Definition Language) Markup language used to define the API of the WS XML Schema Define the structure of the data being exchanged SOAP Request/Reply protocol for message exchange UDDI (Universal Description,Discovery,Integration) Register where WSDL description can be published and retrived

Web Service XML Schema define types and payload structure for SOAP WSDL Enable discovery of UDDI

Web service, main functional layers SOAP messages can be used to represent either single documents or pairs of request and reply messages. But it is the synchronous HTTP protocol that is used to relate each Reply to the corresponding Request. Web Services Service Description (WSDL) SOAP URIs(URLs or URNs) XML HTTP,SMTP or other transport Web services are accessed by URIs by clients using messages formatted in XML. SOAP is used to express Request and Reply messages in XML and to transport them over HTTP.

Characteristic of a web service A web service consists of a single remote object it is not possible to instantiate additional remote objects during the running of a web service and remote object references are not used. The details of SOAP and XML can be hidden from client and server programmer, for example, by the Java web services API (JAX-RPC). Web services use service descriptions which are written in an XML based language called WSDL. Service descriptions are more general than interface definitions in that they also specify the endpoints (URIs) of a service and the protocols used (e.g. SOAP and HTTP) to communicate the messages. WSDL documents are accessed via their URIs, which can be used by, for example, the JAX-RPC system to generate client proxies.

SOAP message

Message exchange patterns Name Messages sent by Client Server Delivery Fault message In-Out In-Only Robust In-Only Out-In Out-Only Robust Out-Only Request Reply may replace Reply Request no fault message Request guaranteed may be sent Reply Request may replace Reply Request no fault message Request guaranteed may send fault

SOAP Message Processing SOAP message travels along a path of nodes One-way transmission; like a Unix pipeline Request-Response treated as 2 messages: Message Exchange Pattern (MEP) Routing is not specified by SOAP SOAP nodes Initial sender, intermediaries, ultimate receiver Process and/or relay message Assume a SOAP role towards message

SOAP Message Processing Header blocks control processing Every header block is targeted at a SOAP role A node in that role must perform message processing implied by header block, and delete header block before relaying onward Header blocks may be used to: Authenticate Route the message Indicate preference to service broker

MEP=Message Exchange Pattern

Example: calculator

Coordination of WS flight booking a flight booking b Client Travel Agent Service hire car booking a hotel booking a hotel bookingb hire car booking b

Web Services and mobile apps SOAP introduces some significant overhead for web services that may be problematic for mobile devices. If one has full control over the client and the server, a simple REST / JSON based architecture may be more adequate (see next slide) Libraries are available for SOAP/Android

Web API (aka API as a Service) Delivering basic building blocks as services for other programs Services can be offered via simpler protocols JSON, JSON-RPC, REST, JSONP,

Web API (aka API as a Service) sniping

Web Api directory Mash-up

Web-API Based of RPC/HTTP Two main data representations JSON XML Protocols XML-RPC JSON-RPC SOAP REST

Web API: RPC over Internet RPC calls mapped onto HTTP (GET or POST) Synchronous call Asynchronous call with callbacks External data representation JSON (Java Simple Object Notation) http://www.json.org/json-it.html XML Protocols REST, SOAP, JSONP, JSON-RPC, XML-RPC,

JSON

JSON Two fundamental structures: See JSON Lint (validator)

XML in a nutshell XML (extensible Markup Language) is a language derived from SGML (Standard Generalized Markup Language), from which HTML also derives. The key notion in the markup language familty is a markup, something that describes some aspect of the data In HTML markups define the appearance of the document, whereas in XML they define the meaning of the data

XML in a nutshell An XML document is a tree Data appear inside elements An element not only contains the data itself but also information describing the meaning of the data

Example Title Author Il Signore degli Anelli, di John Ronald Reuel Tolkien, Bompiani. Editor

Example Book Title Author Editor Elements <book> <title> Il Signore degli Anelli </title> <author> John R. R. Tolkien </author> <editor> Bompiani </editor> </book> Tips : Browser allows to see the structure of the document

<title> Il Signore degli Anelli </title> Elements and attribute Data Tag Attribute (key/value pair) <title pages= 345 > Il Signore degli Anelli </title>

Well formed document

Valid document Document that follows composition rules about the its structure Two solutions Document Type Definition Easier, less powerfull XML Schema More complex, more powerfull

WFD and validation XML Document Syntax check Grammar Semantic check

XML-RPC

Overview of XML-RPC Data Model Scalar Struct Array Messages Request message Response message Error message

Scalar types Tag Type Example <i4> or <int> four-byte signed integer -12 <boolean> 0 (false) or 1 (true) 1 <string> string hello world <double> double-precision signed floating point number -12.214 <datetime.iso8601> date/time 20101504T09:30:00 <base64> base64-encoded binary ew91ignhbid0ihjlywqgdghpcye=

Struct type <struct> <member> <name>lowerbound</name> <value><i4>18</i4></value> </member> <member> <name>upperbound</name> <value><i4>139</i4></value> </member> </struct>

Array type <array> <data> <value><i4>12</i4></value> <value><string>egypt</string></value> <value><boolean>0</boolean></value> <value><i4>-31</i4></value> </data> </array>

Request message Root element: methodcall contains a MethodName element and a params element MethodName contains the name of the procedure being called Params is a list of values for the parameters

Example <?xml version="1.0"?> <methodcall> <methodname>xxx</methodname> <params> <param> <value><i4>123</i4></value> </param> <param> <value><double>12.3</double></value> </param> </params> </methodcall>

Example <?xml version="1.0"?> <methodcall> <methodname> XXX</methodName> <params> <param> <value><i4>123</i4></value> </param> <param> </param> </params> </methodcall> <value><double>12.3</double></value> methodcall methodname XXX params param value i4 123 param value double 12.3

Example <?xml version="1.0"?> <methodcall> <methodname>scuola XXX</methodName> <params> <param> <value><i4>123</i4></value> </param> <param> </param> </params> </methodcall> <value><double>12.3</double></value> methodcall methodname XXX params param value i4 123 param value double 12.3 methodcall methodname params param i4 param double

Complete request message POST /xmlrpc HTTP 1.0 User-Agent: Host: Content-type: text/xml Content-length:.. <?xml version= 1.0?> <methodcall> <methodname>circle_area</methodname> <params><param><value><double>12.2</double></value><param><params> </methodcall>

Reply message <?xml version="1.0"?> <methodresponse> <params> <param> </params> <value><i4>1</i4></value> </param> </methodresponse>

Fault message <?xml version="1.0"?> <methodresponse> <fault> <value> <struct> <member> <name>faultcode</name> <value><int>4</int></value> </member> <member> <name>faultstring</name> <value><string>too many parameters.</string></value> </member> </struct> </value> </fault> </methodresponse>

JSON-RPC 2.0 JSON-RPC is a stateless, transport agnostic, light-weight remote procedure call (RPC) protocol Much like XML-RPC No formal grammar Definition of request object and reply object New feature: batch requests, notification

Some example --> {"jsonrpc": "2.0", "method": "subtract", "params": [42, 23], "id": 1} <-- {"jsonrpc": "2.0", "result": 19, "id": 1} -->{"jsonrpc": "2.0", "method": "subtract", "params": [23, 42], "id": 2} <-- {"jsonrpc": "2.0", "result": -19, "id": 2} -->{"jsonrpc": "2.0", "method": "subtract", "params": {"subtrahend": 23, "minuend": 42}, "id": 3} <-- {"jsonrpc": "2.0", "result": 19, "id": 3} --> {"jsonrpc": "2.0", "method": "subtract", "params": {"minuend": 42, "subtrahend": 23}, "id": 4} <-- {"jsonrpc": "2.0", "result": 19, "id": 4}

JSON-RPC call batch --> [ {"jsonrpc": "2.0", "method": "sum", "params": [1,2,4], "id": "1"}, {"jsonrpc": "2.0", "method": "notify_hello", "params": [7]}, {"jsonrpc": "2.0", "method": "subtract", "params": [42,23], "id": "2"}, {"foo": "boo"}, {"jsonrpc": "2.0", "method": "foo.get", "params": {"name": "myself"}, "id": "5"}, {"jsonrpc": "2.0", "method": "get_data", "id": "9"} ] <-- [ {"jsonrpc": "2.0", "result": 7, "id": "1"}, {"jsonrpc": "2.0", "result": 19, "id": "2"}, {"jsonrpc": "2.0", "error": {"code": -32600, "message": "Invalid Request."}, "id": null}, {"jsonrpc": "2.0", "error": {"code": -32601, "message": "Method not found."}, "id": "5"}, {"jsonrpc": "2.0", "result": ["hello", 5], "id": "9"} ]

JSONP (JSON with Padding) GET f(json data). <javasxcript scr=xxx&callback=f>. Used in JavaScript Allows to overcome the crossdomain problem Uses a callback function

REST Method calls are mapped to HTTP request (Get, Post) Method name is a parameter of the call Reply is usually formatted as JSON or XML

SOAP It s by far the most verbose protocol Service is described in WSDL file Messages as XML documents formatted according to a specific schema

Useful debugging tools

RPC over Internet: example types= JSON, XML Features geolookup conditions forecast http://api.wunderground.com/api/key KEY/FEATURE FEATURE/[ /[FEATURE FEATURE ]/q/ ]/q/query QUERY.FORMAT

Example http://api.wunderground.com/api/[api_key]/conditions/q/rome.json location ID JSONP. http://api.wunderground.com/api/[api_key]/conditions/q/rome.json?callback=f

Example of XML reply http://api.wunderground.com/api/[apikey]/conditions/q/zmw:00000.1.16240.xml

Chrome Developer tool Interoperability

WebView Allows to host a web page The page can be loaded from internet or stored locally Requires INTERNET permission in the manifest It is based on WebKit engine Navigate back and forward Zoom in and out Load data, etc.. It may execute javascript code By default it is disabled

Using web view

Using web view An interesting point is that data can be loaded from a local file (or even passed as a string) browser.loaddata ( <html> <body> Hello!</body></html>, UTF-8 ); browser.loadurl ("file:///android_asset/my_local_webpage1.html");

Binding JavaScript code to Android code It is possible to create interfaces between JavaScript code and client-side Android code. In other words, JavaScript code can call a method in the Android code This is very powerful but it s also a source of risk One can write application using JS and HTML (this is what PhoneGap does)

Binding JavaScript code to Android code Add Interface (C, Android ) HTML + JS.. Android.test() Android Code Class C test public method Public methods are seen as JS function The object that is bound to your JavaScript runs in another thread and not in the thread in which it was constructed. Only simple data can be passed Android.test(); JSON can be useful in this respect

Example my_local_webpage1.html

Navigation functions

Static call Using JS src you can make a call and display results on the screen

Static call

Dynamic Call

Dynamic call 1. Dynamically create a HTML element and append in the head section 2. Call the URL with callback function

Dynamic call Show the current temperature on the screen

Using jquery

Additional example

Additional example

Example: Geocoding API

Example: Geocoding API (json)

Example: Geocoding API (xml)

Example: reverse Geocoding (json)

Example: Reverse geocoding (xml)

Google s JavaScript API (vers. 3)

Example

Example:

Geolocation in HTML5

Example: Flickr

Flickr: request, reply message format http://api.flickr.com/services/rest/ http://api.flickr.com/services/xmlrpc/ WEB-API http://api.flickr.com/services/soap/

Example: rest call

Example json format Reply is wrapped through jsonflickrapi callback name To avoid this, set nojsoncallback=1 option

Asynchronous RPC: AJAX Security: Cross domain not allowed

Example: using AJAX

Example: using AJAX

Example: searching photos

Example: searching photos

Example: searching data Key photo contains photo details

Example: searching photo Every photo has a link [mstzb] defines the size

Example: searching photos

Other example http://api.wordreference.com/{api_version}/{api_key}/{dictionary}/{term} http://api.wordreference.com/{api_version}/{api_key}/json/{dictionary}/{term}

Example

Example

Example: Twitter API

Exercise Write a simple JS program for the TTT game Hint: use a table for button formatting Use a single handler to make modification

Other web API http://openweathermap.org/api EditGrid

Dropbox is a free (up to 2GB), web-based cloud storage mechanism file backup service data sharing Data sync among different clients Mobile applications Windows STorage as a Service Linux.mp3.avi.jpg iphone ipad MAC REST / JSON Blackberry Android

Questions?