RESTful 웹서비스 개요

Similar documents
슬라이드 1

Social Network

ibmdw_rest_v1.0.ppt


Domino Designer Portal Development tools Rational Application Developer WebSphere Portlet Factory Workplace Designer Workplace Forms Designer

±èÇö¿í Ãâ·Â

Week13

Voice Portal using Oracle 9i AS Wireless

Intro to Servlet, EJB, JSP, WS

<A4B5A4C4A4B5A4BFA4B7A4B7A4D1A4A9A4B7A4C5A4A4A4D1A4A4A4BEA4D3A4B1A4B7A4C7A4BDA4D1A4A4A4A7A4C4A4B7A4D3A4BCA4C E706466>

00-CourseSyllabus

Portal_9iAS.ppt [읽기 전용]

APOGEE Insight_KR_Base_3P11

0125_ 워크샵 발표자료_완성.key

Analyst Briefing

Something that can be seen, touched or otherwise sensed

thesis

학습영역의 Taxonomy에 기초한 CD-ROM Title의 효과분석

Microsoft PowerPoint - web-part03-ch19-node.js기본.pptx

untitled

1217 WebTrafMon II

HTML5* Web Development to the next level HTML5 ~= HTML + CSS + JS API

No Slide Title

15_3oracle

본문01

HTML5가 웹 환경에 미치는 영향 고 있어 웹 플랫폼 환경과는 차이가 있다. HTML5는 기존 HTML 기반 웹 브라우저와의 호환성을 유지하면서도, 구조적인 마크업(mark-up) 및 편리한 웹 폼(web form) 기능을 제공하고, 리치웹 애플리케이 션(RIA)을

강의지침서 작성 양식

thesis

SchoolNet튜토리얼.PDF

Output file

I T C o t e n s P r o v i d e r h t t p : / / w w w. h a n b i t b o o k. c o. k r

Xerces-C++

Service-Oriented Architecture Copyright Tmax Soft 2005

장양수

DIY 챗봇 - LangCon

Microsoft PowerPoint - XP Style

Page 2 of 6 Here are the rules for conjugating Whether (or not) and If when using a Descriptive Verb. The only difference here from Action Verbs is wh

<C0CCBCBCBFB52DC1A4B4EBBFF82DBCAEBBE7B3EDB9AE2D D382E687770>

À±½Â¿í Ãâ·Â

#Ȳ¿ë¼®

11이정민

DW 개요.PDF

6자료집최종(6.8))

Intra_DW_Ch4.PDF

Backup Exec

11¹Ú´ö±Ô

example code are examined in this stage The low pressure pressurizer reactor trip module of the Plant Protection System was programmed as subject for

untitled

Ⅰ. 서론 1989년 CERN의 팀 버너스 리에 의해 만들어진 월드 와이드 웹 기술은 HTML(HyperText Markup Language), URL(Unified Resource Locator, HTTP(Hyper- Text Transfer Protocol)이라는

Chap7.PDF

Eclipse 와 Firefox 를이용한 Javascript 개발 발표자 : 문경대 11 년 10 월 26 일수요일

04-다시_고속철도61~80p

<332EC0E5B3B2B0E62E687770>

°í¼®ÁÖ Ãâ·Â

<32382DC3BBB0A2C0E5BED6C0DA2E687770>

Mstage.PDF

Interstage5 SOAP서비스 설정 가이드

Output file

03.Agile.key

Page 2 of 5 아니다 means to not be, and is therefore the opposite of 이다. While English simply turns words like to be or to exist negative by adding not,

001지식백서_4도

<4D F736F F F696E74202D E20C0CEC5CDB3DD20C0C0BFEB20B9D720BCADBAF1BDBA20B1E2BCFA E >

PowerPoint 프레젠테이션

김기남_ATDC2016_160620_[키노트].key

SMB_ICMP_UDP(huichang).PDF

ecorp-프로젝트제안서작성실무(양식3)

○ 제2조 정의에서 기간통신역무의 정의와 EU의 전자커뮤니케이션서비스 정의의 차이점은


슬라이드 제목 없음

<B9AEC8ADBBEABEF7BFACB1B8BDC720BCBCB9CCB3AA2DBCD2BCC8B3D7C6AEBFF6C5A9BCADBAF1BDBA20C1F8C8AD20BCBCB9CCB3AA2E687770>

step 1-1

PowerPoint 프레젠테이션

ORANGE FOR ORACLE V4.0 INSTALLATION GUIDE (Online Upgrade) ORANGE CONFIGURATION ADMIN O

SNS 명예훼손의 형사책임

06_ÀÌÀçÈÆ¿Ü0926


소프트웨어개발방법론

Microsoft Word - KSR2014S042

<31325FB1E8B0E6BCBA2E687770>

<B3EDB9AEC1FD5F3235C1FD2E687770>

Polly_with_Serverless_HOL_hyouk

DocsPin_Korean.pages

, N-. N- DLNA(Digital Living Network Alliance).,. DLNA DLNA. DLNA,, UPnP, IPv4, HTTP DLNA. DLNA, DLNA [1]. DLNA DLNA DLNA., [2]. DLNA UPnP. DLNA DLNA.

FMX M JPG 15MB 320x240 30fps, 160Kbps 11MB View operation,, seek seek Random Access Average Read Sequential Read 12 FMX () 2


No Slide Title

정보기술응용학회 발표

UPMLOPEKAUWE.hwp

Gartner Day

DBPIA-NURIMEDIA

Microsoft Word - 조병호

J2EE & Web Services iSeminar

6주차.key

Special Theme _ 모바일웹과 스마트폰 본 고에서는 모바일웹에서의 단말 API인 W3C DAP (Device API and Policy) 의 표준 개발 현황에 대해서 살펴보고 관 련하여 개발 중인 사례를 통하여 이해를 돕고자 한다. 2. 웹 애플리케이션과 네이

DE1-SoC Board

2017 1

Journal of Educational Innovation Research 2017, Vol. 27, No. 2, pp DOI: : Researc

CMS-내지(서진이)

Vol.257 C O N T E N T S M O N T H L Y P U B L I C F I N A N C E F O R U M

이제는 쓸모없는 질문들 1. 스마트폰 열기가 과연 계속될까? 2. 언제 스마트폰이 일반 휴대폰을 앞지를까? (2010년 10%, 2012년 33% 예상) 3. 삼성의 스마트폰 OS 바다는 과연 성공할 수 있을까? 지금부터 기업들이 관심 가져야 할 질문들 1. 스마트폰은

Transcription:

Database Systems Lab. Web2.0 & RESTful Web Services 이규철 충남대학교컴퓨터공학과

Table of Contents I. Web 2.0 II. III. IV. REST Major REST principles RESTful Web Services RESTful Example Related Technologies HTTP JSON AJAX WADL SOAP-based vs. RESTful web services 2

I. Web 2.0 : Overview Web 2.0! Web 태동기 Web 발전기현재의 web 정적인 HTML 페이지의집합 컨텐츠관리시스템에의한동적인웹 포털중심의서비스 분산된 social network 상호작용을통하여성장 Web as Platform Hypertext 에의한단순정보교류 중앙집중적검색및미디어 참여와개방을통한분산, 자율네트워크 3

Web 2.0 이란말의기원 새로운컨퍼런스를위한브레인스토밍세션에서제안된마케팅용어로시작 팀오라일리메모로정리 http://www.oreillynet.com/pub/a/oreilly/tim/news/2005/09/30/what-is-web- 20.html?page=1 2004 년, 2005 년두번의컨퍼런스 버전업이아닌질적변화에대한표현 4

Web 1.0 vs Web 2.0 Berners-Lee, Tim 인터넷사용환경이상호작용과기초적인 HyperLink 구조기반의정적인 HTML 사회적네트워크에중점 컨텐츠제공자가정보를독점 사용자들의참여로콘텐츠와서비스가창조 구독자는정보를소비 분산구조형식으로 다대다 형태 일대다 의형태로상호작용이낮음 5

Web 1.0 vs Web 2.0 Web 1.0 Web 2.0 기본특징미디어로서의웹플랫폼으로의웹 상호작용이낮은정적인웹 기술중심 상호작용성이높은동적인웹 사람중심 컨텐츠구조문서, 페이지꼬리표달린개체 (Tagged Object) 기술 HTML, Active-X 등 Ajax, FLEX, Laszlo, XML, RSS, Atom, Tagging, LAMP 등 정보탐색방법검색및브라우징출판과참여 보안 /OS 종속성 Active X 사용으로인한 OS/ 브라우즈종속성 OS/ 브라우즈와무관 대표브라우즈 IE( 단순뷰어 ) Fire Fox( 유저에의해수정보완 ) 사례 하이퍼링크중심기본사이트 야후의 flickr, 아마존, 네이버지식인, Facebook, Twitter 등 6

Web 2.0 의특징 by Tim O Reilly The Web As Platform: OpenAPI Harnessing Collective Intelligence Data is the Next Intel Inside End of the Software Release Cycle Lightweight Programming Models Software Above the Level of a Single Device Rich User Experiences 7

Web 2.0 Example 8

Web 2.0 Example (cont d) File Sharing: Flickr (Images) YouTube (Videos) Wikipedia (Online Encyclopedia) Blogs Open Source Community (Linux) File Management Tagging Social Websites and Communication: Facebook LastFM Skype StudiVZ LinkedIn, Xing Open Systems: APIs, partly open source allow extensions by users 9

Web 2.0 services Large quantities of data are on the Web The data needs to be managed in an appropriate manner Retrieved, queried, analyzed, transformed, transferred, stored, etc. Technical solutions are needed to enable a true Programmable Web Easy integration of data and services on the Web Desktop apps should work with Web apps Flickr upload, calendar update/sync Web apps should work with the other Web apps LinkedIn can import your Facebook friends Facebook can import your twitter followers Mashups should be enabled Easy service composition The solution can be seen in the form of Web 2.0 services 10

Mashup: Housingmaps.com 11

Mashup: Housingmaps.com (cont d) Housingmaps.com is a mashup created of Craigslist A centralized network of online communities, featuring free online classified advertisements with sections devoted to jobs, housing, personals, for sale, services, community, gigs, résumés, and discussion forums Google Maps The properties described in Craigslist are placed on a map The true power of the applied Web 2.0 approach comes from the fact that it is in no way affiliated with craigslist or Google It consumes Web 2.0 services provided by Craigslist and Google 12

Web APIs & Services Data providers Google maps, Geonames, phone location Microformats (vcard, calendar, review ) Data feeds Functionality Publishing, messaging, payment OpenAPI Protocols / Formats Protocols: REST, SOAP, JavaScript Return Formats: JSON, XML, RDF Web as a Computational Platform 13

II. Related Technologies Todays s set of technologies, protocols and languages used to apply RESTful paradigm: HTTP as the basis XML and JSON for data exchange AJAX for client-side programming (e.g. browser) There exists an attempt to develop WSDL-like definition language for describing RESTful services Web Application Description Language (WADL) 14

HTTP Overview Hypertext Transfer Protocol (HTTP) A protocol for distributed, collaborative, hypermedia information systems A request/response standard typical of client-server computing Currently dominant version is HTTP/1.1 Massively used to deliver content over the Web Web browsers and spiders are relying on HTTP The protocol is not constrained to TPC/IP It only presumes a reliable transport Resources accessed by HTTP are identified by URIs (more specifically URLs), using the http URI schemes 15

HTTP Request-response format Request consists of Request line, such as GET /images/logo.gif HTTP/1.1, which requests a resource called /images/logo.gif from server Headers, such as Accept-Language: en An empty line An optional message body Response consists of Status line which includes numeric status code and textual reason phrase Response headers An empty line The requested content 16

HTTP Request methods HTTP request methods indicate the desired action to be performed on the identified resource: GET Requests a representation of the specified resource. GET should not be used for operations that cause side-effects (problematic with robots and crawlers). Those operations are called safe operations POST Submits data to be processed (e.g., from an HTML form) to the identified resource. The data is included in the body of the request PUT Uploads a representation of the specified resource DELETE Deletes the specified resource. and the other such as TRACE, HEAD, OPTIONS, CONNECT 17

JSON JavaScript Object Notation (JSON) A lightweight computer data interchange format. Specified in Request For Comment (RFC) 4627. Represents a simple alternative to XML A text-based, human-readable format for representing simple data structures and associative arrays (called objects). Used by a growing number of services JavaScript-friendly notation Its main application is in Ajax web application programming. A serialized object or array No namespaces, attributes etc. No schema language (for description, verification) 18

JSON Data types JSON basic data types are Number (integer, real, or floating point) String (double-quoted Unicode with backslash escaping) Boolean (true and false) Array (an ordered sequence of values, comma-separated and enclosed in square brackets) Object (collection of key:value pairs, comma-separated and enclosed in curly braces) null 19

JSON - Example { "firstname": "John", "lastname": "Smith", "age": 25, "address": { "streetaddress": "21 2nd Street", "city": "New York", "state": "NY", "postalcode": "10021" }, "phonenumbers": [ { "type": "home", "number": "212 555-1234" }, { "type": "fax", "number": "646 555-4567" } ], "newsubscription": false, "companyname": null } 20

AJAX - Overview Asynchronous JavaScript and XML (AJAX) A group of interrelated web development techniques used on the client-side to create interactive web applications Web apps can fetch data from the server without refreshing the page AJAX is used to increase interactivity and dynamism of web pages Since the technological base is partially shared AJAX and RESTful services make a good match Enriching Web pages with the data operated through RESTful services 21

AJAX Constituent technologies (X)HTML and CSS Information styling and marking. Document Object Model (DOM) A cross-platform and language-independent convention for representing and interacting with objects in HTML, XHTML and XML documents. Objects are accessed through JavaScript XMLHttpRequest object Present in all major browsers Method to exchange data between the server and browser in async manner XML or JavaScript Object Notation - JSON Interchange, manipulation and display of data. JavaScript Language which brings all these technologies together 22

WADL Overview Web Application Description Language No real uptake W3C Member Submission Application ( = our Web service) Has resources Resources have HTTP methods Inputs and outputs can contain links to resources WADL focuses on resources and hypertext As opposed to operations (WSDL) 23

WADL Example 24

III. REST REST: REpresentational State Transfer An architectural style to design loosely coupled web applications/services Requests and response are built around the transfer of representations of resources Ph.D dissertation of Roy Thomas Fielding (2000) Architectural Styles and the Design of Network-based Software Architectures Basic principles of REST Use HTTP methods explicitly Be Stateless Expose directory structure-like URIs Transfer XML, JSON or both 25

REST (cont d) Requests : verbs (get this document or delete that record) Verbs describe actions that are applicable to nouns Four verbs for every noun: GET, POST, PUT, DELETE Resources : nouns URIs are the equivalent of a noun The REST language has trillions of nouns for all the concepts Most of the things on web are resources (documents, images,...) REST relies on named resources rather than messages to facilitate loose coupling 26

REST USE HTTP methods explicitly Application Task Create Read Update Delete HTTP Method POST: To send a new data GET: To retrieve a resource from specified URI PUT: To store a resource at specified URI DELETE: To delete a resource Most of the applications use CRUD tasks to manipulate the resources Idempotent methods GET, HEAD, PUT, DELETE, OPTIONS 27

REST Be Stateless Needs to be highly scalable to meet up high performance demands For better response times, server topology may contain cluster of servers with intermediaries for load-balancing failover proxies and gateway Clients need to send complete and independent requests Servers don t need to keep the context or state 28

REST Be Stateless (cont d) Stateful Design Stateless Design 29

REST Expose directory structure-like URIs Universal Resource Identifier (URI) is hierarchal Structure of URI should be straightforward, predictable and easily understandable Representing resources in directory like structure and exposing them as URIs is very intuitive Rooted at single path, branches to represent sub-paths e.g. http://www.myservice.org/discussion/{year}/{month}/{day}/{topic} Humans and machines can easily generate structured URIs based on rules/patterns 30

REST Resource as URIs (cont d) Response can contain links to resources instead of embedding them URIs should be static (as much as possible) which allows for bookmarking Some additional guidelines: Hide the Server-side scripting technology file extensions, if any, so you can port to something else without changing the URIs Keep everything lowercase Substitute spaces with hyphens or underscores Avoid query strings as much as possible 31

REST Transfer XML, JSON or both MIME-Type JSON XML XHTML Content-Type application/json application/xml application/xhtml Services can offer content in different data formats using MIMEtypes Clients can use MIME types and HTTP Accept header to get the content in their desired format (content negotiation) 32

IV. SOAP-based vs. RESTful: 서비스구조 SOAP-based web services RESTful web services 33

SOAP-based vs. RESTful: 서비스기술 34

WS-* vs. REST: A quick comparison WS-* listentries() addentry() getentry() deleteentry() updateentry() collection service RESTful listentries() addentry() getentry() deleteentry() updateentry() collection entry entry entry 35

WS-* vs. REST: A quick comparison (cont d) A collection can be for example a news publication blog, list of employees, etc. A SOAP service (WS-*) has a single endpoint that handles all the operations It has to have an application-specific interface A RESTful service has a number of resources (the collection, each entry) The operations can be distributed onto the resources and mapped to a small uniform set of operations WS-* stands for a variety of specifications related to SOAP-based Web Services. 36

SOAP-based vs. RESTful: 서비스사례 SOAP-based web services RESTful web services 37