Large Scale Multimedia Messaging Service Center with Optimized Database Implementation
Total Page:16
File Type:pdf, Size:1020Kb
IT 12 056 Examensarbete 30 hp November 2012 Large Scale Multimedia Messaging Service Center with Optimized Database Implementation Erdem Aksu Institutionen för informationsteknologi Department of Information Technology Abstract Large Scale Multimedia Messaging Service Center with Optimized Database Implementation Erdem Aksu Teknisk- naturvetenskaplig fakultet UTH-enheten The standardization forum 3GPP has specified Multimedia Messaging Service (MMS) standard including an MMS Relay-Server that allows users to send and receive Besöksadress: messages including multimedia contents like text, images, audio and video. A large Ångströmlaboratoriet Lägerhyddsvägen 1 scale Multimedia Message Service Relay-Server implementation needs an efficient Hus 4, Plan 0 database solution. The database should be able to support storage and manipulation of data for millions of transactions. Consistency and availability should be ensured Postadress: under heavy traffic load to prevent data losses and service delays. In this thesis, I Box 536 751 21 Uppsala present the implementation and extended evaluation of a store and forward mechanism for messages kept in MMS Server and I propose a solution to use Berkeley Telefon: DB as a back-end to Mnesia DBMS to achieve higher storage efficiency. I show that it 018 – 471 30 03 is feasible to replace database back-end of Mnesia with Berkeley DB while keeping Telefax: transparency to application level and having an efficient message store in terms of 018 – 471 30 00 higher throughput under heavy traffic. Hemsida: http://www.teknat.uu.se/student Handledare: Martin Kjellin Ämnesgranskare: Tore Risch Examinator: Lisa Kaati IT 12 056 Sponsor: Mobile Arts AB Tryckt av: Reprocentralen ITC ii Preface I would like to address special thanks to my advisor, Martin Kjellin for his support, ad- vice and attentive guidance throughout this thesis work. I also would like to thank Lars Kari for being a valuable source of ideas and for his insightful comments that helped me accomplish this thesis. I would like to express my gratitude to Tore Risch, my reviewer at Uppsala University, for reviewing my work and sharing his worthwhile opinions and also to Lisa Kaati, my examiner at Uppsala University, for her invaluable guidance that helped me complete this work. Furthermore, I would like to express my thanks to all my colleagues in Mobile Arts for their assistance, motivation and the opportunity they gave me to work on this thesis. Finally, my warmhearted thanks go to my adored mother and father. Their love and valuable support gave me the highest motivation and courage to achieve my goal. I am grateful to all people who supported me. Without their help, it would not have been possible to successfully complete this study. iii iv Contents 1 Introduction 1 1.1 Motivation and Problem Statement . 1 1.2 Method . 4 1.3 MMSC Development . 5 1.4 Limitations . 6 1.5 Alternative Approaches . 6 1.6 Contributions . 7 1.7 Thesis Structure . 8 2 Background 9 2.1 Erlang/OTP . 9 2.2 Mnesia . 10 2.3 Berkeley DB . 11 2.4 Port Drivers . 12 2.5 Multimedia Message Service (MMS) . 12 2.6 Store and Forward . 14 2.7 MA Framework . 15 2.8 Related Work . 15 3 Design and Implementation 19 3.1 Transparency . 19 3.2 Abstraction Level . 20 3.3 Berkeley DB - Dets Interface . 21 3.4 MMSC Design . 22 3.4.1 MMSC Front-End . 24 3.4.2 MMSC Back-End . 27 4 Evaluation 35 4.1 Test Platform Setup . 35 4.2 Functional Testing . 36 4.2.1 Functions of Mnesia Exports . 36 4.2.2 Functions of System Components . 36 4.3 Performance Testing . 37 v 4.3.1 mnesia meter . 37 4.3.2 mnesia tpcb . 40 5 Conclusions and Future work 45 5.1 Discussion . 45 5.2 Future Work . 46 Appendices 51 A DB Driver Implementation 51 A.1 Erl driver Usage . 51 A.2 BDB Library Usage . 52 B TPC-B Test Outputs 55 B.1 TPC-B on BDB Back-End . 55 B.2 TPC-B on DETS Back-End . 71 vi List of Figures 2.1 Supervision Tree . 10 2.2 Implementation of MMSM Interface Using WAP Gateway [4] . 13 2.3 Implementation of MMSM Interface Using HTTP Based Protocol Stack [4] 13 2.4 Example MMS Transaction Flow . 14 3.1 Dets Table States . 21 3.2 BDB-Erlang Communication . 22 3.3 Transaction Call Flow of MMS . 23 3.4 Data Flow Diagram of MMSC . 24 3.5 Entity Relationship between mmsc subscriber and mmsc profile . 26 3.6 MMSC Back-End Modules and Interactions . 28 3.7 MM Notification Module State Machine . 34 4.1 Test Environment Setup . 36 4.2 Column Chart for mnesia meter Results . 40 4.3 Column Chart for mnesia tpcb Results . 43 vii viii List of Abbreviations BDB Berkeley DB ESME External Short Messaging Entity GSM Global System for Mobile Communications IMSI International Mobile Subscriber Identity MA Mobile Arts MM Multimedia Message MMS Multimedia Message Service MMSC Multimedia Message Service Center MSISDN Mobile Subscriber ISDN Number SMS Short Message Service ix x Chapter 1 Introduction As capabilities of mobile networks and mobile phones evolve, demand on services pro- vided by telecommunication systems increase. Increasing demands makes services to be provided to rapidly growing number of users. Multimedia Messaging Service is a popular and ubiquitous service provided by mobile operators widely around the world. The stan- dardization forum 3GPP specified Multimedia Message Service (MMS) [6, 7] which allows to interchange a set of media types including text, image, audio, video and possible future formats of media, between service users. Likewise Short Message Service (SMS), MMS provides a non real-time service which does not require the realtime delivery of messages to recipients. Since the terminals of MMS are mobile phones, these devices might be turned of or they might lack signal reception and this aspect leads to other needs of mechanisms to deliver messages, one of which brings the requirement to store multimedia messages before delivery. This thesis work studies possible approaches to come up with an efficient storage mechanism that is going to be applied on a combined implementation of MMS Relay-Server where MMS Relay functionality implemented on the front-end and supports services like interaction with MMS Clients and messaging activities with other available messaging services, whereas MMS Server functionality implemented on the back-end that provides storage services for MM messages. 1.1 Motivation and Problem Statement Scalability in telecommunication systems is a significant aspect since the number of users of a service can grow arbitrarily. While number of users of a system differs from opera- tor to operator, various parameters like population of service areas, culture, economy, legal regulations play important role on prevalence and popularity of the service. Efficiency is a key fact to achieve scalability of a system by increasing the throughput. An efficient MMS Relay-Server should handle incoming traffic by processing and transmitting mes- sages. Since transmission of messages are dependent on human interaction, under heavy traffic load, MMS Server requires persistent storage of messages. Furthermore, while pro- cessing messages, subscriber based information is required. Thus subscriber database is 1 needed to keep user data. Having persistent storage requirements, database accesses ap- pears to be the bottleneck that affect the system throughput. Thus, system throughput of MMS Relay-Server can be increased with an efficient storage back-end implementation. The Multimedia Message Service Center (MMSC) presented in this work combines MMS Relay and MMS Server and operates as a single entity. MMSC is is divided into two subordinate components and these components are referred as front-end and back-end. MMSC front-end and MMSC back-end undertakes MMS Relay and MMS Server function- alities, respectively. A subscriber database for MMSC is not needed to be developed from scratch but the data model should be designed and implemented using an existing commer- cial implementation of subscriber database framework which was provided to me by the company Mobile Arts AB which supported and supervised this work. On the other hand, for handling transmission of multimedia messages (MMs), new mechanism needed to be developed for storing and forwarding. Although MMS is a non real-time messaging ser- vice like SMS, MMS comes with a significantly different delivery mechanism than SMS. A subordinate application under MMSC back-end needs to be developed to implement this delivery mechanism. This application requires an efficient database implementation and it should be based on persistent copies. Since the time between arrival and delivery of a MM is arbitrary, MMSC has to keep the MM without causing cumulative delays under contin- uous traffic. Persistent storage options brings overhead of disk access but disks provide required space to store large amounts of data. To achieve efficiency, I investigate the per- sistent storage options that can ensure consistency for MMSC back-end. To carry out this thesis work, Erlang/OTP is chosen as development platform. Erlang packages comes with Open Telecom Platform (OTP) which includes Mnesia DBMS which makes Mnesia ready to use by system developers since it does not require any integra- tion using external interfaces. Thus, I focus on persistent storage options of Mnesia DBMS. Mnesia provides non-relational, key/value database service to Erlang developers which also brings possibility to choose which physical storage media to be used. Mnesia supports two kinds of disk and one memory based storage options. For any replica of the table on any given Erlang Run-Time System, that is called a ”node” in OTP context, the storage type is defined by providing type and node list as an option to table creation function of Mnesia. Possible options are disc copies, disc only copies and ram copies.