Design and Implementation of a Federated Social Network
- Resource Type
- Authors
- Maka, Stephan
- Source
- Subject
- buddycloud, XMPP
ddc:004
- Language
- English
Analysis of Functionality and Data Models of Social Network Services, Proposal of a protocol based on XMPP/Publish-Subscribe, Comparison to OStatus and OneSocialWeb, Discussion of Inbox:Contents i List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii 1 Introduction 1 1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 buddycloud . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2 Aspects of Social Networks 5 2.1 User Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2 Social Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.3 Topology Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.3.1 Centralized Topology . . . . . . . . . . . . . . . . . . . . . . . 7 2.3.2 Decentralized Topology . . . . . . . . . . . . . . . . . . . . . . 8 2.3.3 Federated Topology . . . . . . . . . . . . . . . . . . . . . . . . 9 2.4 Privacy Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.4.1 Access Control . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.4.2 Data Ownership . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.5 Data Portability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3 Requirements 15 3.1 Functional Requirements . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.1.1 Transport Layer . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.1.2 Content Model . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.1.3 Content Distribution as a Publish-Subscribe System . . . . . . 18 3.1.4 Access Control & Roles . . . . . . . . . . . . . . . . . . . . . . 19 3.1.5 Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 3.1.6 Interaction with Mobile Users . . . . . . . . . . . . . . . . . . 23 3.2 Nonfunctional Requirements . . . . . . . . . . . . . . . . . . . . . . 24 3.2.1 Scalability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 3.2.2 Open Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 4 System Design 27 4.1 Use of XMPP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 4.1.1 Transport Layer . . . . . . . . . . . . . . . . . . . . . . . . . . 27 4.1.2 Identity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 4.1.3 XMPP Server . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 4.1.4 Federated Topology . . . . . . . . . . . . . . . . . . . . . . . . 30 4.1.5 Causal Ordering . . . . . . . . . . . . . . . . . . . . . . . . . . 32 4.2 XMPP Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 4.2.1 Flexibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 4.2.2 Scalability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 4.3 XEP-0060 Publish-Subscribe . . . . . . . . . . . . . . . . . . . . . . . 33 4.3.1 Affliations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 4.4 Content Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 4.4.1 ATOM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 4.4.2 Discussion Threading . . . . . . . . . . . . . . . . . . . . . . . 36 4.4.3 Activity Stream Semantics . . . . . . . . . . . . . . . . . . . . 36 4.4.4 Geolocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 4.4.5 Normalization . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 4.4.6 Metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 4.5 buddycloud Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 4.5.1 Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 4.5.2 Partial Data Transfer . . . . . . . . . . . . . . . . . . . . . . . 42 4.5.3 Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 4.6 Comparison to Other Federated Systems . . . . . . . . . . . . . . . . 51 4.6.1 OStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 4.6.2 OneSocialWeb . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 5 Implementation 57 5.1 Setup Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 5.1.1 Required DNS Configuration . . . . . . . . . . . . . . . . . . . 57 5.1.2 BOSH Endpoint Deployment . . . . . . . . . . . . . . . . . . 58 5.2 Service Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 5.2.1 Network Services as Proxies . . . . . . . . . . . . . . . . . . . 58 5.2.2 Database Backend . . . . . . . . . . . . . . . . . . . . . . . . 59 5.2.3 Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 5.3 Web-based Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 5.3.1 Client-Side Model . . . . . . . . . . . . . . . . . . . . . . . . . 62 5.3.2 In-Browser Caching . . . . . . . . . . . . . . . . . . . . . . . . 62 5.3.3 Synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . 63 6 Evaluation 65 6.1 Suitability of XMPP . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 6.1.1 Binary Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 6.2 Suitability of Publish-Subscribe . . . . . . . . . . . . . . . . . . . . . 66 6.2.1 Inboxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 6.2.2 Privacy Considerations . . . . . . . . . . . . . . . . . . . . . . 68 6.2.3 Message Archive Management . . . . . . . . . . . . . . . . . . 68 6.3 Anonymous Browsing . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 6.4 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Bibliography 71