Top Banner
Smart TV http://www.softwareinlife.com GAE 를 를를를 XMPP 를를 대대대대 대대대 @jangsunjin - Mobile Phone: (+82) 010-4585-1770 - E-Mail: [email protected]
20

N04 xmpp and_android

Aug 20, 2015

Download

Documents

Sun-Jin Jang
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: N04 xmpp and_android

Smart TV

http://www.softwareinlife.com

GAE 를 활용한 XMPP 개발

대표이사 장선진@jangsunjin

- Mobile Phone: (+82) 010-4585-1770- E-Mail: [email protected]

Page 2: N04 xmpp and_android

Real-Time Web

SNS 의 정의A social network service is an online service, platform, or site that focuses on building and re-flecting of social networks or social relations among people, e.g., who share interests and/or ac-tivities.

A social network service essen-tially consists of a representa-tion of each user (often a pro-file), his/her social links, and a variety of additional services.

Page 3: N04 xmpp and_android

SNS 서비스

Page 4: N04 xmpp and_android

SNS 사용자 전망

- 페이스북 사용자 현황 : http://www.socialbakers.com/facebook-statistics/

Page 5: N04 xmpp and_android

XMPP(eXtensible Messaging and Presence Protocol)

• XMPP 는 RFC3920, RFC3921 등 IETF 에서 제정한 IM(Instant Messenger) 를 위한 국제 표준 프로토콜

– Jabber Inc. 에 의해 1998 년부터 Jabber 라는 이름으로 확장 가능한 XML 베이스의 메세징 프로토콜이 연구되었으며 , 2004 년 1 월 IETF 에 의해 표준안으로서 인정

– GTalk(google), iChat(Apple), Gaim, Pidgin 등이 지원하며 현재 XMPP 는 두 지점간의 통신 규격에 관한 것으로 이 두 지점은 이메일 주소와 같은 방식으로 표현되며 두 지점간의 메시지 (message), 프레즌스 (presence) 를 실시간으로 전달해 주는 규격

Page 6: N04 xmpp and_android

XMPP 의 특징

• login, presence, subscribe, messaging, chat, multichat, file trans-fer 등 메시징 서비스를 위한 기본적인 프로토콜 규약 정의

• NAT, STUN, firewall, SSL 등 두 지점간의 연결을 위한 기술 및 보안 등에 대한 정의 및 구현

• 지점간의 Audio, Video 통신 , multimedia streaming service 및 Phone 과의 VoIP 를 위한 확장 정의

• 서버간의 호환 , 분산서버 , 타 메신저와의 호환

Page 7: N04 xmpp and_android

XMPP 구조

• JID(Jabber ID): [ node "@" ] domain [ "/" resource ]– [email protected]/googleappengine

– 사용자는 여러 XMPP 서버에 로그인할 수 있으며 Resource 를 통하여 구분할 수 있다 .

XMPPServer

XMPPServer

Client

Client

Client

Client

Client

Client

XMPPXMPP XMPP

Direct Client-Client Communication

Page 8: N04 xmpp and_android

XMPP 프로토콜

• XMPP 는 Stream 기반으로 동작• XMPP 의 Message Type

- one-to-one chat, group-chat, error, headline and normal

Client 1

Client 2 (GAE)

Client 1

Client 2 (GAE)

http://en.wikipedia.org/wiki/Extensible_Messaging_and_Presence_Protocol

Page 9: N04 xmpp and_android

GAE XMPP Service

• GAE XMPP 서비스는 3 가지 inbound services 를 지원함 .

– xmpp_message GAE 에서 chat message 를 교환할 수 있음 .

– xmpp_subscribe  사용자와 GAE 간에 chat message, presence in-formation, status message 와 같은 데이터를 교환할 수 있음 .

– xmpp_presence GAE 에서 사용자의 chat presence 를 감지할 수 있음 .

• GAE 기반의 어플리케이션은 기본 JID 가 부여됨 .- [email protected]

• 사용자가 JID 추가 정의 가능함 .- [email protected]

Page 10: N04 xmpp and_android

GAE XMPP Service 의 장점

• 즉시 활용 가능한 XMPP 서버를 구축할 수 있음 .• Gtalk 와 같은 XMPP 서버와 원활한 통신이 보장됨 .• 추가적인 JID 구성을 통하여 다양한 XMPP 관련 서비스를

구축할 수 있음 .

VS

Page 11: N04 xmpp and_android

Demo• JID: [email protected]

Page 12: N04 xmpp and_android

Smack • Smack API 3.1.0

– http://www.igniterealtime.org/projects/smack/

Page 13: N04 xmpp and_android

GAE XMPP Service 활용

N-Screen(One-Source Multi-Use)

Smart TV

Smart Phone

Smart PAD

Google App Engine XMPP Service

Real Time Service

Smack API

Page 14: N04 xmpp and_android

XMPP 활용 용량

Page 15: N04 xmpp and_android

15

• Representational State Transfer (REST) is a style of software architecture for distributed hypermedia systems such as the World Wide Web. The term Representational State Transfer was introduced and defined in 2000 by Roy Fielding in his doctoral dissertation.

RESTful Architecture

Page 16: N04 xmpp and_android

16

Resource GET PUT POST DELETE

Collection URI, such as

http://example.com/resources/

List the URIs and perhaps other details of the collec-tion's mem-bers.

Replace the entire collec-tion with an-other collec-tion.

Create a new entry in the collection. The new en-try's URL is assigned au-tomatically and is usually returned by the operation.

Delete the entire collec-tion.

Element URI, such as

http://example.com/resources/142

Retrieve a representa-tion of the addressed member of the collection, expressed in an appropri-ate Internet media type.

Update the addressed member of the collection, or if it doesn't exist, createit.

Treat the ad-dressed member as a collection in its own right and create a new entry in it.

Delete the addressed member of the collection.

RESTful Web Service

Page 17: N04 xmpp and_android

XML Binding

• Simple Framework– Simple is a high perfor-

mance XML serialization and configuration frame-work for Java

– Its goal is to provide an XML framework that en-ables rapid development of XML configuration and communication systems.

http://jersey.java.net/http://simple.sourceforge.net/

• Jersey– Jersey is the open source,

production quality, JAX-RS (JSR 311) Reference Imple-mentation for building RESTful Web services.

– But, it is also more than the Reference Implementation. Jersey provides an API so that developers may extend Jersey to suit their needs.

XML

Page 18: N04 xmpp and_android

Demo

XML

Page 19: N04 xmpp and_android
Page 20: N04 xmpp and_android

감사합니다 .

http://code.google.com/p/devmento-gae-seminar/