INFO 344 Web Tools And Development CK Wang University of Washington Spring 2014.

Slides:



Advertisements
Similar presentations
REST Vs. SOAP.
Advertisements

REST Introduction 吴海生 博克软件(杭州)有限公司.
RPC Robert Grimm New York University Remote Procedure Calls.
Network Services Networking for Home & Small Business.
World Wide Web Basics Original version by Carolyn Watters (Dalhousie U. Computer Science)
1 Java Networking – Part I CS , Spring 2008/9.
Internet…issues Managing the Internet
Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP  FTP  SMTP / POP3 / IMAP  Focus on client-server.
1 The World Wide Web. 2  Web Fundamentals  Pages are defined by the Hypertext Markup Language (HTML) and contain text, graphics, audio, video and software.
CS 415 N-Tier Application Development By Umair Ashraf July 6,2013 National University of Computer and Emerging Sciences Lecture # 9 Introduction to Web.
©Brooks/Cole, 2003 Chapter 6 Computer Networks. ©Brooks/Cole, 2003 Understand the rationale for the existence of networks. Distinguish between the three.
Process-to-Process Delivery:
INTRODUCTION TO WEB DATABASE PROGRAMMING
Computer Concepts 2014 Chapter 7 The Web and .
DATA COMMUNICATION DONE BY: ALVIN SAMPATH CARLVIN SAMPATH.
Throughput: Internet scenario
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Network Services Networking for Home and Small Businesses – Chapter.
Wyatt Pearsall November  HyperText Transfer Protocol.
E-Business William R. Mussatto CyberStrategies, Inc. 12/2/2000.
Network Services Networking for Home & Small Business.
CSCI 6962: Server-side Design and Programming Web Services.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Network Services Networking for Home and Small Businesses – Chapter 6.
Web Server Administration Web Services XML SOAP. Overview What are web services and what do they do? What is XML? What is SOAP? How are they all connected?
Lecture 15 Introduction to Web Services Web Service Applications.
Python and REST Kevin Hibma. What is REST? Why REST? REST stands for Representational State Transfer. (It is sometimes spelled "ReST".) It relies on a.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Transport Layer Network Fundamentals – Chapter 4.
Protecting Internet Communications: Encryption  Encryption: Process of transforming plain text or data into cipher text that cannot be read by anyone.
Day16 Protocols. TCP “Transmission Control Protocol” –Connection oriented Very like a phone call, an actual connection is made between the 2 parties.
Internet Protocol B Bhupendra Ratha, Lecturer School of Library and Information Science Devi Ahilya University, Indore
1 End-user Protocols, Services and QoS. 2 Layering: logical communication application transport network link physical application transport network link.
Copyright Jim Martin The World Wide Web Dr. Jim Martin
ECEN “Internet Protocols and Modeling”, Spring 2012 Course Materials: Papers, Reference Texts: Bertsekas/Gallager, Stuber, Stallings, etc Class.
World Wide Web “WWW”, "Web" or "W3". World Wide Web “WWW”, "Web" or "W3"
TCP/IP (Transmission Control Protocol / Internet Protocol)
API Crash Course CWU Startup Club. OUTLINE What is an API? Why are API’s useful? What is HTTP? JSON? XML? What is a RESTful API? How do we consume an.
Chapter 29 World Wide Web & Browsing World Wide Web (WWW) is a distributed hypermedia (hypertext & graphics) on-line repository of information that users.
1 Alternative view on Internet Computing Web 1.0 –Web 1.0 is first generation, Web Information based. Driven by Information provider. Web 2.0 Ajax enabled.
INTERNET PROTOCOLS. Microsoft’s Internet Information Server Home Page Figure IT2031 UNIT-3.
Advanced Web Technologies Lecture #4 By: Faraz Ahmed.
INFO 344 Web Tools And Development CK Wang University of Washington Spring 2014.
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
Internet Applications (Cont’d) Basic Internet Applications – World Wide Web (WWW) Browser Architecture Static Documents Dynamic Documents Active Documents.
Web Services An Introduction Copyright © Curt Hill.
Web Technologies Lecture 10 Web services. From W3C – A software system designed to support interoperable machine-to-machine interaction over a network.
INTERNET AND PROTOCOLS For more notes and topics visit: eITnotes.com.
Copyright © 2002 Pearson Education, Inc. Slide 3-1 Internet II A consortium of more than 180 universities, government agencies, and private businesses.
AJAX and REST. Slide 2 What is AJAX? It’s an acronym for Asynchronous JavaScript and XML Although requests need not be asynchronous It’s not really a.
Google maps engine and language presentation Ibrahim Motala.
COMPUTER NETWORKS Hwajung Lee. Image Source:
Feeling RESTful? Well, first we’ll define a Web Service –A web page meant to be consumed by a computer via an autonomous program as opposed to a web browser.
OE-NIK HP Advanced Programming Web services Standards and protocols Using web services Using web services with asynchronous calls.
CSE541: Web Applications Special Thanks to M. Abdur Rahman.
Week-7 (Lecture-1) Internet Protocols: TCP/IP, Client Server: Protocol: Specification in networking and Communications It defines the procedures to be.
National College of Science & Information Technology.
Web fundamentals: Clients, Servers, and Communication
Instructor Materials Chapter 5 Providing Network Services
WEB SERVICES.
Networking for Home and Small Businesses – Chapter 6
TCP Transport layer Er. Vikram Dhiman LPU.
Networking for Home and Small Businesses – Chapter 6
Chapter 2 Introduction Application Requirements VS. Transport Services
Topic 5: Communication and the Internet
WEB API.
Process-to-Process Delivery:
$, $$, $$$ API testing Edition
Serpil TOK, Zeki BAYRAM. Eastern MediterraneanUniversity Famagusta
Networking for Home and Small Businesses – Chapter 6
Process-to-Process Delivery: UDP, TCP
NEECOM – May 22, 2019 Todd L Gould, CEO
Chengyu Sun California State University, Los Angeles
Presentation transcript:

INFO 344 Web Tools And Development CK Wang University of Washington Spring 2014

Intro to Web Services

Web site vs. Web service Web site Web service User Software/Code http gethtml Browser A lot of similarities, in fact, html is kinda like xml You could say that web sites are a subset of web services But easier explanation => for people vs. for code. For person to consume For software to consume rest/soapxml/json

How do Web Services communicate?

Communication Data Format Service Protocol Application Layer Protocol Network Transport Protocol JSON, XML REST/SOAP/WSDL HTTP, SMTP, FTP, SSH TCP, UDP And more! But we’ll focus on these ones Data link layer

Data Format XML (1996) – Extensible Markup Language – Language independent – More verbose than JSON – Open/Close tags

Data Format JSON (2001) – Javascript Object Notion – Originally from JS (how to create JS objects/properties) – Now => language independent – Usually less bytes than XML – – XML was probably too much of a hassle to parse in JS (and type-less) Try this!

Data Format Takeaway – Both formats are language independent – Usually have native parsers/serializers for both – Size difference may be ~30% but after zipping may be negligible – So feel free to pick your favorite but generally: Web/JS/REST/type-less = JSON SOAP/non-web/Microsoft stack/strong type = XML Will show you later…

Service Protocol REST – Representational State Transfer – Invented along with HTTP – Goals: performance, scalability, simplicity – Uses HTTP request methods GET/POST/PUT/DELETE => simple! – Constraints: Client-server = separate responsibility, server not concerned with UI (scalable), client not concerned with state. Stateless = client doesn’t store data (portable) Others (see Wikipedia)

Service Protocol SOAP – Simple Object Access Protocol – Designed by Microsoft (1998) – Goals: Exchanging structured information, successor of XML-RPC – RPC = remote procedural call (you’ll see that it looks more like calling a function) – Not client-server (you can call a function in my machine and I can call a function in yours) – distributed – Not stateless (client stores the data to use it!) – Originally not over HTTP but now HTTP is so much more popular, it’s commonly used over HTTP.

Recap Active Server Method File (ASMX) – Microsoft’s implementation of web services – It’s actually a very neat/clean implementation! – Recap Add [WebMethod] to specify that it’s a web service method Add parameters into function Return value can be objects!!

Recap Make a web service with the following & upload to your Azure account Remember!!! Before closing Try this!

REST Call your web service on Azure via REST! /WebService.asmx/OddNumbers?n=23 – Just like HTTP/web! Pass parameter and this does a http get. – Performance = fast! – Simplicity = just pass param “n=23” – Scalable/Portable = do this on any machine! Try this!

SOAP Call your web service on Azure via SOAP! – This is magic. – Create new project (Windows, Console proj, C#) – Right click service (add service reference) /WebService.asmx – Now you can call all those functions! RPC! Wait… there’s an error… Search on Google!! Try this!

SOAP Magic! How did the client code get generated? WSDL = asmx?WSDL asmx?WSDL Remember: – Goals: Exchanging structured information, successor of XML-RPC – RPC = remote procedural call (you’ll see that it looks more like calling a function)

REST vs SOAP Long religious fight online My opinion: – Web/JS/REST/type-less = JSON More scalable, if you’re writing an API for anyone in the world to use (probably better to do REST/JSON) – SOAP/non-web/Microsoft stack/strong type = XML More convenient, if you’re writing an API for only Microsoft to use that interacts with a lot of client software => SOAP/XML = great! Others = JSON-RPC/etc => too much work, not natural. Fortunately, ASMX does both! Automatically!!

Application Layer Examples = HTTP, SMTP, FTP, SSH Status codes: rfc2616/rfc2616-sec10.html

HTTP GET vs. POST Also easier to test

Network Transport Protocol TCP – Transmission Control Protocol – Reliable transmission = resend lost packets – Either receiver asks for retransmission or sender auto re- sends if not received ack packet – Sliding window protocol = cause throughput to drop – FTP/SMTP/SSH/HTTP = all TCP!

Network Transport Protocol UDP – User Datagram Protocol – Unreliable transmission = dropped packets are ignored – Time-sensitive applications – Voice (VoIP), Video (Netflix streaming) => all UDP. – MMO Games (player position) = UDP – But In-app purchase/transactions = TCP! – Use UDP when lost packets = no longer needed.

Apple Game Center Real world example! entation/NetworkingInternet/Conceptual/Game Kit_Guide/Matchmaking/Matchmaking.html Section: Exchanging Data Between Match Participants

Group Discussion! Groups of 3 Think of an example for TCP Think of an example for UDP (excluding the ones I gave)

Recap: Communication Data Format Service Protocol Application Layer Protocol Network Transport Protocol JSON, XML How data is formatted REST/SOAP/WSDL How data is communicated HTTP, SMTP, FTP, SSH How applications communicate TCP, UDP How packets are communicated

Recap: Key topics XML vs. JSON REST vs. SOAP ASMX does both! HTTP message TCP vs. UDP

PA2 hints index.html – Text input – AJAX calls your web service – Updates query suggestion/hints getQuerySuggestions.asmx – Return JSON suggestions (only need 10) – Case insensitive

PA2 hints Preprocess your data!!! – Remove pages with non-english char – Remove pages with digits Goal = Great User Experience

Questions?