Description
APPARATUS AND METHOD FOR LIGHTWEIGHTING APPLICATION THROUGH DUPLICATED APPLICATION MANAGEMENT IN OSGi MIDDLEWARE ENVIRONMENT OF
EMBEDDED TERMINAL
Technical Field
[1] The present invention relates to an apparatus and method for lightweighting an application through duplicated application management in an Open Service Gateway Initiative (OSGi) middleware environment of an embedded terminal. Background Art
[2] OSGi stands for Open Service Gateway Initiative and is a noncommercial standardization organization established in March 1999. Over 40 members of home appliances/electronics, motors, communication, and Information & Technology (IT) fields are briskly working. The role of OSGi is to make open standards for transferring a service to a local network or device and operating the transferred service. An OSGi service platform is largely interested in three fields: connection and control between services; connection and control between a service and an OSGi middleware, and connection and control between an OSGi middleware and an external service management system. OSGi is a standard based on a Java virtual machine. The Java virtual machine acts as a buffer on differences between heterogeneous embedded Operating System (OS) and Central Processing Unit (CPU).
[3] An OSGi service is contained in a physical package called a bundle. A plurality of
OSGi services may be contained in a single bundle, and the bundle is a basic unit of distribution and management. OSGi middleware manages bundle(s). The OSGi middleware performs registration/inquiry/execution/uninstall on a service with a service registry. The OSGi middleware also searches for and responds to an event. The event is a logical event based on three event creators, such as a service, a bundle, and a framework without association with a physical event created by a device.
[4] Since OSGi is based on Java, OSGi has the easiness in management and development, and thus, an OSGi service platform is one of competitive service platforms suitable for an advanced service environment. However, the biggest problem of OSGi is derived from the fact that OSGi is Java-oriented. That is, the selection of a Java virtual machine causes a performance decrease due to an overhead of a dynamic execution environment when an application is executed in an embedded terminal environment. In addition, if a user interface (UI) is implemented using graphic libraries provided by Java, since too much memory space is required as compared to imple-
mentation of a native type UI, the execution load is too heavy to execute an application in the embedded terminal environment. In addition, restrictions of embedded Java virtual machines limit implementation of applications. For some commercialized embedded Java virtual machines, since a memory address space is physically limited, the number of executable OSGi bundles is limited.
[5] Similar conventional patents are 'Method and Apparatus for Efficiently Managing M emory in Object-Oriented Application (Korean Patent Application No. 10-2004-0070939)', 'Application Management System and Method (Korean Patent Application No. 10-2003-0000058)', and 'Method, System and Program Product for Controlling Native Applications Using Open Service Gateway Initiative (OSGi) Bundles (US Pat. Publication No. 2005/0193388)'. However, the conventional patents cope with application management rather than an application design method and does not provide a method of lightweighting an application on OSGi middleware. Disclosure of Invention Technical Problem
[6] The present invention provides an apparatus and method for lightweighting an application in an embedded terminal by separately implementing the application so as to be optimized to each environment through duplicated application management and in- teroperating the separated applications through communication in an Open Service Gateway Initiative (OSGi) middleware environment of the embedded terminal.
[7] The present invention also provides an apparatus and method for separately implementing and lightweighting an application as modules optimized to each environment and removing restrictions of an embedded Java environment by performing duplicated application management using an OSGi-to-native linker and a native integrated manager unlike conventional OSGi middleware. Technical Solution
[8] According to an aspect of the present invention, there is provided an apparatus for lightweighting an application through duplicated application management in an OSGi middleware environment of an embedded terminal comprising at least one OSGi service bundle and native module operating based on an OSGi framework, the apparatus comprising: a linker providing an interface to the OSGI service bundle for implement duplication of the application when executing the application and exchanging a message, which is required to execute the application, with an integrated manager connecting to the native module; the integrated manager providing the interface to implement duplication of the application and exchanging the message with the linker; and a determiner determining whether a native module related to the OSGi service bundle exists and executes an application according to the OSGi service bundle
and removes the application if it is determined that the native module exists or determining application execution through the message exchange between the linker and the integrated manager if it is determined that the native module does not exist.
[9] According to another aspect of the present invention, there is provided a method of lightweighting an application through duplicated application management in an OSGi middleware environment of an embedded terminal, the method comprising: determining whether a native module is included in a received OSGi service bundle; if it is determined that the native module is not included in the received OSGi service bundle, installing, executing, and removing the OSGi service bundle; and if it is determined that the native module is included in the received OSGi service bundle, executing an application in association with the native module. Advantageous Effects
[10] As described above, according to the present invention, by duplicating application management using a linker and an integrated manager unlike a conventional OSGi middleware, an application can be lightweighted by being separately implemented as modules optimized to each environment. The duplicated application can remove restrictions of a Java environment. The linker and the integrated manager allow the duplication of the application to be easily implemented by providing interfaces for an OSGi bundle and a native module. In addition, the duplicated application has compatibility with applications executed on the conventional OSGi middleware. Description of Drawings
[11] FlG. 1 is a block diagram of an apparatus for lightweighting an application through duplicated application management in an Open Service Gateway Initiative (OSGi) middleware environment of an embedded terminal according to an embodiment of the present invention;
[12] FlG. 2 is a system configuration for exchanging a message between a linker and an integrated manager illustrated in FlG. 1, according to an embodiment of the present invention;
[13] FlG. 3 is a structure of a message for communication between a linker and an integrated manager illustrated in FlG. 2, according to an embodiment of the present invention; and
[14] FlG. 4 is a flowchart illustrating a process of processing a lifecycle of an application lightweighted through duplicated application management
[15] according to an embodiment of the present invention.
Best Mode
[16] According to an aspect of the present invention, there is provided an apparatus for lightweighting an application through duplicated application management in an OSGi
middleware environment of an embedded terminal comprising at least one OSGi service bundle and native module operating based on an OSGi framework, the apparatus comprising: a linker providing an interface to the OSGI service bundle for implement duplication of the application when executing the application and exchanging a message, which is required to execute the application, with an integrated manager connecting to the native module; the integrated manager providing the interface to implement duplication of the application and exchanging the message with the linker; and a determiner determining whether a native module related to the OSGi service bundle exists and executes an application according to the OSGi service bundle and removes the application if it is determined that the native module exists or determining application execution through the message exchange between the linker and the integrated manager if it is determined that the native module does not exist.
[17] According to another aspect of the present invention, there is provided a method of lightweighting an application through duplicated application management in an OSGi middleware environment of an embedded terminal, the method comprising: determining whether a native module is included in a received OSGi service bundle; if it is determined that the native module is not included in the received OSGi service bundle, installing, executing, and removing the OSGi service bundle; and if it is determined that the native module is included in the received OSGi service bundle, executing an application in association with the native module. Mode for Invention
[18] Hereinafter, the present invention will be described in detail by explaining preferred embodiments of the invention with reference to the attached drawings.
[19] FlG. 1 is a configuration of an entire system for lightweighting an application through duplicated application management in an Open Service Gateway Initiative (OSGi) middleware environment of an embedded terminal according to an embodiment of the present invention. Referring to FlG. 1, the system includes a basement terminal hardware 100, an Operating System (OS) 101, a Java virtual machine 110, an OSGi framework 111, an OSGi-to-native linker 112, a plurality of OSGi bundles 113, a native integrated manager 120, and a plurality of native modules 121. The basement terminal hardware 100 denotes an embedded terminal of a cellular phone, a Personal Digital Assistant (PDA), a Digital Multimedia Broadcasting (DMB) terminal, or a telemetics terminal. The OS 101 provides the least environment for executing a program in an embedded terminal and operates the OSGi framework 111 independent to a frame through the Java virtual machine 110. An application can be implemented in two types: a singular type of an OSGi bundle 113; and a duplicated type of an OSGi bundle 113 and a native module 121. For an application in the duplicated type of an OSGi bundle 113 and a native module 121, the application can be
lightweighted by implementing a portion requiring much memory space, such as a User Interface (UI) using a native module 121 or separately implementing application modules so as to be optimized to each environment, and thereby, restrictions of the Java virtual machine 110 can be overcome. When the lightweighted application is executed, the OSGi bundle 113 and the native module 121 work together, and this process is managed by the OSGi-to-native linker 112 and the native integrated manager 120 through a message exchange. In addition the OSGi-to-native linker 112 and the native integrated manager 120 allows the duplication of the application to be easily implemented by providing interfaces for the OSGi bundle 113 and the native module 121. [20] FlG. 2 is a system configuration for exchanging a message between application modules using an OSGi-to-native linker 200 and a native integrated manager 210 in order to execute the lightweighted application illustrated in FlG. 1, according to an embodiment of the present invention. Referring to FlG. 2, the system includes the OSGi-to-native linker (hereinafter, linker) 200, the native integrated manager (hereinafter, integrated manager) 210, an OSGi bundle 205, and a native module 215 related to the integrated manager 210, wherein the native module 215 is classified into a stand-alone native module and a passive Dynamic Link Library (DLL) native module. The linker 200 includes a socket server 201, a first message broker 202, a first application manager 203, and a first table 204, and the integrated manager 210 includes a socket client 211, a second message broker 212, a second application manager 213, and a second table 214. The socket server 201 and the socket client 211 take in charge of communication by forming a communication channel between the linker 200 and the integrated manager 210. Each of the first message broker 202 and the second message broker 212 creates a message to be transmitted and transmits the message through a socket, or analyzes a received message and performs an operation according to the analysis result. Each of the first application manager 203 and the second application manager 213 manages a lifecycle of an application and records a state of the application in the first table 204 or the second table 214. The first application manager 203 and the second application manager 213 exchange a message for managing the lifecycle of the application through the first message broker 202 and the second message broker 212. The OSGi bundle 205 and the native module 215 constituting the application interoperate by exchanging a message. That is, when the message is created and transmitted to the first message broker 202 or the second message broker 212, the first message broker 202 or the second message broker 212 transmits the message to the other party through the socket. The first message broker 202 or the second message broker 212, which has received the message, analyzes the message, determines which module the message is transmitted, and transmits the
message to the determined module.
[21] A method of managing a duplicated application in an OSGi middleware environment of an embedded terminal will now be described with reference to FIGS. 3 and 4. FlG. 3 is a structure of a message for communication between thelinker 200 and the integrated manager 210 illustrated in FlG. 2, according to an embodiment of the present invention, and FlG. 4 is a flowchart illustrating a process of processing a lifecycle of an application lightweighted through duplicated application management according to an embodiment of the present invention.
[22] Referring to FlG. 3, the message has a binary, extensible Markup Language (XML), or Hypertext Markup Language (HTML) format. A message start field 301 and a message end field 304 are located in both ends of the message, and a head field 302 and a body field 303 exist between the message start field 301 and the message end field 304. The head field 302 includes a target field 311, a message type field 312, and a message related parameters field 313. The body field 303 includes a plurality of target related parameters fields 321. When the message is received, the first message broker 202 or the second message broker 212 analyzes the head field 302. In the target field 311 , a name of the OSGi bundle 205 or the native module 215 to which the message is transmitted is recorded. In the message type field 312, a message type, i.e., a type of a message for managing a lifecycle or a message exchanged between application modules, is recorded. In the message related parameters field 313, parameters according to the message type field 312 are recorded. If the first message broker 202 or the second message broker 212 analyzes the head field 302 and determines that a target of the message is an application module, the first message broker 202 or the second message broker 212 transmits the body field 303 to the target application module. Since the body field 303 follows an application-related specification, only the application can analyze the body field 303.
[23] How to process a lifecycle in which an application is installed, started, stopped after the application is completed, and uninstalled through duplicated application management will now be described with reference to FlG. 4. A lifecycle of an application begins when the application is received to a terminal in a bundle type in which a native module is compressed. An OSGi service bundle is received and decompressed in operation 401. It is determined in operation 402 whether a service- related native module is included in the service bundle. If it is determined in operation 402 that the native module is not included, as well as the prior art, the OSGi service bundle is installed in operation 421, started in operation 422, stopped in operation 423, and uninstalled in operation 424.
[24] If it is determined in operation 402 that the native module is included, a name of the native module is detected when the OSGi service bundle is installed in operation 411.
The name of the native module is registered in the first table 204 in operation 412. The native module is loaded in operation 413 and registered in the second table 214 in operation 414. The OSGi service bundle is started in operation 415, and the application is executed through communication between the OSGi service bundle and the native module in operation 416. When the OSGi service bundle is stopped in operation 417, the interoperation between the OSGi service bundle and the native module is terminated, and when the OSGi service bundle is uninstalled in operation 418, the native module is released in operation 419.
[25] The invention can also be embodied as computer readable codes on a computer readable recording medium. The computer readable recording medium is any data storage device that can store data which can be thereafter read by a computer system. Examples of the computer readable recording medium include read-only memory (ROM), random-access memory (RAM), CD-ROMs, magnetic tapes, floppy disks, optical data storage devices, and carrier waves (such as data transmission through the Internet). The computer readable recording medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion.
[26] As described above, according to the present invention, by duplicating application management using a linker and an integrated manager unlike a conventional OSGi middleware, an application can be lightweighted by being separately implemented as modules optimized to each environment. The duplicated application can remove restrictions of a Java environment. The linker and the integrated manager allow the duplication of the application to be easily implemented by providing interfaces for an OSGi bundle and a native module. In addition, the duplicated application has compatibility with applications executed on the conventional OSGi middleware.
[27] While this invention has been particularly shown and described with reference to preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. The preferred embodiments should be considered in descriptive sense only and not for purposes of limitation. Therefore, the scope of the invention is defined not by the detailed description of the invention but by the appended claims, and all differences within the scope will be construed as being included in the present invention. Industrial Applicability
[28] The present invention relates to an apparatus and method for lightweighting an application through duplicated application management in an Open Service Gateway Initiative (OSGi) middleware environment of an embedded terminal.