May 2007 (vol. 8, no. 5), art. no. 0704-o5004 1541-4922 © 2007 IEEE Published by the IEEE Computer Society
Education
Mobile Computing Systems Programming: A Graduate Distributed Computing Course Lars Kulik • University of Melbourne Mobile devices are ubiquitous: they encompass portable audio and video players, digital cameras, tablet PCs and PDAs, as well as cell phones and smart phones. A Sept. 2006 Cellular News story (http://www.cellular-news.com/story/19223.php) estimated that there are more than 2.5 billion mobile phones worldwide. Although the mobile systems market is large and the career opportunities for students are excellent, relatively few universities offer mobile computing courses, much less teach mobile systems programming. Because mobile networks are likely to drive computing for the foreseeable future, the University of Melbourne Computer Science and Software Engineering Department created a Master of Engineering in Distributed Computing degree program.1 The MEDC program educates graduate students in rapidly evolving key areas such as distributed computing, mobile computing, pervasive computing, and sensor networks. I teach CSSE 653: Mobile Computing Systems Programming.
Quick Facts Course: Mobile Computing Systems Programming (CSSE 433-653) Units: Computer Science and Software Engineering Institution: University of Melbourne Instructor: Lars Kulik Level: Graduate URLs: https://psc.unimelb.edu.au/view/subject/433-653.html; www.cs.mu.oz.au/653 The SUM lab Instructors typically teach software development for mobile devices using simulation environments from development kits such as Java Micro Edition (ME). These simulators and emulators, however, fall short of representing the real-world behavior of mobile computing devices such as smart phones. Small mobile devices are limited not only in their computing power and communications bandwidth but also in their input mechanisms and output capabilities, such as screen size and resolution. MCSP gives students hands-on experience that can fundamentally change how they develop programs for small computing devices. Egemen Tanin and I established the SUM (sensing, ubiquity, and mobility) lab, which we now run with help from Ramamohanarao Kotagiri and Marimuthu Palaniswami. The SUM lab is one of the first of its type in Australia. Its three objectives are for students to x x x
better understand how to develop programs for mobile devices, gain hands-on experience with current and soon-to-be-released devices (which benefits students who seek industry employment), and learn to develop innovative solutions that address small pervasive devices’ restrictions.
The SUM lab is open to students enrolled in MCSP or Sensor Networks and Applications and to all research students working in sensor networks, pervasive and ubiquitous computing, mobile computing, and distributed computing. The lab uses smart phones, sensor nodes (we’re currently
IEEE Distributed Systems Online (vol. 8, no. 5), art. no. 0704-o5004
1
evaluating sensor motes from Sun Microsystems and Intel), and radio frequency identification (RFID) readers and tags (from Nordic).
Interaction with mobile devices Students can check out devices from the lab to enhance their experience, become familiar with various devices, and experience a learning model different from the typical lab where a device is tethered to a development machine. A mobile device’s constraints (such as limited input capabilities, slow speed, or constrained battery life) can only be experienced through daily exposure. Mobile devices enable a new classroom experience as lecturers—and later, students—present live demonstrations. These demonstrations go beyond classical teaching techniques such as slide-based presentations. Using mobile devices in the classroom helps students interact with the lecturer and their colleagues at a new level. This direct interaction also gives them helpful feedback as they learn from their peers’ experiences and design ideas. For MCSP, we evaluated numerous devices and settled on smart phones for several reasons: x x
x x
They’re likely to become omnipresent because they unite the functionality of a range of mobile devices, including mobile phones, PDAs, digital cameras, audio players, and video players. The latest smart phones integrate GPS receivers, and phone manufacturers are testing the use of phones for mobile payment services. This functionality makes smart phones ideal for programming projects. They enable a large range of applications, which encourages students to explore their ideas. Most smart phones also support WPAN (wireless personal area network) technologies such as Bluetooth or wireless LANs (local area networks). The WPAN support is valuable for teaching because it allows the deployment of routing algorithms for mobile ad-hoc networks (MANETs).
Developing software for mobile devices A primary goal of the course was to offer students a choice of development environments for their programming projects. We initially supported two environments, Java ME and the .NET Compact Framework, for their relatively moderate learning curve and their market penetration. For example, Java ME is supported by an estimated 1.5 billion phones (more than Java-supported PCs; (see http://www.java.com/en/about)). We didn’t support other options such as the Binary Runtime Environment for Wireless (BREW) or Symbian C++ because of their steep learning curve. This year, we’ll also encourage students to use Python for their programming projects because it’s easy to learn and all Nokia Series60 operating systems now support it (http://forum.nokia.com/python). For optimal support of Java ME, Symbian OS, and Windows Mobile, the SUM lab provides two types of smart phones for the programming projects. HP iPAQ smart phones support Java ME and the .NET Compact Framework, and Nokia smart phones support Java ME and Python. Another reason we chose two smart phones was to highlight mobile devices’ heterogeneity, which is a key challenge in developing software for them. For example, the smart phones we chose have very different input mechanisms. The Nokia phone has the classic 12-digit keypad, which is good for number input but less suitable for longer text inputs. The HP iPAQ supports pen-based input—that is, a touch screen with a stylus providing soft keyboards and supporting handwriting recognition. Coupled with various small screen sizes, the two input modalities demonstrate that programming a mobile device’s user interface is different from developing one for a standard PC. Students quickly learn that they must apply two fundamental principles—abstraction and discovery—to develop a platform-independent program that can run on numerous mobile devices. Using an abstract description (such as “provide an ‘OK’ button”) is preferable to specifying where to draw a button on the screen if the screen size is unknown. Abstraction uses less code and ensures that the device uses its native look-and-feel, which provides a good end-user experience. Discovery, on the other hand, finds out the device’s capabilities (such as its display size or color capabilities) at runtime. It’s the preferred method for low-level user interfaces such as games.
IEEE Distributed Systems Online (vol. 8, no. 5), art. no. 0704-o5004
2
Syllabus MCSP aims for a balance between teaching new mobile computing technologies and introducing students to current research questions, addressing the needs of both academia and industry. The course covers several important technologies and techniques, particularly x x x x
x
x
x
mobile operating systems and development environments, including an in-depth discussion of Java ME; interface development for mobile devices and dealing with different input modalities; wireless messaging fundamentals (such as push and pull), messaging services (such as short message service and multimedia messaging service), and their implementations; wireless personal area network standards (such as Bluetooth and ZigBee) and upcoming standards (such as Worldwide Interoperability for Microwave Access, or WiMAX) that enable wireless broadband access; wireless wide area network (WWAN) standards, such as the Global System for Mobile Communications (GSM) and Wideband Code Division Multiple Access (WCDMA), and their underlying code-, frequency-, and time-based multiplexing techniques; architectures for thin clients that only have an Internet browser installed and access content from wireless application servers via protocols such as WAP (wireless application protocol); and indoor and outdoor position techniques for mobile devices (because location-based services are a key emerging area in mobile computing applications).
The course also introduces students to advanced applications in current research, such as smart product packaging, which lets consumers use a mobile phone as an augmented-reality device by superimposing the mobile screen’s contents on the packaging’s captured visual background.2 To familiarize students with research issues, the course covers established topics such as routing in Manets, which briefly introduces routing issues in sensor networks and directly connects to the MEDC program’s next course, Sensor Networks and Applications. Because we expect RFID technologies to become more integrated in mobile systems—for example, for payment services—the course also addresses research issues for RFID tags—in particular, preventing threats (such as cloning and tag forging) and maintaining security and privacy. Privacy is particularly important for RFID-enabled products and location-based services because privacy-unaware approaches might inhibit these forthcoming markets. Consequently, the course examines algorithms and approaches that balance the need for privacy with the economic need for exact information such as IDs or precise locations.
Student projects Programming projects are a vital component of the course. We don’t prescribe a particular project but instead suggest possible projects that will inform students of the challenges in programming mobile system applications. Because mobile devices typically have less CPU power and a small memory footprint, intermittent low-bandwidth network connections, limited I/O capabilities, and often, no file system, students must learn to deal with these constraints. Students learn to use text extensively, compress images and reduce their size, use separate page sets for different device classes, balance persistent storage with network access, and avoid horizontal scrolling and animation (except for games). The first year, the suggested projects included a mobile barcode scanner, comic-strip viewer, and breakout game. The barcode scanner’s built-in camera would capture a simple barcode; after the device identified the barcode, it would automatically download additional product information, such as reviews. The comic-strip viewer would connect to Web sites that update their comic strips daily and then adapt the pictures for a mobile screen. However, most students developed a sophisticated breakout game in Java ME because the lectures covered the underlying programming techniques and a detailed marking scheme fully specified the breakout game. The marking scheme highlights the importance of x
appropriate feedback to users,
IEEE Distributed Systems Online (vol. 8, no. 5), art. no. 0704-o5004
3
x x x x x
wireless network access to a server or other mobile devices, using the device’s persistent storage, a well-designed game screen that adapts to different screen resolutions and layouts, correct game mechanics with accurate updates, and proper treatment of network and file systems errors.
The marking scheme helped students identify the important components in developing software for mobile devices and served as a generic project guide. It also included bonus points that students could earn by developing an exceptional project. For the breakout game, I awarded bonus points for advanced tasks such as implementing a multiplayer version that could be played via a WPAN connection (see figure 1).
Figure 1. An ad-hoc multiplayer mobile tank game developed by MEDC students Duncan Lau and Thitipat Panyapinijnugoon. One device acts as a server and the others act as clients. All devices access the same world but have slightly different world views because each screen centers on the players’ tank. Some student applications weren’t on the suggested projects list. One project focused on a Web service–based infrastructure that lets users access an address book from any mobile device that supports Java ME. Another project built an ad-hoc doodle platform in the .NET Compact Framework that lets users exchange doodles on their mobile devices using a wireless LAN connection (see figure 2 and the "Additional Lecture Material" sidebar).
Figure 2. An ad-hoc mobile doodle platform developed by MEDC student Archana Sathivelu that lets users exchange doodles on the fly. After a user draws a line, the platform automatically updates the other devices.
IEEE Distributed Systems Online (vol. 8, no. 5), art. no. 0704-o5004
4
These projects teach students to work in small, effective teams to implement different applications. Software deployment on heterogeneous devices requires that they learn to implement deviceindependent implementation methods. Mobile device constraints often require creative skills and careful planning. All students present their projects running on real devices at the end of the semester. This is not only an enjoyable experience for students but also one that immediately shows them how to improve their applications. As students are exposed to the latest computing technologies, they obtain a competitive advantage compared to a classically taught course based on simulations. We feel that this approach will not only help students develop a deeper understanding of mobile systems’ intricacies and programming than they could gain otherwise, but it could ultimately result in higher success in industry employment.
Additional Lecture Material A short video showing the ad-hoc Doodle platform developed by Archana Sathivelu. WMV (http://dsonline.computer.org/portal/cms_docs_dsonline/dsonline/2007/05/Doodle.wmv) MP4 (http://dsonline.computer.org/portal/cms_docs_dsonline/dsonline/2007/05/doodle.mp4) A sample set of lecture slides on RFID technology. PDF (http://dsonline.computer.org/portal/cms_docs_dsonline/dsonline/2007/05/RFID.pdf) References 1.
2.
R. Buyya and R. Kotagiri, “ An Innovative Master’s Program in Distributed Computing,” (http://dsonline.computer.org/portal/pages/dsonline/2007/01/o1002edu.html) IEEE Distributed Systems Online,vol. 8, no. 1, 2007. ETH Zurich, “Smart Product Packaging: A Research Demo of the Distributed Systems Group,” April 2007; (http://www.vs.inf.ethz.ch/res/show.html?what=visualcodes-packaging).
Acknowledgments I thank the University of Melbourne for supporting the SUM lab under the Major Equipment funding scheme. I also thank lab members Egemen Tanin, Rao Kotagiri, and Marimuthu Palaniswami. Lars Kulik is a lecturer in the Department of Computer Science and Software Engineering at the University of Melbourne. He also leads the university’s SUM (sensing, ubiquity, mobility) lab. Contact him at
[email protected].
Related Links x x x x x
"MoCA: A Middleware for Developing Collaborative Applications for Mobile Users," IEEE DS Online (http://doi.ieeecomputersociety.org/10.1109/MDSO.2004.26) "Content and Web Services Converge: A Unified User Interface," IEEE Pervasive Computing (http://doi.ieeecomputersociety.org/10.1109/MPRV.2005.74) "Mobile Local Macropayments: Security and Prototyping," IEEE Pervasive Computing (http://doi.ieeecomputersociety.org/10.1109/MPRV.2006.78) "Middleware for Protocol-Based Coordination in Mobile Applications," IEEE DS Online (http://doi.ieeecomputersociety.org/10.1109/MDSO.2006.50) "Spotlight: The Rise of the Smart Phone," IEEE DS Online (http://doi.ieeecomputersociety.org/10.1109/MDSO.2006.22)
Cite this article: Lars Kulik, "Mobile Computing Systems Programming: A Graduate Distributed Computing Course", IEEE Distributed Systems Online, vol. 8, no. 5, 2007, art. no. 0705-o5004.
IEEE Distributed Systems Online (vol. 8, no. 5), art. no. 0704-o5004
5