Remote Storage for Mobile Devices
Total Page:16
File Type:pdf, Size:1020Kb
Remote Storage for Mobile Devices Jarkko Tolvanen, Tapio Suihko, Jaakko Lipasti, and N. Asokan able to view and edit pictures. Abstract— The ability to access remote file storage from mobile These types of usage scenarios that involve storing, devices enables a number of new use cases for storing and sharing retrieving and sharing require support for remote storage data. We describe the design and implementation of a Remote access in mobile devices. This paper gives a brief overview of Storage Client framework on Symbian OS, the leading smart our work in this area. phone OS on the market. Our work is inspired and informed by previous work like Coda [1]. We describe why Coda cannot be II. INTRODUCTION used directly in our target scenarios and environments. We then describe how we adapted the Coda concepts to suit our needs. Data objects like images and videos are typically stored as The advanced features supported by the framework include files in a file system. The scenario above implies that it must disconnected operation with whole-file caching and immediate be possible to seamlessly access and modify files from several file access (adapting whole-file caching principle to multimedia- devices. Applications access files using a standard file system centric smart phones). Using this framework, we have implemented Symbian OS remote filesystems based on WebDAV API. Therefore it is logical to integrate remote storage access and FTP. into the file system. Files could either be transferred directly from device to device or by using a network server. Index Terms—disconnected operation, remote file systems, We have developed a framework for accessing remote Symbian OS, WebDAV filesystems with Symbian OS phones. In remote access, a storage server exports a part of its filesystem, which the phone mounts. The filesystem appears as a new drive on the phone. I. MOTIVATION The storage server can be on a centralized network server or Carol is on vacation. She takes lots of pictures with her on another phone. The advanced features we have developed camera phone and fills up almost all the available memory. include disconnected operation, similar to Coda distributed file When she comes back home, her phone detects the presence of system [1], but using more widely deployed protocols (e.g. a high bandwidth Internet access point and automatically WebDAV [2]). Disconnected operation means that the client moves her new pictures to her Internet photo album service device can continue to use cached files even when the server is storage space. So when she sits at her laptop and opens her out of reach. This implies aggressive caching. We have also photo album, she can already see the new pictures. She starts developed advanced caching policies that attempt to support her photo editing software and makes a collage from some of disconnected operation and high-latency wireless networks by the nicer pictures. utilizing whole-file caching whenever possible. However we Then Carol goes for an evening out and meets Alice. Carol must take into account that ensuring smooth operation of a wants to show off the collage she made earlier. In her phone’s multimedia centric smart phone sometimes requires quick media gallery application, she chooses the remote storage tab, access to a portion of data. locates the collage picture and opens it. It takes a few seconds In this paper, after setting requirements (Section III), we for the image to download over the cellular network describe the components of the Remote Storage Client connection. Alice is impressed by the collage. However, Carol framework (Section IV). We examine some specific issues insists on adding an audio track to the collage and picks a related to the system in Section V. We then give the first suitable MP3 from her home server, which she then shortens experiences in using the framework in a Symbian OS smart to fit the collage better. Finally, Carol grants Alice access to phone (Section VI). Section VII describes related work, and her Internet photo album. Alice now sees Carol’s Internet finally, Section VIII outlines directions for future work. photo album as a new tab in her phone’s media gallery and is III. REQUIREMENTS Manuscript received June 23, 2005. Our use cases with mobile devices suggest a distributed file Jarkko Tolvanen, Jaakko Lipasti, and N. Asokan are with Nokia system (DFS) that supports high data availability with Research Center, Helsinki, Finland (e-mail: [email protected]). disconnected operation. The client devices in our scenarios Tapio Suihko is with VTT Information Technology, Espoo, Finland may use bearers with different characteristics: cellular data (e-mail: [email protected]). bearers like General Packet Radio Service (GPRS) have low IV. REMOTE STORAGE CLIENT FRAMEWORK bandwidth, high latency, and may have volume-based Symbian OS uses micro-kernel architecture. The file charging, whereas local area bearers like WLAN have systems in Symbian OS are managed by the Symbian OS File opposite characteristics. With a view to easing deployment, we Server, which is a user level process. Our Remote Storage wanted to use standardized protocols, and preferably not Client (RSC) framework integrates remote file storages into require server-side changes. the File Server. The framework uses cache in a local file At first glance, Coda would seem like a suitable DFS that system, so that disconnected operation can be supported. The supports disconnected operation with aggressive caching. framework consists of platform components and applications However, we decided not to use Coda for the following (see Fig. 1). reasons: • It does not use standard protocols, and its deployment is marginal outside the academic File Browser Mounter Other Clients community. • It was mainly designed for high-bandwidth, low- latency bearers. File Server Remote DAV Although we chose not to use Coda as is, we adopted its File Engine FTP basic ideas, like optimistic concurrency control and whole-file FAT LFFS RSC caching. As we discuss below, we had to refine or adapt Coda notions to suit the constraints of our target environment. WebDAV has been our primary access protocol. WebDAV is Fig. 1. Remote Storage Client Framework Components an HTTP extension, and as such has quickly gained acceptance and deployment. It uses reliable TCP/IP communication, so we The platform components include a remote file system do not have to take care of e.g. packet retransmissions extension to Symbian OS File Server and a Remote File ourselves. Packets using standard HTTP ports (80 and 443) are Engine. Remote file access protocols attach to the engine usually able to pass through firewalls without a need for extra through protocol plug-ins (WebDAV and FTP in the figure). configuration. This design has also some drawbacks: Perhaps For mounting and remote file management we have most importantly, we miss server-side callbacks that for implemented a separate Mounter application and an enhanced example Coda and NFSv4 [4] have demonstrated to be a Filebrowser. useful optimization in cache consistency management. A. RSC File System However, mobile network (like GPRS) operators do not File systems in Symbian OS operate within the File Server. typically allow incoming packets from Internet anyway, but Typically, FAT or LFFS file system is used for local media, only allow replies that promptly follow mobile device initiated like the phone’s flash memory or a removable memory card. communication. We also miss the high availability that Each filesystem is mounted on a drive letter. Requests for replicated Coda servers can offer. Moreover, by relying on different drives are handled by different File Server threads. standard file transfer protocols, we can only refer to files by The File Server also offers an interface for dynamically their path names and cannot assume any path-independent installable file systems to support access to other media, like identifiers. remote file storages over a network. Remote file system code Fetching and caching whole files is a natural consequence is also run in a dedicated thread, which makes it possible to of the requirement to support disconnected operation. recur to the services of the local file systems from the remote However, applications sometimes only peek at a part of file file system code. This makes it possible to easily cache remote contents without any intention to consume the whole file. For files. example, Symbian OS uses a recognizer architecture to figure Our RSC File System attaches to the above-mentioned File out the MIME type of a file by a reading a small data sample Server’s interface for dynamically installable file systems. Its from the beginning. Media player applications read metadata design was originally inspired by Coda. In Coda embedded into the media files like MP3 to present an implementations for UNIX variants, the operating system informative listing of the contents to the user. When Coda-like kernel contains a stub file system interface that delegates whole-file caching is used, attempts to read a few bytes from remote file access operations to a user-space process (called the beginning of the file may result in a long delay before the Venus) that performs all communication with remote storage whole file is downloaded. Therefore, our system should servers. We implemented a corresponding architecture where support immediate file access features to enable these cases. the RSC module translates operations on Symbian-defined file Thus we can enjoy some benefits of NFS-like systems, which system objects into file access primitives that are similar to fetch and cache file blocks. those used at Coda’s Kernel-Venus interface. These primitives define the interface between RSC File System and the Remote A guiding principle in Coda was location transparency: the File Engine. user does not have to know whether she is accessing a file In Coda the likely motivation for this separation is that only directly from the server, or from the local cache.