AtomPub
 Atom
◦ 데이터 포멧의 규칙(피드, 엔트리)
 AtomPub
◦ Atom을 이용한 리소스 편집 프로토콜의 규정
◦ Atom의 CRUD를 위한 프로토콜
 REST
◦ 분산 네트워크 시스템의 아키텍쳐 스타일
◦ 설계 실력차에 따른 기능제공 여부
◦ REST의 이해도가 높아야 함
 AtomPub
◦ 프로토콜 스펙
◦ REST 스타일에 기초
 Resource Model 및 Link 기능을 제공
 설계의 부분이 줄어듬
 Framework 및 Library 제공.
컬렉션의
메타데이터
BLOG
http://example.
com/feed
Read: GET
Update : PUT
Create : POST
Delete : DELETE
 Request
◦ GET /feed HTTP/1.1
◦ Host:blog.example.com
 Response
◦ HTTP/1.1 200 OK
◦ Content-Type:application/atom+xml; type=feed
◦ <feed xmlns=http://www.w3.org/2005/Atom>
◦ <id>……</id>
◦ ……
◦ </feed>
 엔트리 단위에서의 조작
◦ Feed의 Entry는 고유의 URI를 가짐.
◦ 각각의 URI는 HTTP를 통해 CRUD가 가능함
◦ Link URI의 rel=“edit” 가 포함된 요소를 [Edit Link]
 Edit Link =
http://blog.example.com/entry/1234.atom
 Request
◦ GET /entry/1234.com HTTP/1.1
◦ Host:blog.example.com
 Response
◦ HTTP/1.1 200 OK
◦ Content-Type:application/atom+xml; type=entry
◦ <entry xmlns=http://www.w3.org/2005/Atom>
◦ ….
◦ </entry>
Resource의
종류에 따라
바뀐다.
 GET 하여 취득한 정보를 수정하여 PUT 한다.
 Request
◦ PUT /entry/1234.atom HTTP/1.1
◦ Host: blog.example.com
◦ Authorization: Basic dXNIcjpwYXNz
◦ Content-Type: application/atom+xml; type=entry
◦ <entry ….>
◦ …..
◦ <updated>2010-08-24T13:11:54Z</updated>
◦ <content>수정했어요</content>
◦ </entry>
 Response
◦ HTTP/1.1 200 OK
 엔트리를 삭제할 수 있다.
 Request
◦ DELETE /entry/1234.atom HTTP/1.1
◦ Host: blog.example.com
◦ Authorization: Basic dXNIcjpwYXNz
 Request
◦ HTTP/1.1 200 OK
 컬렉션 리소스에 작성한다.
 Request
◦ POST /feed HTTP/1.1
◦ Host: blog.example.com
◦ Authorization: Basic dXNIcjpwYXNz
◦ Content-Type: application/atom+xml; type=entry
◦ <entry ….>
◦ <id>고유한 중복되지 않는 ID</id>
◦ <title>테스트</title>
◦ <author><name>mcJang</name></author>
◦ <updated>2010-08-24T16:11:54Z</updated>
◦ <content>새로운 컨텐츠</content>
◦ </entry>
 작성된 결과를 Return 한다.
 Response
◦ HTTP/1.1 201 Created
◦ Location: http://blog.example.com/entry/1235.atom
◦ Content-Type: application/atom+xml; type=entry
◦ <entry ….>
◦ <id>tag:blog.example.com,2010-08-24:entry:1235</id>
◦ <title>테스트</title>
◦ <author><name>mcJang</name></author>
◦ <updated>2010-08-24T13:11:55Z</updated>
◦ <link href=http://blog.example.com/entry/1235
rel=“alternate”/>
◦ <link href=http://blog.example.com/entry/1235 .atom
rel=“edit”/>
◦ <content>새로운 컨텐츠</content>
◦ </entry>
 Request
◦ POST /media HTTP/1.1
◦ Host: blog.example.com
◦ Content-Type: image/jpeg
◦ Authorization: Basic dXNIcjpwYXNz
◦ Slug: Good_To_See_U
 Response
◦ HTTP/1.1 201 Created
◦ Content-Type: application/atom+xml;
◦ Location: http://blog.example.com/media/Good_To_See_U
◦ <entry….>
◦ <id>tag:blog.example.com,2010-10-04:blog:media:Good_To_See_U</id>
◦ <title>Good_To_See_U</title>
◦ <author><name>test</name></author>
◦ <content type=“image/jpeg” src=http://.../media/Good_To_See_U.jpg/>
◦ <link rel=“edit-media” href=http://.../media/Good_To_See_U.jpg/> //media edit
◦ <link rel=“edit” href=http://.../media/Good_To_See_U.atom/> // entry edit
◦ </entry>
 Request
◦ PUT /media/Good_To_See_U.jpg HTTP/1.1
◦ Host: blog.example.com
◦ Content-Type: image/jpeg
◦ Authorization: Basic dXNIcjpwYXNz
 Response
◦ HTTP/1.1 200 OK
 Delete 및 GET 동일함.
 여러 컬렉션 리소스의 메타 정보를 저장 및 기술한 문서
◦ 컬렉션 리소스
 유저 정보, 미디어 정보
 Feed
 Entry 등
 Request
◦ GET /atomsvc HTTP/1.1
◦ Host: blog.example.com
 Response
◦ HTTP/1.1 200 OK
◦ Content-Type: application/atomsvc+xml
◦ <service ….>
 <workspace>
 <atom:title>마이 블로그</atom:title>
 <collection href=“http://blog.example.com/feed”>
 <categories fixed=“no”>
 <atom:category term=“일상”/>
 <atom:category term=“기술”/>
 </categories>
 <accept>application/atom+xml; type=entry</accept>
 </collection>
 <collection href=“http://blog.example.com/media”>
 <atom:title>이미지</atom:title>
 <accept>image/png</accept>
 <accept>image/jpeg</accept>
 <accept>image/gif</accept>
 </collection>
 </workspace>
◦ </service>
서비스 문서
332 Page
응답 참고
반드시 하나이상
존재 함
Workspace는 0개 이상의
Collection을 가짐
334 Page
<Collection>요소 참고
Media 컬렉션에서
받을 수 있는
Media Type들.
생략 시 기본
accept
Feed 컬렉션에서
사용 가능한 Category.
Fixed가 yes 일 때,
그 외의 카테고리는 사용
불가능하다.
카테고리 문서는 따로
관리가 가능하다.
 Request
◦ GET /atomcat HTTP/1.1
◦ Host: blog.example.com
 Response
◦ HTTP/1.1 200 OK
◦ Content-Type: application/atomcat+xml
◦ <category fixed=“no”….>
 <atom:category term=“일상”/>
 <atom:category term=“기술”/>
◦ </category>
 카테고리의 추가에 관해서는 스펙이 없음.
 일반적으로 블로그의 Tag와 유사함.
 Fixed가 no 이고 카테고리의 추가가 필요하다면
서버에서 해당 부분을 구현해야 함.
 반대로 fixed 가 yes 일 때에는 AtomPub와 다른
인터페이스로 카테고리 정보를 편집할 수 있게 해
야 함.
 AtomPub : Atom 리소스를 CRUD 하는 Web API를 위한
프로토콜
 Google은 AtomPub을 베이스로한 Gdata를 사용해 블로그,
캘린터, 스프레드시트, 앨범등을 편집할 수 있는 Web API
제공
 Good
◦ 블로그 서비스의 API
◦ 검색 기능을 가진 데이터베이스의 API
◦ 멀티미디어 파일의 Repository의 API
◦ 태그(Tag)를 사용한 소셜 서비스의 API
 Bad
◦ Comet을 이용하는 실시간성이 중요한 API
◦ 영상의 스트림 전송 등 HTTP 이외의 프로토콜을 필요로 하는 API
◦ 데이터의 계층 구조가 중요한 API
◦ Atom 포멧이 제공하는 메타 데이터가 불필요한 API

More Related Content

PPT
Atom publishing protocol 2003
PPTX
스프링 3.0 RESTful & restTemplate
PDF
게이트단의 보안
PPTX
Json view 예제 설명
PDF
자바 웹 개발 시작하기 (3주차 : 스프링 웹 개발)
PDF
Jstl_GETCHA_HANJUNG
PDF
Mongodb2.2와 2.4의 신 기능 소개
PDF
REST with Spring
Atom publishing protocol 2003
스프링 3.0 RESTful & restTemplate
게이트단의 보안
Json view 예제 설명
자바 웹 개발 시작하기 (3주차 : 스프링 웹 개발)
Jstl_GETCHA_HANJUNG
Mongodb2.2와 2.4의 신 기능 소개
REST with Spring

What's hot (7)

PDF
스프링 3.0 & RESTful
PDF
[오픈소스컨설팅]Day #1 MySQL 엔진소개, 튜닝, 백업 및 복구, 업그레이드방법
PDF
Spring-Boot (springcamp2014)
PPTX
HTTP 완벽가이드 10장 http2.0, 11장_클라이언트식별과쿠키
PPTX
Resource Governor in sql server 2008
PDF
[오픈소스컨설팅]Spring MVC
PDF
스프링캠프 2016 발표 - Deep dive into spring boot autoconfiguration
스프링 3.0 & RESTful
[오픈소스컨설팅]Day #1 MySQL 엔진소개, 튜닝, 백업 및 복구, 업그레이드방법
Spring-Boot (springcamp2014)
HTTP 완벽가이드 10장 http2.0, 11장_클라이언트식별과쿠키
Resource Governor in sql server 2008
[오픈소스컨설팅]Spring MVC
스프링캠프 2016 발표 - Deep dive into spring boot autoconfiguration
Ad

Viewers also liked (6)

PDF
AtoM 튜토리얼
PPTX
ISO Identifier and UCI
PDF
Http 완벽 가이드(2장 url과 리소스)
PDF
Atom package part1
PDF
자바병렬프로그래밍 9.gui 애플리케이션
AtoM 튜토리얼
ISO Identifier and UCI
Http 완벽 가이드(2장 url과 리소스)
Atom package part1
자바병렬프로그래밍 9.gui 애플리케이션
Ad

Similar to Atom publishing protocol (20)

PPTX
REST Ovewview
PPTX
대용량 분산 아키텍쳐 설계 #5. rest
PPT
Servlet3
PPTX
Spring boot actuator
PPTX
REST API 설계
PPTX
200.마이크로서비스에 적합한 오픈소스 WAS는 무엇?
PDF
DGMIT 제3회 R&D 컨퍼런스 r&d1 team : HTTP 프로토콜 개요
PDF
HTTP 완벽가이드- 19장 배포시스템
PDF
[오픈소스컨설팅]Tomcat6&7 How To
PDF
[오픈소스컨설팅] 아파치톰캣 운영가이드 v1.3
PDF
PDF
톰캣 운영 노하우
PDF
[HTTP 101] 웹 개발자라면 반드시 알아야하는 HTTP의 기초
PDF
Http 헤더
PDF
서버성능개선 류우림
PPTX
Html5
PDF
제 4회 DGMIT R&D 컨퍼런스 : REST API - 리소스 지향적 아키텍처
PDF
백기선의 스프링 부트
PPTX
웹 크롤링 (Web scraping) 의 이해
PDF
2023.05.22 발표 자료 : 스프링 부트 기초
REST Ovewview
대용량 분산 아키텍쳐 설계 #5. rest
Servlet3
Spring boot actuator
REST API 설계
200.마이크로서비스에 적합한 오픈소스 WAS는 무엇?
DGMIT 제3회 R&D 컨퍼런스 r&d1 team : HTTP 프로토콜 개요
HTTP 완벽가이드- 19장 배포시스템
[오픈소스컨설팅]Tomcat6&7 How To
[오픈소스컨설팅] 아파치톰캣 운영가이드 v1.3
톰캣 운영 노하우
[HTTP 101] 웹 개발자라면 반드시 알아야하는 HTTP의 기초
Http 헤더
서버성능개선 류우림
Html5
제 4회 DGMIT R&D 컨퍼런스 : REST API - 리소스 지향적 아키텍처
백기선의 스프링 부트
웹 크롤링 (Web scraping) 의 이해
2023.05.22 발표 자료 : 스프링 부트 기초

Atom publishing protocol

  • 2.  Atom ◦ 데이터 포멧의 규칙(피드, 엔트리)  AtomPub ◦ Atom을 이용한 리소스 편집 프로토콜의 규정 ◦ Atom의 CRUD를 위한 프로토콜
  • 3.  REST ◦ 분산 네트워크 시스템의 아키텍쳐 스타일 ◦ 설계 실력차에 따른 기능제공 여부 ◦ REST의 이해도가 높아야 함  AtomPub ◦ 프로토콜 스펙 ◦ REST 스타일에 기초  Resource Model 및 Link 기능을 제공  설계의 부분이 줄어듬  Framework 및 Library 제공.
  • 5. BLOG http://example. com/feed Read: GET Update : PUT Create : POST Delete : DELETE
  • 6.  Request ◦ GET /feed HTTP/1.1 ◦ Host:blog.example.com  Response ◦ HTTP/1.1 200 OK ◦ Content-Type:application/atom+xml; type=feed ◦ <feed xmlns=http://www.w3.org/2005/Atom> ◦ <id>……</id> ◦ …… ◦ </feed>
  • 7.  엔트리 단위에서의 조작 ◦ Feed의 Entry는 고유의 URI를 가짐. ◦ 각각의 URI는 HTTP를 통해 CRUD가 가능함 ◦ Link URI의 rel=“edit” 가 포함된 요소를 [Edit Link]
  • 8.  Edit Link = http://blog.example.com/entry/1234.atom  Request ◦ GET /entry/1234.com HTTP/1.1 ◦ Host:blog.example.com  Response ◦ HTTP/1.1 200 OK ◦ Content-Type:application/atom+xml; type=entry ◦ <entry xmlns=http://www.w3.org/2005/Atom> ◦ …. ◦ </entry> Resource의 종류에 따라 바뀐다.
  • 9.  GET 하여 취득한 정보를 수정하여 PUT 한다.  Request ◦ PUT /entry/1234.atom HTTP/1.1 ◦ Host: blog.example.com ◦ Authorization: Basic dXNIcjpwYXNz ◦ Content-Type: application/atom+xml; type=entry ◦ <entry ….> ◦ ….. ◦ <updated>2010-08-24T13:11:54Z</updated> ◦ <content>수정했어요</content> ◦ </entry>  Response ◦ HTTP/1.1 200 OK
  • 10.  엔트리를 삭제할 수 있다.  Request ◦ DELETE /entry/1234.atom HTTP/1.1 ◦ Host: blog.example.com ◦ Authorization: Basic dXNIcjpwYXNz  Request ◦ HTTP/1.1 200 OK
  • 11.  컬렉션 리소스에 작성한다.  Request ◦ POST /feed HTTP/1.1 ◦ Host: blog.example.com ◦ Authorization: Basic dXNIcjpwYXNz ◦ Content-Type: application/atom+xml; type=entry ◦ <entry ….> ◦ <id>고유한 중복되지 않는 ID</id> ◦ <title>테스트</title> ◦ <author><name>mcJang</name></author> ◦ <updated>2010-08-24T16:11:54Z</updated> ◦ <content>새로운 컨텐츠</content> ◦ </entry>
  • 12.  작성된 결과를 Return 한다.  Response ◦ HTTP/1.1 201 Created ◦ Location: http://blog.example.com/entry/1235.atom ◦ Content-Type: application/atom+xml; type=entry ◦ <entry ….> ◦ <id>tag:blog.example.com,2010-08-24:entry:1235</id> ◦ <title>테스트</title> ◦ <author><name>mcJang</name></author> ◦ <updated>2010-08-24T13:11:55Z</updated> ◦ <link href=http://blog.example.com/entry/1235 rel=“alternate”/> ◦ <link href=http://blog.example.com/entry/1235 .atom rel=“edit”/> ◦ <content>새로운 컨텐츠</content> ◦ </entry>
  • 13.  Request ◦ POST /media HTTP/1.1 ◦ Host: blog.example.com ◦ Content-Type: image/jpeg ◦ Authorization: Basic dXNIcjpwYXNz ◦ Slug: Good_To_See_U  Response ◦ HTTP/1.1 201 Created ◦ Content-Type: application/atom+xml; ◦ Location: http://blog.example.com/media/Good_To_See_U ◦ <entry….> ◦ <id>tag:blog.example.com,2010-10-04:blog:media:Good_To_See_U</id> ◦ <title>Good_To_See_U</title> ◦ <author><name>test</name></author> ◦ <content type=“image/jpeg” src=http://.../media/Good_To_See_U.jpg/> ◦ <link rel=“edit-media” href=http://.../media/Good_To_See_U.jpg/> //media edit ◦ <link rel=“edit” href=http://.../media/Good_To_See_U.atom/> // entry edit ◦ </entry>
  • 14.  Request ◦ PUT /media/Good_To_See_U.jpg HTTP/1.1 ◦ Host: blog.example.com ◦ Content-Type: image/jpeg ◦ Authorization: Basic dXNIcjpwYXNz  Response ◦ HTTP/1.1 200 OK  Delete 및 GET 동일함.
  • 15.  여러 컬렉션 리소스의 메타 정보를 저장 및 기술한 문서 ◦ 컬렉션 리소스  유저 정보, 미디어 정보  Feed  Entry 등
  • 16.  Request ◦ GET /atomsvc HTTP/1.1 ◦ Host: blog.example.com  Response ◦ HTTP/1.1 200 OK ◦ Content-Type: application/atomsvc+xml ◦ <service ….>  <workspace>  <atom:title>마이 블로그</atom:title>  <collection href=“http://blog.example.com/feed”>  <categories fixed=“no”>  <atom:category term=“일상”/>  <atom:category term=“기술”/>  </categories>  <accept>application/atom+xml; type=entry</accept>  </collection>  <collection href=“http://blog.example.com/media”>  <atom:title>이미지</atom:title>  <accept>image/png</accept>  <accept>image/jpeg</accept>  <accept>image/gif</accept>  </collection>  </workspace> ◦ </service> 서비스 문서 332 Page 응답 참고 반드시 하나이상 존재 함 Workspace는 0개 이상의 Collection을 가짐 334 Page <Collection>요소 참고 Media 컬렉션에서 받을 수 있는 Media Type들. 생략 시 기본 accept Feed 컬렉션에서 사용 가능한 Category. Fixed가 yes 일 때, 그 외의 카테고리는 사용 불가능하다.
  • 18.  Request ◦ GET /atomcat HTTP/1.1 ◦ Host: blog.example.com  Response ◦ HTTP/1.1 200 OK ◦ Content-Type: application/atomcat+xml ◦ <category fixed=“no”….>  <atom:category term=“일상”/>  <atom:category term=“기술”/> ◦ </category>
  • 19.  카테고리의 추가에 관해서는 스펙이 없음.  일반적으로 블로그의 Tag와 유사함.  Fixed가 no 이고 카테고리의 추가가 필요하다면 서버에서 해당 부분을 구현해야 함.  반대로 fixed 가 yes 일 때에는 AtomPub와 다른 인터페이스로 카테고리 정보를 편집할 수 있게 해 야 함.
  • 20.  AtomPub : Atom 리소스를 CRUD 하는 Web API를 위한 프로토콜  Google은 AtomPub을 베이스로한 Gdata를 사용해 블로그, 캘린터, 스프레드시트, 앨범등을 편집할 수 있는 Web API 제공  Good ◦ 블로그 서비스의 API ◦ 검색 기능을 가진 데이터베이스의 API ◦ 멀티미디어 파일의 Repository의 API ◦ 태그(Tag)를 사용한 소셜 서비스의 API  Bad ◦ Comet을 이용하는 실시간성이 중요한 API ◦ 영상의 스트림 전송 등 HTTP 이외의 프로토콜을 필요로 하는 API ◦ 데이터의 계층 구조가 중요한 API ◦ Atom 포멧이 제공하는 메타 데이터가 불필요한 API