Sheikh I Ahamed and Sanjay Vallecha*, “Component based Embedded for Mobile Embedded Systems,”) in the Proceedings of Database Technology and Applications Workshop of IEEE International Conference on Information Technology ITCC 2004, pp. 534-538 , Las Vegas, NV, USA, April, 2004, IEEE Computer Society Press. (Acceptance rate 49%)

Component-based Embedded Database for Mobile Embedded Systems

Sheikh I Ahamed and Sanjay Vallecha Marquette University Milwaukee, WI 53201, USA [email protected]

Abstract other devices that allow the user to complete computing tasks without being tethered, or connected, to a network. Recent developments in portable devices and The is implemented partly on growing wireless communication networks have evolved hardware and partly on the software and use to perform mobile computing during the last few years. Mobile specific functions within the system and required to be computing enlarges the usability of computers by operational during lifetime of the system. The embedded allowing low powered mobile devices to query the database is part of the embedded system, which can database over the wireless network, but also raises some either be integrated with the front-end application as demanding challenges such as slow expensive part of one of its module, which may or may not be connection, frequent line disconnection, limited host visible to the application users or separated from the bandwidth, location dependent data etc. This database application by providing an interface for accessing the should not only handle transactions with temporal database. Due to its characteristics, the embedded constraints and maintain consistency, but also use small database puts the following constraints on the system [3, . The database should use the 4, 5]: Memory Constraint, Time Constraint,Temporal resources more efficiently, port on various operating Constraint, Bandwidth Constraint. The embedded systems, minimize CPU usage, run for long period of database system used in the mobile environment puts time without any user intervention, secure and flexible the following constraint on the system [6, 7, 8]: Storage enough to work with different applications with no or Constraint, Security Constraint, Database Integrity less tailoring. The database should be generic and can Constraint, Scheduling Constraint, and Location be tailored so that the application designer can get fully Constraint. A few embedded are currently functional and flexible database for mobile embedded available [10-13] but they do not address all of the systems. This paper proposes a mobile embedded above issues. database, which will resolve some of the important Mobile computing devices vary from high-powered issues caused by the mobile computing environment servers, notebook computer to personal digital using a component based approach assistants. As the database is shared among different type of devices, the database should support multiple Keywords: Database for mobile embedded devices, platforms and should provide an effective concurrency database for PDA, component based database design control mechanism. The database performance is another issue for mobile computing. The database should perform small and fast transactions, should be 1. Introduction predictable as no human intervention is expected, and should have low memory footprint. As different types In recent years, developments in portable devices of mobile devices share this database, the database and growing wireless communication networks have should be portable, should be able to store primitive as evolved mobile computing. Mobile computing enlarges well as complex data types, scaleable, flexible enough to the usability of computers by allowing low powered support various applications without too many changes mobile devices to query the database over the wireless and should be able to handle location bases queries. network, but also raises some demanding challenges Database should have a solid transaction handling such as slow expensive connection, frequent line mechanism allowing either all or none of the operations disconnection, limited host bandwidth, location to be executed in case of the error condition. The dependent data etc. Mobile [14] simply describes a transaction mechanism should be capable of handling computing device that is not restricted to a desktop. A unreliable connection, limited battery life, reduce mobile device may be a PDA, a "smart" cell phone or storage capacity and low bandwidth communication. Web phone, a laptop computer, or any one of numerous

The database should be secure such that no unauthorized embedded through reuse of components user can access it. and thus bringing the benefits of the component based The component-based development [1, 2] allows software development. This paper proposes component- more functionality to be added to the extensible based software development mechanism in the database system by adding non-standard features like development of mobile database. The database will be managing user-space threads, virtual memory resources, designed in such a way so that more and more multi-casting, replacing one protocol with other components can be added to it. These components will protocols. The embedded mobile systems can benefit provide the functionality missing from the database from the component-based development by having the without effecting the old functionality. well-defined building blocks [1], which not only reduces the development cost, but also the testing time as the 2. Our Mobile Embedded Database validation and verification of the component is done Design Approach only once.. There is a need of database that not only can : be tailored for various applications to provide all the Our will have three layers necessary functionality required by the system, but also architecture. The first layer is the bottom layer of the maintain the embedded aspects intact like small memory database, which will provide the lower level database footprint, faster time response [1]. The component-based services. systems will support the faster development of

Figure 1. Our Database design

This layer provides the basic database functionality, display it in the user interface. The user interface will which one can also expect from the traditional database. also be capable of providing the basic functionality of The basic functionality of the database includes the the database along with the properties and services definition of data objects, their format, storage and provided by the components added to the database. The retrieval of these objects. This layer will hide these user interface will then allow the component owner to implementation details as well as hardware select new component properties and services and map dependencies from the user. This layer of the database them the already existing functionality. Once the will itself be implemented as component itself. This component owner does this mapping, then the glue code component will provide these services by exposing its generated by the configuration layer will support the interface to the layer above. As this layer will be most functionality of the new component in the database. The important and commonly use layer, any new glue code information will be saved within the database. functionality like hardware dependent functions can be The same user interface will provide the component added to the interface provided by this layer. The owners to modify and/or delete any preexisting validation mechanism will be provided while adding the components from the database. In this case, the new service to this interface, so that any existing component glue code will either be generated or functionality will not be affected by this change. The removed from the database respectively. Before application will allow deleting functionality defined by generating or modifying the component glue code, the the application. The DBMS defined functionality can user interface will provide the validation and not be deleted from the interface. verification to make sure that the component can be plug The middle layer, which is the interface layer, will into the system or not. The user interface will generate a act as place holder for any type of the components, report, which will provide the details on compatibility which are required to be plugged in to the system to and will also suggest changes in configuration in order provide a particular service or set of services. By to fit that component in the database. The component default, the database is supposed to provide at least all owner may or may not change the configuration before the traditional database services. These basic services creating the glue code. If the glue code is created will be provided through individual components and without making suggested changes in the configuration, will provide services like transaction processing, then the glue code may or may not behave in the same location dependent query handling, cache management, way as expected by the component owner. disconnection operation handling, and concurrency Once one or more components are plugged in to the control mechanism. Our approach of providing these database, then any application, which wants to services is mentioned above sections. The data storage communicate with any of these components, can do so component that provides mechanism for storing the by sending a message to the component. This message client data in the database is optional, as by default the will be represented by an event, which will be send to database will provide the object oriented approach to the component. The event to the component can be sent store the data in objects format rather than the database in two ways: native format. There is an advantage of providing these 1) Any state change in the database system OR services as components. It is possible that an application 2) Any application wants to use the services of the does not want to use any of functionality either proposed component. by us or already implemented in the database and has different idea of implementing the same service. In this Each component should have an event handler that case, our database model will allow replacing our will interpret the service request received from functionality with this newly proposed functionality by application or the database system or both, and send this removing the existing provider component and adding request to appropriate method in the component. Also, new component to the database. Any additional all the changes in the plugged in component will be functionality will be provided by defining and plugging notified to the application through events if the new components in the database. application is configured to sign up for event changes. The top layer, which is the configuration layer, will These changes may also be sent to the other layers of the provide a mechanism for components to plug in to our layered database. These layers need are not required to database. Each component will expose the properties sign up for the change events except the non-standard and services offered by them. The part of the database components, which are not the part of the basic database design is to provide the User Interface, which will read architecture. the properties and services of the components and

The overall database system will provide built-in functionality for example transaction processing will components to provide the one or more specific always provide rollback feature in the event of failures. services. It may be possible to have more than Each individual component may or may not have component providing the same functionality, but their specific functionality apart from the basic functionality. implementation may be different. The standard set of As shown in figure 2, the component will allow components will provide the guidelines to the the user to add new components in the library. In order component developers to build their components based to do so, the component library will provide the on the architecture provided by the configuration layer Question & Answer (QA) kind of session, in which user of the database. As shown in figure 2, the client can also will be asked few questions, and based on the answer choose the components from the libraries, if any of the provided by the user, the session will decide whether component meets the functional specifications of the this component can be added to the library or not. If client. Based on the component behavior and component can be added to the library, than in which functionality, the components in the library will be group, it would be added to. This QA session will be a grouped. Each group will provide at least some basic web-based application.

Figure 2. Selecting and adding components to the library

The security component can be added to our database to provide security feature. The database security can be [6] Seokwon Yang, Herman Lam, and Stanley Y.W. S. “Trust- implemented by using the encryption keys known only Based Security Model and Enforcement Mechanism for Web to the authorized users. Service Technology.” Information technology lab. 2003. itlab.uta.edu. 29 October, 2003.

In this paper, we have proposed a new three- [7] J. J. Kisler and M. Satyanarayanan. “Disconnected layered mobile database model for mobile computing Operation in the Coda File System.” ACM Transactions on environment. We are currently implementing implement Computer Systems. 10(1). February 1992. the bottom layer, which provides the basic functionality of the mobile database. In future, we shall develop the [8] L. Khan, and M. Gupta, “Effective Management of Location Dependent Continuous Queries in Mobile middle layer comprising of various components. Each Environment.” IEEE DEXA Fifth International Workshop on component will implement one or more functionality of Mobility in Databases and Distributed Systems, pp. 705-709, the mobile computing and we would try to implement Aix-en-Provence, France, September, 2002. them in best of our knowledge. We would also develop and implement configuration layer user Interface as well [9] Cecilia Ekelin, an Jonsson, “Solving Embedded system as few predefined library components. The future work scheduling problems using constraint programming.” will allows any number of components that can be Technical Report. Dept. of Computer Enginnering. Chalmers plugged in to the database. There is no proper process University of Technology. 2000. defined for getting the appropriate component from the [10] “Birdstep RDM Mobile 2.0 - Tomorrow's Technology library, whilch will be explored Today.” Birdstep. 2003. BirdStep.com. 1 October, 2003.

[1] A. Tešanovi´c, D. Nyström, J. Hansson, and C. Norström. [11 Sybase03] “SQL Anywhere Studio.” Sybase. 2003. “Embedded Databases for Embedded Real-Time Systems: A Sybase.com. 29 October, 2003. Component-Based Approach.” Technical report. Dept. of Computer Science. Linköping University. and Dept. of Computer Engineering. Mälardalen University. 2002. [12] “Oracle 9i Lite A Technical white paper.” Oracle. 2003. Oracle.com. 29 October, 2003. [2 ] I. Crnkovic and M. Larsson. “A case study: Demands on International Conference of Software Engineering.” pages 23– 31. Limeric. Ireland. June 2000. ACM. [13] “PointBase Micro Wins Best Mobile Database.” Pointbase. 2003. Pointbase.com. 29 October, 2003. [3] H. Rajan, “Distributed Mobile Servers: Vehicle to http://www.pointbase.com/node.shtml?navHier=Product Increase Effective Bandwidth and End to End Connectivity in s/PointBase+Micro&CF=products/micro.html an Adhoc Mobile Network.” University of Virginia. 2001. cs.virginia.edu. 29 October, 2003. [14] “Wireless and Mobile computing.” Department of < http://www.cs.virginia.edu/~hr2j/papers/dms.pdf> Information Resources, Austin, TX. 2002. dir.state.tx.us.

29 October, 2003. [4] “Real Time Embedded Systems.” University of Singapore. 2000, comp.nus.edu.sg. 29 October, 2003. http://www.dir.state.tx.us/pubs/wireless/wireless.htm#_ Toc12790126

[5] Xiaohui Gu, Klara Nahrstedt. “Adaptive Offloading [15] P.A. Bernstein, E. Newcomer. "Principles of Inference for Delivering Applications in Pervasive Computing Transaction Processing." Morgan-Kaufmann, San Mateo, CA, Environments.” Monet Research Group. 2003. cs.uiuc.edu. 29 1997. October, 2003. < http://cairo.cs.uiuc.edu/publications/paper- files/percom03-xgu.pdf>