Helping ordinary people create extraordinary websites!
HOME TUTORIALS SCRIPTS WEB HOSTING BLOG FORUM
Get Our Newsletter
Your Email:

A New Strategy of Language Pack Management for Wireless Apps

By Huang Chang & Tong Chun Jie
2005-04-18


OSGi-based LP Loading Strategy

Requirement analysis
The deployment policy for LP that is applied in traditional globalization applications is not feasible for mobile device environments. Preparing LP packages for all supported languages in one package and placing it with the supported application requires a considerable amount of device storage, especially for those applications in which each LP takes up a lot of space. Suppose an e-book had to be translated into several languages for reading, that's an example where the storage capacity could not handle the application.

The locale setting on the device determines the language pack to be used. In most cases, only one locale is valid for end users. It is presumed that the supported language pack will continue to serve the application throughout the application's life cycle after its corresponding locale is determined. Even though there are some locale switches during the application's life cycle, such events are not meant to occur frequently. Therefore, the application typically relies on a single LP for one specific language, while leaving those for the other languages idle until a locale switch occurs. A storage-saving LP loading strategy is demanded, while still ensuring the multiple language support in one device.

A reference model
The OSGi's componentization architecture can be utilized to reinforce full LP support, which cannot be completely achieved due to limited device storage. The idea comes naturally from the bundle-based framework, in which required software components can be dynamically loaded to the device rather than being prepared beforehand. Figure 2 describes a possible solution that implements the dynamic LP loading strategy.

Figure 2. A reference model for OSGi-based dynamic LP loading


To avoid loading/unloading all language packs in one action, each language pack in an application is packaged in a separate OSGi bundle. Instead of being downloaded to the device with the installation of the application bundle, these language packs are stored in the management server and requested dynamically. Acquiring a specific language pack can be achieved by the install bundle facility provided by the OSGi service platform. To avoid duplicate code by different applications, an application-independent LP proxy bundle delegates the maintenance work on a device LP, such as LP install/uninstall and LP pool control. The LP proxy bundle provides various application bundles with a common LP access interface. With this type of interface, applications can indirectly access LP contents transparently without worrying about the details of LP loading. Another benefit of introducing a centralized LP proxy is that it can enforce some global policies regarding LP usage on all the globalized applications. For example, device administrator can set a parameter to define the LP pool size for each application.

Tutorial Pages:
» Use the Service Management Framework to Develop Globalized Wireless Apps
» Introduction
» PC Versus Mobile Devices
» OSGi Overview
» OSGi-based LP Loading Strategy
» Service Management Framework
» Design Model for an Exemplary Implementation
» Language Pack Bundle
» LPProxy Bundle
» LPInvoker Bundle
» In Summary
» Resources


First published by IBM DeveloperWorks


 | Bookmark
Related Tutorials:
» Secrets of the Wireless Elite: Alexei Polyakov
» Linux Wireless Networking
» Open Source Wireless Tools Emerge
» Getting Practical About Wireless Security, Part 1: Building a Wireless Sniffer with Perl
» Challenges and Opportunities in Mobile Games
» Running Linux on an iPAQ