최대 보무강철의 통합효과는 얼마나 될까 · 박찬욱 연구위원보, 글로벌센터 ([email protected]) 남대엽 책임연구원, 글로벌센터 ([email protected])
XMPP Solution 개요 및 동향 2009.12.12 ㈜씽크테크 기술연구소 이정규...
-
Upload
debra-margery-bailey -
Category
Documents
-
view
228 -
download
2
Transcript of XMPP Solution 개요 및 동향 2009.12.12 ㈜씽크테크 기술연구소 이정규...
XMPP Solution 개요 및 동향
2009.12.12㈜씽크테크 기술연구소
이정규 책임연구원
2
목차
• XMPP 란 ?• XMPP 국내외 동향• XMPP 프로토콜 분석• XMPP 활용–공개 서버 / 클라이언트를 이용한 IM 서비스 구축
3
1. XMPP 프로토콜 개요역사 , 아키텍쳐 , 프로토콜 ,
4
XMPP/Jabber 란 ?
• eXtensible Message & Presence Pro-tocol– “XML 스트리밍 기술로 인터넷상의 두 지점간
Presence, Message 그리고 XML 로 표현가능한 구조적 정보를 실시간으로 전달하기 위한 국제 표준 .
XML
5
XMPP History1998 1999- 2000 2002-2003 2004 2005 2009
•독점적인 IM 서비스에 대항 , 오픈소스 프로젝트인 Jabber 출범 (Jeremie Miller)
•Jabber.org 커뮤니티를 통해서 프로토콜 지속적 개선
• IETF 에 의해 표준의 형태를 갖추게 됨
•XMPP 표준 제정•(RFC3920, RFC3921)
•GoogleTalk 출시
6
XMPP 프로토콜의특징특징 설명Open free, open, public 프로토콜 Standard IETF 표준Proven 수천개의 서버 , 수백만의 사용자 확보Decentral-ized
email 과 유사한 방식으로 확장
Secure SASL, TLS 등 규격 지원Extensible XML namespace 에 의해 자신만의 프로토콜을 코어위에 확장
Flexible IM 위에 네트워크 관리 , 콘텐츠 동기화 , 협업 도구 , 파일공유 , 게임 , 등 확장 가능
Diverse 수많은 회사 또는 오픈소스 프로젝트에서 다양한 응용서비스들을 출시하고 있음 .
7
2. XMPP 프로토콜 분석 RFC3920, RFC3921 그리고 XEPs…
8
프로토콜 스펙규격이름 내용 => http://xmpp.org/proto-
cols
Core RFC3920 XMPP Core Architecture, XML Stream, Se-curity, …
RFC3921 XMPP IM Session, Messaging, Presence, Roster, Blocking,
Exten-sions
XEP XMPP Exten-sions
XEP-0030: Service Discovery(http://xmpp.org/protocols/disco/)
XEP-0095: Stream Initiation(http://xmpp.org/protocols/si/)
XEP-0045: Multi-User chat(http://xmpp.org/protocols/muc/)
XEP-0203: Delayed Delivery(http://xmpp.org/protocols/urn:xmpp:delay/)
…
9
RFC3920 – XMPP Core 아키텍쳐 JID XML
스트림Single Server
Multiple Servers
Gateway Security
10
아키텍쳐 JID XML 스트림
Single Server
Multiple Servers
Gateway Security
RFC3920 – XMPP Core
username@domain/Resource
Ex) [email protected]/tbotim [email protected]/gaim …
11
RFC3920 – XMPP Core
• XML Stream, Connection Oriented
아키텍쳐 JID XML스트림
Single Server
Multiple Servers
Gateway Security
Server
Client
XML Document
XML Document
12
RFC3920 – XMPP Core아키텍쳐 JID XML
스트림Single Server
Multiple Servers
Gateway Security
<stream:stream to='example.com‘ xmlns='jabber:client‘ xmlns:stream='http://etherx.jabber.org/streams’ version='1.0'>
<message …..> …. </message> …………. <presence …> … </presence> …………. <iq … > … </iq>
</stream:stream>
<stream:stream from='example.com‘ id='someid‘ xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams‘ version='1.0'>
<message …..> …. </message> …………. <presence …> … </presence> …………. <iq … > … </iq>
</stream:stream> ServerClient
13
RFC3920 – XMPP Core아키텍쳐 JID XML
스트림Single Server
Multiple Servers
Gateway Security
<message from=“[email protected]” to=“[email protected]” type=“chat”>
<body> hello! </body>
</message>
<presence from=“[email protected]” to=“xmpp.co.kr” type=“available”>
<show>online</show> <status>I’m here </status> </presence>
<iq from=“[email protected]” to=“xmpp.co.kr” type=“get” <query xmlns=“jabber:iq:roster”/>
</iq>
14
RFC3920 – XMPP Core아키텍쳐 JID XML
스트림Single Server
Multiple Servers
Gateway Security
XML
Client
XMPPServerXMLClient
ClientClient Client
ClientClient
XMLXML XML
XML XML
Host.com
• 폐쇄적 운영가능• 로컬에서도 운영가능
15
RFC3920 – XMPP Core아키텍쳐 JID XML
스트림Single Server
Multiple Servers
Gateway Security
XML
XML
XML XML
XML
Client
XMPP App
Client
XMPPServer
XMPPServer
XMPPServer
XMPPServer
Client
XML
XML
XML
Client
XML
Client
Client
Internet
XML
XML
XML
XML
Client
• 공인 IP 에서 운영• 외부 XMPP 서버와의 연결을 통한 무한 확장• 기술적으로 이메일을 대체 가능
16
RFC3920 – XMPP Core아키텍쳐 Xml
스트림JID Single
ServerMultiple Servers
Gateway Security
XML
Client
XMPPServerXMLClient
ClientClient Client
ClientClient
XMLXML XML
XML XML
Host.com
17
RFC3920 – XMPP Core
• TLS (Transport Layer Security)– RFC 5246 (TLS ver 1.2)
• SASL (Simple Authentication Security Layer)– RFC2222
아키텍쳐 Xml 스트림
JID Single Server
Multiple Servers
Gateway Security
Server
Client
TLS
SASL
18
Session Message Presence Roster Blocking Communication
RFC3921 – XMPP IM
Server
PC
PDA
1) Session establishment
2) Resource binding with
“PC”
1) Session establishment
2)Resource binding with
“PDA”
19
Session Message Presence Roster Blocking Communication
RFC3921 – XMPP IM
Subject
Type
Thread
Body
Extensions<message [email protected] to=“[email protected]” type=“chat” >
<body> hello </body>
</message>
20
Session Message Presence Roster Blocking Communication
RFC3921 – XMPP IM
• Subscription Management– Presence subscription
• Subscribing (type=subscribe)• Canceling (type=unsubscribed)• Unsubscribing
(type=unsubscribe)
– Presence priority
Server
user1
user2Presence notifybroadcast
Subscrip-tionInfo
user3
21
Session Message Presence Roster Blocking Communication
http://usrportage.de/uploads/gaim-2.0beta1.png
RFC3921 – XMPP IM
ServerRoster DB
1) Roster 요청
2) Roster 다운로드
Roster (add, update, delete)
• Roster 정보는 개인화되어 있음
22
Session Message Presence Roster Blocking Communication
http://usrportage.de/uploads/gaim-2.0beta1.png
RFC3921 – XMPP IM
ServerServer-side pri-vacy list
List Management
• Privacy 정보는 개인화되어 있음
23
XEP(XMPP Extension Protocols)SVC DiscoXEP-0030
Stream InitiationXEP-0095
Multiuser chatXEP-0045
Delayed deliveryXEP-0203
http://usrportage.de/uploads/gaim-2.0beta1.pnguser Kyobookbook.com
Catalog.Kyobookbook.com
24
XEP(XMPP Extension Protocols)SVC DiscoXEP-0030
Stream InitiationXEP-0095
Multiuser chatXEP-0045
Delayed deliveryXEP-0203
http://usrportage.de/uploads/gaim-2.0beta1.png
<iq type='get' from=‘[email protected]/tbotim' to=‘kyobobook.com' id=‘item_1'> <query xmlns='http://jabber.org/protocol/disco#items'/></iq>
userKyobookbook.com
25
XEP(XMPP Extension Protocols)SVC DiscoXEP-0030
Stream InitiationXEP-0095
Multiuser chatXEP-0045
Delayed deliveryXEP-0203
http://usrportage.de/uploads/gaim-2.0beta1.png
<iq type='result' from=‘kyobobook.com‘ to=' [email protected]/tbo-tim ' id='item_1'> <query xmlns='http://jabber.org/protocol/disco#items'>
<item jid='catalog.kyobobook.com' name=‘ 교보문고 카탈로그 서비스 '/> </query></iq>
Server
user
26
XEP(XMPP Extension Protocols)SVC DiscoXEP-0030
Stream InitiationXEP-0095
Multiuser chatXEP-0045
Delayed deliveryXEP-0203
http://usrportage.de/uploads/gaim-2.0beta1.png
<iq type='get' from=‘[email protected]/tbotim' to=‘catalog.kyobobook.com' id=‘item_2'> <query xmlns='http://jabber.org/protocol/disco#items'/></iq>
user Catalog.Kyobookbook.com
27
XEP(XMPP Extension Protocols)SVC DiscoXEP-0030
Stream InitiationXEP-0095
Multiuser chatXEP-0045
Delayed deliveryXEP-0203
http://usrportage.de/uploads/gaim-2.0beta1.png
<iq type='result' from=‘catalog.kyobobook.com‘ to=' [email protected]/tbotim ' id='item_2'> <query xmlns='http://jabber.org/protocol/disco#items'>
<item jid=‘music.catalog.kyobobook.com' name=‘ 교보문고 음악 카탈로그 '/> <item jid=‘book.catalog.kyobobook.com’ name=‘ 교보문고 신간서적 카탈로그’ /> … </query></iq>
user
28
XEP(XMPP Extension Protocols)SVC DiscoXEP-0030
Stream InitiationXEP-0095
Multiuser chatXEP-0045
Delayed deliveryXEP-0203
http://usrportage.de/uploads/gaim-2.0beta1.png
<iq type='result' from=‘catalog.kyobobook.com‘ to=' [email protected]/tbotim ' id='item_2'> <query xmlns='http://jabber.org/protocol/disco#items'>
<item jid=‘catalog.kyobobook.com' node=‘music’ name=‘ 교보문고 음악 카탈로그 '/> <item jid=‘book.catalog.kyobobook.com’ name=‘ 교보문고 신간서적 카탈로그’ /> … </query></iq>
* Node 개념의 추가
29
XEP(XMPP Extension Protocols)SVC DiscoXEP-0030
Stream InitiationXEP-0095
Multiuser chatXEP-0045
Delayed deliveryXEP-0203
http://usrportage.de/uploads/gaim-2.0beta1.png
user2user1
* 동일 네트워크인 경우
proxyServer
30
XEP(XMPP Extension Protocols)SVC DiscoXEP-0030
Stream InitiationXEP-0095
Multiuser chatXEP-0045
Delayed deliveryXEP-0203
http://usrportage.de/uploads/gaim-2.0beta1.png
* 서로다른 네트워크인 경우
proxyServer
user2user1
31
XEP(XMPP Extension Protocols)SVC DiscoXEP-0030
Stream InitiationXEP-0095
Multiuser chatXEP-0045
Delayed deliveryXEP-0203
http://usrportage.de/uploads/gaim-2.0beta1.pngconference
Xmpp.co.kr
user1
32
XEP(XMPP Extension Protocols)SVC DiscoXEP-0030
Stream InitiationXEP-0095
Multiuser chatXEP-0045
Delayed deliveryXEP-0203
http://usrportage.de/uploads/gaim-2.0beta1.png
user1
[email protected]/[email protected]/[email protected]/[email protected]/Cindy
user2
user3
user4
Harry
Jack
Bill
Cindy
33
XEP(XMPP Extension Protocols)SVC DiscoXEP-0030
Stream InitiationXEP-0095
Multiuser chatXEP-0045
Delayed deliveryXEP-0203
http://usrportage.de/uploads/gaim-2.0beta1.png
Server
user1
user2Message
* 상대방이 온라인이 아닐 때 ,
•서버가 메시지를 저장하고 ,•해당사용자가 온라인시 Push
34
3. XMPP 활용공개 XMPP Server & Client 활용
35
XMPP 오픈소스 프로젝트
Type Name Homepage Language
Server Openfire http://www.igniterealtime.org Java
eJabberD http://www.process-one.net erLang
JabberD2 http://codex.xiaoka.com/wiki/jabberd2:start C
Client Psi http://psi-im.org/ C
Pidgin http://pidgin.im/ C, C++
SDK libpurple http://pidgin.im/ C
XIFF http://www.igniterealtime.org/projects/xiff/ ActionScript
Smack http://www.igniterealtime.org/projects/smack/index.jsp
Java
http://en.wikipedia.org/wiki/List_of_XMPP_library_software
36
Openfire
• http://www.igniterealtime.org/down-loads/
37
Openfire – Install
38
Openfire – Admin
• http://127.0.0.1:9090/setup/index.jsp
39
Openfire – Server Setting
40
Openfire – Database(standard)
41
Openfire – Database(standard)
42
Openfire –Database - Embedded)
43
Openfire – Profile
44
Openfire – Administrator Account
45
Openfire – Setup Complete
46
Openfire – Admin Login
• http://127.0.0.1:9090/login.jsp
47
Openfire – Adding a User
48
Openfire – User Summary
49
Psi – Install
• http://psi-im.org/
50
Psi – Account Setup
51
Psi – Login
52
Psi – Subscribe
53
Psi – Subscribed
54
4. 참고
55
Gateway 개발
• http://www.igniterealtime.org/projects/tinder/index.jsp