WO2013145361A1 - OSGi EXECUTION DEVICE AND OSGi SYSTEM - Google Patents

OSGi EXECUTION DEVICE AND OSGi SYSTEM Download PDF

Info

Publication number
WO2013145361A1
WO2013145361A1 PCT/JP2012/071449 JP2012071449W WO2013145361A1 WO 2013145361 A1 WO2013145361 A1 WO 2013145361A1 JP 2012071449 W JP2012071449 W JP 2012071449W WO 2013145361 A1 WO2013145361 A1 WO 2013145361A1
Authority
WO
WIPO (PCT)
Prior art keywords
osgi
bundle
framework
unit
application
Prior art date
Application number
PCT/JP2012/071449
Other languages
French (fr)
Japanese (ja)
Inventor
真也 信岡
中村 雄一
Original Assignee
株式会社日立ソリューションズ
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社日立ソリューションズ filed Critical 株式会社日立ソリューションズ
Publication of WO2013145361A1 publication Critical patent/WO2013145361A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1479Generic software techniques for error detection or fault masking
    • G06F11/1482Generic software techniques for error detection or fault masking by means of middleware or OS functionality

Definitions

  • the present invention relates to a technique for improving the reliability of the OSGi framework.
  • the OSGi framework is a service platform that operates on Java (registered trademark) Virtual Machine, handles Java programs as Plugin modules, and can be dynamically added and executed.
  • the OSGi framework is developed and defined by OSGi Alliance (Non-Patent Document 1).
  • a Java program on the OSGi framework handled as a Plugin module is called an OSGi bundle.
  • the OSGi framework operates on Java, it is not necessary to redevelop and modify the OSGi bundle according to the environment.
  • the OSGi framework is executed as one Java application, that is, as one process when viewed from the OS, and each OSGi bundle is executed within this one process. Suitable for development.
  • the OSGi bundles can dynamically cooperate with each other, functions can be easily added later.
  • R-OSGi described in Non-Patent Document 2 below has a function of importing / exporting an OSGi bundle between OSGi frameworks when a plurality of OSGi frameworks are operating.
  • R-OSGi itself is also configured as an OSGi bundle.
  • OSGi Service Platform Release 4 URL: http://www.osgi.org/Release4/HomePage (acquired on March 16, 2012)
  • R-OSGi-transparent OSGi remote extension for distributed services URL: http://r-osgi.sourceforge.net/ (acquired March 16, 2012)
  • the OSGi framework and the OSGi bundle group operating on it are executed as one process. This saves memory, but at the same time, if one OSGi bundle hangs up, the OSGi framework and other OSGi bundles also hang up together.
  • the present invention has been made to solve the above-described problems, and it is an object of the present invention to provide a technique for maintaining the reliability of the OSGi framework as a whole even when an OSGi bundle whose reliability cannot be guaranteed is executed.
  • the OSGi execution apparatus includes the first and second OSGi framework units, the OSGi bundle is exported from the first OSGi framework unit to the second OSGi framework unit, and the second OSGi framework unit is not operating normally. Restart this.
  • the OSGi execution apparatus even when an OSGi bundle that cannot guarantee reliability is maintained while maintaining the feature of dynamic linkage between the OSGi memory saving and the OSGi bundle, even if the OSGi bundle hangs up on the second OSGi framework unit The important OSGi bundle on the first OSGi framework unit can continue to be executed.
  • FIG. 1 is a configuration diagram of a host 10 according to Embodiment 1.
  • FIG. 1 is a diagram illustrating an outline of R-OSGi technology.
  • FIG. 3 is a diagram conceptually showing the operation of the host 10.
  • 3 is a functional block diagram of a UI / startup management program 15.
  • FIG. The flow of processing for command input from the user is shown.
  • 3 is a diagram illustrating an operation flow of the host 10.
  • FIG. It is a block diagram of the OSGi system which concerns on Embodiment 3.
  • FIG. 1 is a configuration diagram of a host 10 according to the first embodiment of the present invention.
  • the host 10 is a device that executes the OSGi framework, and includes an OS 11 and Java VMs 121, 122, and 123.
  • a processor that executes the OS 11 and each Java VM is provided.
  • FIG. 1 shows the OS 11 and the processor integrally.
  • Java VMs 121 to 123 are executed on the OS 11.
  • the Java VM 121 executes the UI / startup management program 15.
  • the Java VM 122 executes the core OSGi13.
  • the Java VM 123 executes the application OSGi14.
  • the reason why the Java VM is divided into three in FIG. 1 is to clearly show that each Java VM is operating as a separate process. From the viewpoint of the OS 11, three Java processes of the core OSGi 13, the application OSGi 14, and the UI / startup management program 15 are running.
  • Core OSGi13 and application OSGi14 are OSGi frameworks implemented according to the OSGi specification.
  • the core OSGi 13 is an OSGi framework that executes an OSGi bundle (hereinafter referred to as a core bundle) that requires high availability, and executes a core bundle A131, a core bundle B132, and an R-OSGi bundle S133.
  • a core bundle an OSGi framework that executes an OSGi bundle (hereinafter referred to as a core bundle) that requires high availability, and executes a core bundle A131, a core bundle B132, and an R-OSGi bundle S133.
  • the application OSGi14 is an OSGi framework that executes an OSGi bundle (hereinafter referred to as an application bundle) that does not necessarily require high availability, and executes an R-OSGi bundle C141, an application bundle X144, and an application bundle Y145. Further, the core bundle A131 and the core bundle B132 are imported from the core OSGi13 and executed as the core bundle A142 and the core bundle B143.
  • an application bundle an OSGi framework that executes an OSGi bundle (hereinafter referred to as an application bundle) that does not necessarily require high availability, and executes an R-OSGi bundle C141, an application bundle X144, and an application bundle Y145.
  • the core bundle A131 and the core bundle B132 are imported from the core OSGi13 and executed as the core bundle A142 and the core bundle B143.
  • the R-OSGi bundle S133 and the R-OSGi bundle C141 correspond to an “export unit” and an “import unit”, respectively.
  • FIG. 2 is a diagram showing an outline of the R-OSGi technology.
  • R-OSGi provides a function for mutually exporting / importing OSGi bundles between OSGi frameworks.
  • the core bundle A131 is exported from the core OSGi13 to the application OSGi14, and the application OSGi14 imports the core bundle A131 and executes it as the core bundle A142.
  • R-OSGi itself is also implemented as an OSGi bundle, and there is no need to modify the OSGi framework itself.
  • the R-OSGi bundle S133 When the R-OSGi bundle S133 is activated on the core OSGi13, the R-OSGi bundle S133 waits for a connection from the R-OSGi bundle C141 via the TCP port designated by the user.
  • the R-OSGi bundle C141 activated on the application OSGi14 establishes a connection with the R-OSGi bundle S133 using the IP address and TCP port specified by the user.
  • the R-OSGi bundle S133 acquires information about the core bundle A131 that is the OSGi bundle on the core OSGi13 and the method provided by the core bundle, and exports the information to the R-OSGi bundle C141 through the TCP / IP connection.
  • the R-OSGi bundle C141 that has received the information creates a core bundle A142 that is a virtual OSGi bundle and executes it on the application OSGi14.
  • the core bundle A 142 is an OSGi bundle that has the same method interface as the core bundle A 131 but does not have the implementation of those methods.
  • the core bundle A142 forwards the call to the R-OSGi bundle C141.
  • the R-OSGi bundle C141 further forwards it to the R-OSGi bundle S133.
  • the R-OSGi bundle S133 that has received the method call calls and executes the method of the core bundle A131 corresponding to the core bundle A142, and forwards the execution result to the R-OSGi bundle C141.
  • the received R-OSGi bundle C141 is further forwarded to the core bundle A142, and the core bundle A142 returns it to the application bundle X144.
  • the core bundle A142 When viewed from the application bundle X144, the core bundle A142 appears to be present in the application OSGi14. Accordingly, the core bundle A131 and the application bundle 144 can be separated while providing the function of the core bundle A131 on the core OSGi13 on the application OSGi14. That is, even if the application bundle 144 does not operate normally due to a hang-up, the influence does not reach the core bundle A131.
  • Bundles implemented as core bundles correspond to functions that you do not want to hang up or down. For example, a log function, a communication function, a security function, etc. can be considered. Since these functions are basic elements of the system, it is considered that application bundles often use these functions. Therefore, the core OSGi 13 and the application OSGi 14 are not simply separated and the core OSGi 13 need only be stably executed, and the two need to cooperate with each other.
  • R-OSGi is exemplified as means for exporting / importing an OSGi bundle to link OSGi frameworks with each other.
  • other means may be used as long as the same function can be realized. .
  • FIG. 3 is a diagram conceptually showing the operation of the host 10.
  • the core OSGi 13 and the application OSGi 14 are linked by an R-OSGi bundle S133 and an R-OSGi bundle C141. More specifically, the R-OSGi bundle S133 exports the core bundle A131 and the core bundle B132 on the core OSGi13, and the R-OSGi bundle C141 imports these OSGi bundles into the application OSGi14.
  • the application bundle X144, the core bundle A142 and the core bundle B143 When viewed from another OSGi bundle on the application OSGi14, for example, the application bundle X144, the core bundle A142 and the core bundle B143 appear to be executed on the application OSGi14.
  • the user who uses the OSGi framework requests the application OSGi14 that imports the OSGi bundle to call the OSGi bundle, installs an arbitrary OSGi bundle, or performs a management operation. This is because the bundle on the core OSGi13 and the bundle on the application OSGi14 can all be used by the application OSGi14.
  • the object operated by the user is the application OSGi14.
  • the creator of the core bundle and the creator of the application bundle may be different, but these producers and the producers of each OSGi framework do not necessarily have to be the same. That is, the producer of the core bundle only needs to be able to confirm the reliability by some means, and is not necessarily the same as the producer of the OSGi framework.
  • the reason why the core OSGi13 and the application OSGi14 are separated is that the application bundle may not necessarily ensure the reliability, but the application bundle that can ensure the reliability is executed on the application OSGi14. It does not exclude doing.
  • the OSGi bundle producer can be determined based on the OSGi bundle's source if the person who installs the OSGi bundle knows where to get it, or a jar (Java archive) file.
  • the producer name can also be specified based on the value of the field described in the manifest file included therein.
  • the manufacturer name of each bundle could be determined by using a manifest field such as “Bundle-Vendor” or “Bundle-Copyright”.
  • the UI / startup management program 15 starts the core OSGi13 and the application OSGi14, and restarts the application OSGi14 when the application OSGi14 hangs up.
  • the R-OSGi bundle S133 on the core OSGi13 and the R-OSGi bundle C141 on the application OSGi14 are automatically established in accordance with the setting information set in advance by the user after the core OSGi13 and the application OSGi14 are activated.
  • the UI / startup management program 15 also provides a UI function.
  • the UI indicates a CUI (Character-based User Interface) or GUI (Graphical User Interface) for operating the OSGi framework after the user starts the OSGi framework.
  • the OSGi framework presented to the user as an operation target by the UI / startup management program 15 is a virtual OSGi 151 that virtualizes the difference between the OSGi bundles on the core OSGi 13 and the application OSGi 14.
  • the virtual OSGi 151 is basically a wrapper for the application OSGi14.
  • the virtual OSGi 151 receives a command for the OSGi framework from the user, the virtual OSGi 151 forwards the command to the application OSGi 14, and receives the command execution result returned from the application OSGi 14 and forwards it to the user.
  • the user does not directly operate the application OSGi14 but operates through the UI / startup management program because when the user directly starts and operates the application OSGi14, the user handles the process handle when the application OSGi14 is restarted. It is because it loses sight.
  • the virtual OSGi151 can simply appear as if the response is delayed, so the user can keep the OSGi framework process handle. Can be maintained.
  • the core OSGi13 is not a standard OSGi framework but a special OSGi framework. Was separated from the core OSGi13. Thereby, the core OSGi 13 and the application OSGi 14 can be configured as a standard OSGi framework.
  • FIG. 4 is a functional block diagram of the UI / startup management program 15.
  • the UI / startup management program 15 includes a start management unit 152 that manages restart of the application OSGi 14 and a UI unit 153 that provides a user with a UI.
  • the activation management unit 152 activates the core OSGi13 and the application OSGi14 as child processes after the UI / activation management program 15 is activated, and monitors the execution state of the application OSGi14 after the activation. When the application OSGi14 is illegally terminated, the application OSGi14 is restarted.
  • the execution and monitoring of these child processes can be realized by using the Java.lang.Runtime class and the Java.lang.Process class included in the Java standard library.
  • the application OSGi14 may be frozen instead of being terminated improperly, but this is monitored by periodically sending a command from the activation management unit 152 to the application OSGi14 and acquiring the execution result. This command transmission can also be realized by acquiring standard input / output for the application OSGi 14 from the function of the Process class.
  • the UI unit 153 provides a wrapper function for the UI of the application OSGi14. For example, a command input from the user is received through the standard input, forwarded to the standard input of the application OSGi14 through the above-described Process class, and the execution result is received from the standard output of the application OSGi14 and output to the standard output. When the application OSGi 14 hangs up and is being restarted, an error is always returned in response to a command input from the user.
  • FIG. 5 shows the flow of processing for command input from the user.
  • a process 410 is a process flow when the application OSGi14 is operating normally.
  • a process 420 is a process flow when the application OSGi14 is not operating normally.
  • FIG. 5 Process 4111
  • the user inputs a command for operating the virtual OSGi 151 with respect to the standard input.
  • FIG. 5 Process 412
  • the UI / startup management program 15 confirms that the application OSGi14 is operating normally, and forwards the command received from the standard input to the standard input of the application OSGi14.
  • FIG. 5 Process 413)
  • the application OSGi 14 executes processing of the command received from the standard input and outputs it to the standard output.
  • FIG. 5 Process 415) The user receives the command execution result from the standard output.
  • FIG. 5 Process 421) The user inputs a command for operating the OSGi framework with respect to the standard input.
  • the UI / startup management program 15 confirms the operation of the application OSGi14, and outputs an error to the standard output if the restart process is in progress. If the application OSGi14 is not operating normally, the application OSGi14 is restarted while an error is output to the standard output.
  • FIG. 5 Process 4233
  • the user receives an error from standard output.
  • FIG. 6 is a diagram showing an operation flow of the host 10. Hereinafter, each step of FIG. 6 will be described.
  • Step S600 The user starts the UI / startup management program 15 from the CUI (command line).
  • Step S601 The UI / startup management program 15 starts the core OSGi13 and the application OSGi14 as child processes.
  • Step S602 The core OSGi 13 and the application OSGi 14 establish R-OSGi linkage using the IP address and TCP port preset by the user via the R-OSGi bundle S133 and the R-OSGi bundle C141. As a result, the OSGi bundle on the core OSGi13 can be used from the application OSGi14.
  • Step S603 The UI / startup management program 15 monitors the execution state of the application OSGi14.
  • Step S604 The UI / startup management program 15 proceeds to the process of step 605 when the application OSGi14 is frozen, and proceeds to the process of step S606 when the application OSGi14 is illegally terminated.
  • Step S605 The UI / startup management program 15 ends the application OSGi14 process, and the process advances to step S606.
  • Step S606> The UI / startup management program 15 restarts the application OSGi14.
  • the host 10 includes the core OSGi13 and the application OSGi14, exports a bundle from the core OSGi13 to the application OSGi14, and monitors the operation of the application OSGi14.
  • the OSGi framework that executes the core bundle can be separated from the OSGi framework that executes the application bundle while the application OSGi14 uses the function of the core bundle, so even if the reliability of the application bundle cannot be ensured. The reliability of the core bundle can be maintained.
  • the host 10 since the host 10 according to the first embodiment executes the core bundle and the application bundle as OSGi bundles, the memory consumption can be suppressed as compared with the case where these are executed as individual application processes.
  • the function of the UI / startup management program 15 can be incorporated as a part of the core OSGi 13.
  • the core OSGi 13 is different from the standard OSGi framework.
  • the number of the application OSGi14 is not necessarily one.
  • the UI / activation management program 15 individually monitors the operation of each application OSGi14.
  • FIG. 7 is a configuration diagram of the OSGi system according to the third embodiment.
  • the UI / startup management program 15, the core OSGi13, and the application OSGi14 are divided into a management apparatus 100, a core OSGi apparatus 200, and an application OSGi apparatus 300, respectively. Each device is connected via a network.
  • the management apparatus 100 monitors the operation of the application OSGi 14 that operates on the application OSGi apparatus 300.
  • a program for monitoring the operation of the application OSGi14 may be installed on the application OSGi device 300, and the management device 100 may monitor the operation of the application OSGi14 via this program.
  • the function of the management apparatus 100 can be integrated with the core OSGi 13 of the core OSGi apparatus 200 as in the second embodiment.
  • the core OSGi 13 of the core OSGi apparatus 200 and the application OSGi 14 of the application OSGi apparatus 300 export / import the OSGi bundle via the R-OSGi as in the first and second embodiments. Similar to the second embodiment, a plurality of application OSGi devices 300 may be provided. In this case, the management apparatus 100 monitors the operation of each application OSGi apparatus 300 individually.
  • the present invention is not limited to the above-described embodiment, and includes various modifications.
  • the above embodiment has been described in detail for easy understanding of the present invention, and is not necessarily limited to the one having all the configurations described.
  • a part of the configuration of one embodiment can be replaced with the configuration of another embodiment.
  • the configuration of another embodiment can be added to the configuration of a certain embodiment. Further, with respect to a part of the configuration of each embodiment, another configuration can be added, deleted, or replaced.
  • the above components, functions, processing units, processing means, etc. may be realized in hardware by designing some or all of them, for example, with an integrated circuit.
  • Each of the above-described configurations, functions, and the like may be realized by software by interpreting and executing a program that realizes each function by the processor.
  • Information such as programs, tables, and files for realizing each function can be stored in a recording device such as a memory, a hard disk, an SSD (Solid State Drive), or a recording medium such as an IC card, an SD card, or a DVD.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

Provided is a technology that maintains the overall reliability of an OSGi framework even when an OSGi bundle not enabling reliability to be guaranteed is executed. This OSGi execution device is provided with a first OSGi framework unit and a second OSGi framework unit, exports an OSGi bundle from the first OSGi framework unit to the second OSGi framework unit, and restarts the second OSGi framework unit if said second OSGi framework unit does not run normally.

Description

OSGi実行装置、OSGiシステムOSGi execution device, OSGi system
 本発明は、OSGiフレームワークの信頼性を高める技術に関する。 The present invention relates to a technique for improving the reliability of the OSGi framework.
 OSGiフレームワークとは、Java(登録商標)Virtual Machine上で動作し、JavaプログラムをPluginモジュールとして取り扱い、動的に追加・実行できるようにする、サービスプラットフォームである。OSGiフレームワークは、OSGi Allianceによって開発・定義されている(非特許文献1)。Pluginモジュールとして扱われるOSGiフレームワーク上のJavaプログラムのことをOSGiバンドルと呼ぶ。 The OSGi framework is a service platform that operates on Java (registered trademark) Virtual Machine, handles Java programs as Plugin modules, and can be dynamically added and executed. The OSGi framework is developed and defined by OSGi Alliance (Non-Patent Document 1). A Java program on the OSGi framework handled as a Plugin module is called an OSGi bundle.
 例えば、OSGiフレームワークを使用せず、C言語等を用いてアプリを開発する場合と比較して以下の違いがある。まず、OSGiフレームワークはJava上で動作するため、環境に合わせたOSGiバンドルの再開発・修正が必要ない。次に、OSGiフレームワークは1つのJavaアプリ、つまりOSからみた場合1つのプロセスとして実行され各OSGiバンドルは全てこの1プロセス内で実行されるためメモリ使用量が少なく、メモリの少ない組み込み機器上での開発に適している。さらには、各OSGiバンドル同士は動的に機能連携できるため、後から容易に機能追加できる。 For example, there are the following differences compared to the case of developing an application using C language or the like without using the OSGi framework. First, since the OSGi framework operates on Java, it is not necessary to redevelop and modify the OSGi bundle according to the environment. Next, the OSGi framework is executed as one Java application, that is, as one process when viewed from the OS, and each OSGi bundle is executed within this one process. Suitable for development. Furthermore, since the OSGi bundles can dynamically cooperate with each other, functions can be easily added later.
 下記非特許文献2に記載されているR-OSGiは、複数のOSGiフレームワークを稼動させている場合において、各OSGiフレームワーク間でOSGiバンドルをインポート/エクスポートする機能を備えている。R-OSGi自身もOSGiバンドルとして構成されている。 R-OSGi described in Non-Patent Document 2 below has a function of importing / exporting an OSGi bundle between OSGi frameworks when a plurality of OSGi frameworks are operating. R-OSGi itself is also configured as an OSGi bundle.
 OSGiフレームワークおよびその上で動作するOSGiバンドル群は、1つのプロセスとして実行される。これにより省メモリを実現しているが、同時に、1つのOSGiバンドルがハングアップすると、OSGiフレームワークおよび他のOSGiバンドルも一緒にハングアップしてしまうという課題がある。 The OSGi framework and the OSGi bundle group operating on it are executed as one process. This saves memory, but at the same time, if one OSGi bundle hangs up, the OSGi framework and other OSGi bundles also hang up together.
 これはOSGiフレームワークの開発元が全てのOSGiバンドルを開発し、各OSGiバンドルの動作の信頼性(可用性)を保証できる場合には問題とはならないが、サードパーティが作成したOSGiバンドルを一緒に実行する場合、そのOSGiバンドルひいてはOSGiフレームワーク全体の信頼性を保証できなくなる可能性がある。 This is not a problem if the OSGi framework developer has developed all OSGi bundles and can guarantee the reliability (availability) of the operation of each OSGi bundle, but together with OSGi bundles created by third parties When executed, there is a possibility that the reliability of the OSGi bundle and thus the entire OSGi framework cannot be guaranteed.
 本発明は、上記のような課題を解決するためになされたものであり、信頼性を保証できないOSGiバンドルを実行した場合にもOSGiフレームワーク全体としての信頼性を保つ技術を提供することを目的とする。 The present invention has been made to solve the above-described problems, and it is an object of the present invention to provide a technique for maintaining the reliability of the OSGi framework as a whole even when an OSGi bundle whose reliability cannot be guaranteed is executed. And
 本発明に係るOSGi実行装置は、第1および第2OSGiフレームワーク部を備え、第1OSGiフレームワーク部から第2OSGiフレームワーク部へOSGiバンドルをエクスポートし、第2OSGiフレームワーク部が正常稼動していない場合はこれを再起動する。 The OSGi execution apparatus according to the present invention includes the first and second OSGi framework units, the OSGi bundle is exported from the first OSGi framework unit to the second OSGi framework unit, and the second OSGi framework unit is not operating normally. Restart this.
 本発明に係るOSGi実行装置によれば、OSGiの省メモリとOSGiバンドル間の動的な連携という特徴を保ちつつ、信頼性を保証できないOSGiバンドルが第2OSGiフレームワーク部上でハングアップした場合でも、第1OSGiフレームワーク部上の重要なOSGiバンドルを実行させ続けることができる。 According to the OSGi execution apparatus according to the present invention, even when an OSGi bundle that cannot guarantee reliability is maintained while maintaining the feature of dynamic linkage between the OSGi memory saving and the OSGi bundle, even if the OSGi bundle hangs up on the second OSGi framework unit The important OSGi bundle on the first OSGi framework unit can continue to be executed.
実施形態1に係るホスト10の構成図である。1 is a configuration diagram of a host 10 according to Embodiment 1. FIG. R-OSGi技術の概要を示す図である。1 is a diagram illustrating an outline of R-OSGi technology. FIG. ホスト10の動作を概念的に表した図である。FIG. 3 is a diagram conceptually showing the operation of the host 10. UI・起動管理プログラム15の機能ブロック図である。3 is a functional block diagram of a UI / startup management program 15. FIG. ユーザからのコマンド入力に対する処理の流れを示す。The flow of processing for command input from the user is shown. ホスト10の動作フローを示す図である。3 is a diagram illustrating an operation flow of the host 10. FIG. 実施形態3に係るOSGiシステムの構成図である。It is a block diagram of the OSGi system which concerns on Embodiment 3.
<実施の形態1:システム構成>
 図1は、本発明の実施形態1に係るホスト10の構成図である。ホスト10は、OSGiフレームワークを実行する装置であり、OS11、JavaVM121、122、123を備える。また、OS11と各JavaVMを実行するプロセッサを備える。記載の便宜上、図1ではOS11とプロセッサを一体的に示した。
<Embodiment 1: System configuration>
FIG. 1 is a configuration diagram of a host 10 according to the first embodiment of the present invention. The host 10 is a device that executes the OSGi framework, and includes an OS 11 and Java VMs 121, 122, and 123. In addition, a processor that executes the OS 11 and each Java VM is provided. For convenience of description, FIG. 1 shows the OS 11 and the processor integrally.
 JavaVM121~123は、OS11上で実行される。JavaVM121は、UI・起動管理プログラム15を実行する。JavaVM122は、コアOSGi13を実行する。JavaVM123は、アプリOSGi14を実行する。図1上でJavaVMを3つに分けているのは、各JavaVMが別プロセスとして動いていることを明示するためである。OS11から見れば、コアOSGi13、アプリOSGi14、UI・起動管理プログラム15という3つのJavaプロセスが動いていることになる。 Java VMs 121 to 123 are executed on the OS 11. The Java VM 121 executes the UI / startup management program 15. The Java VM 122 executes the core OSGi13. The Java VM 123 executes the application OSGi14. The reason why the Java VM is divided into three in FIG. 1 is to clearly show that each Java VM is operating as a separate process. From the viewpoint of the OS 11, three Java processes of the core OSGi 13, the application OSGi 14, and the UI / startup management program 15 are running.
 コアOSGi13とアプリOSGi14は、OSGi仕様にしたがって実装されたOSGiフレームワークである。 Core OSGi13 and application OSGi14 are OSGi frameworks implemented according to the OSGi specification.
 コアOSGi13は、高い可用性が求められるOSGiバンドル(以下ではコアバンドルと呼ぶ)を実行するOSGiフレームワークであり、コアバンドルA131、コアバンドルB132、R-OSGiバンドルS133を実行する。 The core OSGi 13 is an OSGi framework that executes an OSGi bundle (hereinafter referred to as a core bundle) that requires high availability, and executes a core bundle A131, a core bundle B132, and an R-OSGi bundle S133.
 アプリOSGi14は、必ずしも高い可用性を求められないOSGiバンドル(以下ではアプリバンドルと呼ぶ)を実行するOSGiフレームワークであり、R-OSGiバンドルC141、アプリバンドルX144、アプリバンドルY145を実行する。さらに、コアOSGi13からコアバンドルA131とコアバンドルB132をインポートし、コアバンドルA142およびコアバンドルB143として実行する。 The application OSGi14 is an OSGi framework that executes an OSGi bundle (hereinafter referred to as an application bundle) that does not necessarily require high availability, and executes an R-OSGi bundle C141, an application bundle X144, and an application bundle Y145. Further, the core bundle A131 and the core bundle B132 are imported from the core OSGi13 and executed as the core bundle A142 and the core bundle B143.
 R-OSGiバンドルS133とR-OSGiバンドルC141は、それぞれ「エクスポート部」と「インポート部」に相当する。 The R-OSGi bundle S133 and the R-OSGi bundle C141 correspond to an “export unit” and an “import unit”, respectively.
<実施の形態1:R-OSGi>
 図2は、R-OSGi技術の概要を示す図である。R-OSGiは、OSGiフレームワーク間でOSGiバンドルを相互にエクスポート/インポートする機能を提供する。図2では、コアOSGi13からコアバンドルA131をアプリOSGi14へエクスポートし、アプリOSGi14はコアバンドルA131をインポートしてコアバンドルA142として実行する。R-OSGi自身もOSGiバンドルとして実装されており、OSGiフレームワーク自体には改変を加える必要はない。
<Embodiment 1: R-OSGi>
FIG. 2 is a diagram showing an outline of the R-OSGi technology. R-OSGi provides a function for mutually exporting / importing OSGi bundles between OSGi frameworks. In FIG. 2, the core bundle A131 is exported from the core OSGi13 to the application OSGi14, and the application OSGi14 imports the core bundle A131 and executes it as the core bundle A142. R-OSGi itself is also implemented as an OSGi bundle, and there is no need to modify the OSGi framework itself.
 コアOSGi13上でR-OSGiバンドルS133が起動されると、R-OSGiバンドルS133はユーザの指定したTCPポートを介してR-OSGiバンドルC141からの接続を待ち受ける。 When the R-OSGi bundle S133 is activated on the core OSGi13, the R-OSGi bundle S133 waits for a connection from the R-OSGi bundle C141 via the TCP port designated by the user.
 アプリOSGi14上で起動されたR-OSGiバンドルC141は、ユーザによって指定されたIPアドレスおよびTCPポートを用いて、R-OSGiバンドルS133との接続を確立する。 The R-OSGi bundle C141 activated on the application OSGi14 establishes a connection with the R-OSGi bundle S133 using the IP address and TCP port specified by the user.
 R-OSGiバンドルS133は、コアOSGi13上のOSGiバンドルであるコアバンドルA131とその提供するメソッドについての情報を取得し、TCP/IP接続を通じてR-OSGiバンドルC141にエクスポートする。それらの情報を受け取ったR-OSGiバンドルC141は、仮想的なOSGiバンドルであるコアバンドルA142を作成し、アプリOSGi14上で実行する。コアバンドルA142は、コアバンドルA131が持つのと同じメソッドのインターフェースは持つが、それらメソッドの実装は持たないOSGiバンドルである。 The R-OSGi bundle S133 acquires information about the core bundle A131 that is the OSGi bundle on the core OSGi13 and the method provided by the core bundle, and exports the information to the R-OSGi bundle C141 through the TCP / IP connection. The R-OSGi bundle C141 that has received the information creates a core bundle A142 that is a virtual OSGi bundle and executes it on the application OSGi14. The core bundle A 142 is an OSGi bundle that has the same method interface as the core bundle A 131 but does not have the implementation of those methods.
 アプリOSGi14上のOSGiバンドルであるアプリバンドルX144がコアバンドルA142のメソッドを呼び出した場合、コアバンドルA142はその呼び出しをR-OSGiバンドルC141にフォワードする。R-OSGiバンドルC141はそれを更にR-OSGiバンドルS133にフォワードする。 When the application bundle X144 that is the OSGi bundle on the application OSGi14 calls the method of the core bundle A142, the core bundle A142 forwards the call to the R-OSGi bundle C141. The R-OSGi bundle C141 further forwards it to the R-OSGi bundle S133.
 そのメソッド呼び出しを受け取ったR-OSGiバンドルS133は、コアバンドルA142に対応するコアバンドルA131のメソッドを呼び出して実行し、その実行結果をR-OSGiバンドルC141にフォワードする。それを受け取ったR-OSGiバンドルC141それを更にコアバンドルA142にフォワードし、コアバンドルA142はそれをアプリバンドルX144に返す。 The R-OSGi bundle S133 that has received the method call calls and executes the method of the core bundle A131 corresponding to the core bundle A142, and forwards the execution result to the R-OSGi bundle C141. The received R-OSGi bundle C141 is further forwarded to the core bundle A142, and the core bundle A142 returns it to the application bundle X144.
 アプリバンドルX144から見ると、コアバンドルA142はアプリOSGi14に存在しているものであるかのように見える。これにより、アプリOSGi14上でコアOSGi13上のコアバンドルA131の機能を提供しつつ、コアバンドルA131とアプリバンドル144を切り分けることができる。すなわち、アプリバンドル144がハングアップにより正常稼動しなくなっても、その影響はコアバンドルA131に及ばない。 When viewed from the application bundle X144, the core bundle A142 appears to be present in the application OSGi14. Accordingly, the core bundle A131 and the application bundle 144 can be separated while providing the function of the core bundle A131 on the core OSGi13 on the application OSGi14. That is, even if the application bundle 144 does not operate normally due to a hang-up, the influence does not reach the core bundle A131.
 コアバンドルとして実装されるバンドルは、ハングアップやダウンさせたくない機能がこれに該当する。例えば、ログ機能、通信機能、セキュリティ機能などが考えられる。これらの機能はシステムの基本要素であるから、アプリバンドルがこれら機能を利用する場合が比較的多いと考えられる。したがって、単にコアOSGi13とアプリOSGi14を分離してコアOSGi13を安定的に実行すればよいというものではなく、両者が連携することが必要になるのである。 Bundles implemented as core bundles correspond to functions that you do not want to hang up or down. For example, a log function, a communication function, a security function, etc. can be considered. Since these functions are basic elements of the system, it is considered that application bundles often use these functions. Therefore, the core OSGi 13 and the application OSGi 14 are not simply separated and the core OSGi 13 need only be stably executed, and the two need to cooperate with each other.
 なお、本実施形態1ではOSGiバンドルをエクスポート/インポートしてOSGiフレームワーク同士を連携させる手段としてR-OSGiを例示したが、同様の機能を実現することができれば、その他の手段を用いてもよい。 In the first embodiment, R-OSGi is exemplified as means for exporting / importing an OSGi bundle to link OSGi frameworks with each other. However, other means may be used as long as the same function can be realized. .
<実施の形態1:システム動作の概略>
 図3は、ホスト10の動作を概念的に表した図である。コアOSGi13とアプリOSGi14は、R-OSGiバンドルS133とR-OSGiバンドルC141によって連携している。より具体的には、R-OSGiバンドルS133がコアOSGi13上のコアバンドルA131およびコアバンドルB132をエクスポートし、R-OSGiバンドルC141がそれらのOSGiバンドルをアプリOSGi14にインポートしている。
<Embodiment 1: Overview of System Operation>
FIG. 3 is a diagram conceptually showing the operation of the host 10. The core OSGi 13 and the application OSGi 14 are linked by an R-OSGi bundle S133 and an R-OSGi bundle C141. More specifically, the R-OSGi bundle S133 exports the core bundle A131 and the core bundle B132 on the core OSGi13, and the R-OSGi bundle C141 imports these OSGi bundles into the application OSGi14.
 アプリOSGi14上の他のOSGiバンドル、例えばアプリバンドルX144から見ると、コアバンドルA142とコアバンドルB143はアプリOSGi14上で実行されているように見える。 When viewed from another OSGi bundle on the application OSGi14, for example, the application bundle X144, the core bundle A142 and the core bundle B143 appear to be executed on the application OSGi14.
 OSGiフレームワークを利用するユーザは、OSGiバンドルをインポートする側のアプリOSGi14に対して、OSGiバンドルを呼び出すよう要求し、任意のOSGiバンドルをインストールし、または管理操作を実施する。コアOSGi13上のバンドルとアプリOSGi14上のバンドルが全て利用できるのはアプリOSGi14の方だからである。 The user who uses the OSGi framework requests the application OSGi14 that imports the OSGi bundle to call the OSGi bundle, installs an arbitrary OSGi bundle, or performs a management operation. This is because the bundle on the core OSGi13 and the bundle on the application OSGi14 can all be used by the application OSGi14.
 仮に、ユーザがコアOSGi13に対して操作を実施すると仮定する。この場合、信頼性(可用性)を保証できないサードパーティ製のOSGiバンドルをコアOSGi13上にインストールすることができる。そうすると、信頼性の低いOSGiバンドルがコアOSGi13をハングアップさせてしまう可能性が高くなるので、コアバンドルA131などの信頼性もこれに引きずられて信頼性が低下する。そこで本発明では、ユーザが操作する対象はアプリOSGi14とした。 Suppose that the user performs an operation on the core OSGi13. In this case, a third-party OSGi bundle that cannot guarantee reliability (availability) can be installed on the core OSGi13. Then, since there is a high possibility that the OSGi bundle with low reliability hangs up the core OSGi13, the reliability of the core bundle A131 and the like is also dragged by this and the reliability is lowered. Therefore, in the present invention, the object operated by the user is the application OSGi14.
 なお、コアバンドルの製作者とアプリバンドルの製作者は異なる可能性があるが、これら製作者と各OSGiフレームワークの製作者は必ずしも同一でなくともよい。すなわちコアバンドルの製作者は信頼性を何らかの手段で確認することができればよく、必ずしもOSGiフレームワークの製作者と同一でなくともよい。また、コアOSGi13とアプリOSGi14を分離しているのは、アプリバンドルが必ずしも信頼性を確保できない可能性があることに鑑みたものであるが、信頼性を確保できるアプリバンドルをアプリOSGi14上で実行することを排除するものではない。 Note that there is a possibility that the creator of the core bundle and the creator of the application bundle may be different, but these producers and the producers of each OSGi framework do not necessarily have to be the same. That is, the producer of the core bundle only needs to be able to confirm the reliability by some means, and is not necessarily the same as the producer of the OSGi framework. The reason why the core OSGi13 and the application OSGi14 are separated is that the application bundle may not necessarily ensure the reliability, but the application bundle that can ensure the reliability is executed on the application OSGi14. It does not exclude doing.
 OSGiバンドルの製作者が誰であるかについては、OSGiフレームワーク上へOSGiバンドルをインストールする者がその入手先を把握していればこれに基づき判断することもできるし、jar(Javaアーカイブ)ファイル内に含まれているマニフェストファイルに記載されているフィールドの値に基づき製作者名を特定することもできる。OSGi仕様においては、「Bundle-Vendor」「Bundle-Copyright」などのマニフェストフィールドを用いて各バンドルの製作者名を判断することができるであろう。 The OSGi bundle producer can be determined based on the OSGi bundle's source if the person who installs the OSGi bundle knows where to get it, or a jar (Java archive) file. The producer name can also be specified based on the value of the field described in the manifest file included therein. In the OSGi specification, the manufacturer name of each bundle could be determined by using a manifest field such as “Bundle-Vendor” or “Bundle-Copyright”.
 UI・起動管理プログラム15はコアOSGi13とアプリOSGi14を起動し、アプリOSGi14がハングアップした場合にはアプリOSGi14を再起動する。コアOSGi13上のR-OSGiバンドルS133とアプリOSGi14上のR-OSGiバンドルC141は、それぞれコアOSGi13とアプリOSGi14が起動した後、あらかじめユーザが設定した設定情報にしたがって自動的に連携を確立する。 The UI / startup management program 15 starts the core OSGi13 and the application OSGi14, and restarts the application OSGi14 when the application OSGi14 hangs up. The R-OSGi bundle S133 on the core OSGi13 and the R-OSGi bundle C141 on the application OSGi14 are automatically established in accordance with the setting information set in advance by the user after the core OSGi13 and the application OSGi14 are activated.
 UI・起動管理プログラム15はUI機能も提供する。ここでのUIとは、ユーザがOSGiフレームワークを起動した後にそのOSGiフレームワークを操作するためのCUI(Character-based User Interface)またはGUI(Graphical User Interface)を指すものとする。UI・起動管理プログラム15が操作対象としてユーザに提示するOSGiフレームワークは、コアOSGi13上およびアプリOSGi14上のOSGiバンドルの違いを仮想化した仮想OSGi151である。 The UI / startup management program 15 also provides a UI function. Here, the UI indicates a CUI (Character-based User Interface) or GUI (Graphical User Interface) for operating the OSGi framework after the user starts the OSGi framework. The OSGi framework presented to the user as an operation target by the UI / startup management program 15 is a virtual OSGi 151 that virtualizes the difference between the OSGi bundles on the core OSGi 13 and the application OSGi 14.
 仮想OSGi151は、基本的にはアプリOSGi14のラッパである。仮想OSGi151は、ユーザからOSGiフレームワークに対するコマンドを受け取るとそれをアプリOSGi14にフォワードし、アプリOSGi14から返されたコマンド実行結果を受け取ってユーザにフォワードする。 The virtual OSGi 151 is basically a wrapper for the application OSGi14. When the virtual OSGi 151 receives a command for the OSGi framework from the user, the virtual OSGi 151 forwards the command to the application OSGi 14, and receives the command execution result returned from the application OSGi 14 and forwards it to the user.
 ユーザが直接アプリOSGi14を操作するのではなくUI・起動管理プログラムを通して操作するようにしているのは、ユーザが直接アプリOSGi14を起動し操作するとアプリOSGi14が再起動された際にユーザがそのプロセスハンドルを見失ってしまうためである。仮想OSGi151を介してアプリOSGi14を操作する場合、アプリOSGi14がダウンしても仮想OSGi151上では単にレスポンスが遅れているかのように見せることができるので、ユーザはOSGiフレームワークのプロセスハンドルを保持したまま維持することができる。 The user does not directly operate the application OSGi14 but operates through the UI / startup management program because when the user directly starts and operates the application OSGi14, the user handles the process handle when the application OSGi14 is restarted. It is because it loses sight. When operating the application OSGi14 via the virtual OSGi151, even if the application OSGi14 goes down, the virtual OSGi151 can simply appear as if the response is delayed, so the user can keep the OSGi framework process handle. Can be maintained.
 UI・起動管理プログラム15がコアOSGi13と別プロセスとなっているのは、単に簡単のためである。UI・起動管理プログラムをコアOSGi13に組み込んだ場合、コアOSGi13は標準的なOSGiフレームワークではなく、特殊なOSGiフレームワークとなってしまうので、これを避けるため本実施形態1ではUI・起動管理プログラムをコアOSGi13から切り離すこととした。これにより、コアOSGi13とアプリOSGi14は標準的なOSGiフレームワークとして構成することができる。 The reason why the UI / boot management program 15 is a separate process from the core OSGi 13 is simply for simplicity. When the UI / startup management program is incorporated into the core OSGi13, the core OSGi13 is not a standard OSGi framework but a special OSGi framework. Was separated from the core OSGi13. Thereby, the core OSGi 13 and the application OSGi 14 can be configured as a standard OSGi framework.
<実施の形態1:UI・起動管理プログラム15の詳細>
 図4は、UI・起動管理プログラム15の機能ブロック図である。UI・起動管理プログラム15は、アプリOSGi14の再起動を管理する起動管理部152、ユーザにUIを提供するUI部153を有する。
<First Embodiment: Details of UI / Startup Management Program 15>
FIG. 4 is a functional block diagram of the UI / startup management program 15. The UI / startup management program 15 includes a start management unit 152 that manages restart of the application OSGi 14 and a UI unit 153 that provides a user with a UI.
 起動管理部152は、UI・起動管理プログラム15が起動した後にコアOSGi13とアプリOSGi14を子プロセスとして起動し、これらが起動した後はアプリOSGi14の実行状態を監視する。アプリOSGi14が不正終了した場合は、アプリOSGi14を起動し直す。これら子プロセスの実行と監視は、Javaの標準ライブラリに含まれるjava.lang.Runtimeクラスおよびjava.lang.Processクラスを使用することにより実現できる。アプリOSGi14については不正終了でなくフリーズ状態になってしまうことも考えられるが、それについては起動管理部152から定期的にアプリOSGi14にコマンドを送り実行結果を取得することにより監視する。このコマンド送信も上記Processクラスの機能よりアプリOSGi14に対する標準入出力を取得することによって実現できる。 The activation management unit 152 activates the core OSGi13 and the application OSGi14 as child processes after the UI / activation management program 15 is activated, and monitors the execution state of the application OSGi14 after the activation. When the application OSGi14 is illegally terminated, the application OSGi14 is restarted. The execution and monitoring of these child processes can be realized by using the Java.lang.Runtime class and the Java.lang.Process class included in the Java standard library. The application OSGi14 may be frozen instead of being terminated improperly, but this is monitored by periodically sending a command from the activation management unit 152 to the application OSGi14 and acquiring the execution result. This command transmission can also be realized by acquiring standard input / output for the application OSGi 14 from the function of the Process class.
 UI部153は、アプリOSGi14のUIに対するラッパ機能を提供する。例えば、標準入力を通じてユーザからのコマンド入力を受け付け、先述のProcessクラスを通じてアプリOSGi14の標準入力にフォワードし、その実行結果をアプリOSGi14の標準出力から受け取って標準出力に出力する。アプリOSGi14がハングアップして再起動処理中である場合は、ユーザからのコマンド入力に対し常にエラーを返す。 The UI unit 153 provides a wrapper function for the UI of the application OSGi14. For example, a command input from the user is received through the standard input, forwarded to the standard input of the application OSGi14 through the above-described Process class, and the execution result is received from the standard output of the application OSGi14 and output to the standard output. When the application OSGi 14 hangs up and is being restarted, an error is always returned in response to a command input from the user.
<実施の形態1:システム動作の詳細>
 図5は、ユーザからのコマンド入力に対する処理の流れを示す。処理410はアプリOSGi14が正常に動作している場合の処理の流れである。処理420はアプリOSGi14が正常稼動してない場合の処理の流れである。
<Embodiment 1: Details of system operation>
FIG. 5 shows the flow of processing for command input from the user. A process 410 is a process flow when the application OSGi14 is operating normally. A process 420 is a process flow when the application OSGi14 is not operating normally.
(図5:処理411)
 ユーザは標準入力に対し仮想OSGi151を操作するコマンドを入力する。
(FIG. 5: Process 411)
The user inputs a command for operating the virtual OSGi 151 with respect to the standard input.
(図5:処理412)
 UI・起動管理プログラム15はアプリOSGi14が正常動作していることを確認し、標準入力より受け取ったコマンドをアプリOSGi14の標準入力にフォワードする。
(FIG. 5: Process 412)
The UI / startup management program 15 confirms that the application OSGi14 is operating normally, and forwards the command received from the standard input to the standard input of the application OSGi14.
(図5:処理413)
 アプリOSGi14は、標準入力より受け取ったコマンドの処理を実行し、標準出力に出力する。
(FIG. 5: Process 413)
The application OSGi 14 executes processing of the command received from the standard input and outputs it to the standard output.
(図5:処理414)
 UI・起動管理プログラム15はアプリOSGi14の標準出力より受け取ったコマンド実行結果を標準出力にフォワードする。
(Figure 5: Process 414)
The UI / startup management program 15 forwards the command execution result received from the standard output of the application OSGi14 to the standard output.
(図5:処理415)
 ユーザは標準出力からコマンド実行結果を受け取る。
(FIG. 5: Process 415)
The user receives the command execution result from the standard output.
(図5:処理421)
 ユーザは標準入力に対しOSGiフレームワークを操作するコマンドを入力する。
(FIG. 5: Process 421)
The user inputs a command for operating the OSGi framework with respect to the standard input.
(図5:処理422)
 UI・起動管理プログラム15はアプリOSGi14の動作を確認し、再起動処理中であればエラーを標準出力に出力する。アプリOSGi14が正常稼動していない場合は、アプリOSGi14を再起動する一方で、標準出力にエラーを出力する。
(FIG. 5: Process 422)
The UI / startup management program 15 confirms the operation of the application OSGi14, and outputs an error to the standard output if the restart process is in progress. If the application OSGi14 is not operating normally, the application OSGi14 is restarted while an error is output to the standard output.
(図5:処理423)
 ユーザは標準出力からエラーを受け取る。
(FIG. 5: Process 423)
The user receives an error from standard output.
 図6は、ホスト10の動作フローを示す図である。以下、図6の各ステップについて説明する。 FIG. 6 is a diagram showing an operation flow of the host 10. Hereinafter, each step of FIG. 6 will be described.
(図6:ステップS600)
 ユーザがCUI(コマンドライン)よりUI・起動管理プログラム15を起動する。
(FIG. 6: Step S600)
The user starts the UI / startup management program 15 from the CUI (command line).
(図6:ステップS601)
 UI・起動管理プログラム15はコアOSGi13とアプリOSGi14を子プロセスとして起動する。
(FIG. 6: Step S601)
The UI / startup management program 15 starts the core OSGi13 and the application OSGi14 as child processes.
(図6:ステップS602)
 コアOSGi13とアプリOSGi14は、R-OSGiバンドルS133およびR-OSGiバンドルC141を介して、ユーザによってあらかじめ設定されたIPアドレスとTCPポートを用いてりR-OSGi連携を確立する。これによりアプリOSGi14上からコアOSGi13上のOSGiバンドルを利用することができるようになる。
(FIG. 6: Step S602)
The core OSGi 13 and the application OSGi 14 establish R-OSGi linkage using the IP address and TCP port preset by the user via the R-OSGi bundle S133 and the R-OSGi bundle C141. As a result, the OSGi bundle on the core OSGi13 can be used from the application OSGi14.
(図6:ステップS603)
 UI・起動管理プログラム15はアプリOSGi14の実行状態を監視する。
(FIG. 6: Step S603)
The UI / startup management program 15 monitors the execution state of the application OSGi14.
(図6:ステップS604)
 UI・起動管理プログラム15は、アプリOSGi14がフリーズした場合はステップ605の処理に進み、不正終了した場合にはステップS606の処理に移る。
(FIG. 6: Step S604)
The UI / startup management program 15 proceeds to the process of step 605 when the application OSGi14 is frozen, and proceeds to the process of step S606 when the application OSGi14 is illegally terminated.
(図6:ステップS605)
 UI・起動管理プログラム15は、アプリOSGi14プロセスを終了させ、ステップS606に進む。
(FIG. 6: Step S605)
The UI / startup management program 15 ends the application OSGi14 process, and the process advances to step S606.
(図6:ステップS606>
 UI・起動管理プログラム15は、アプリOSGi14を再起動する。
(FIG. 6: Step S606>
The UI / startup management program 15 restarts the application OSGi14.
<実施の形態1:まとめ>
 以上のように、本実施形態1に係るホスト10は、コアOSGi13とアプリOSGi14を備え、コアOSGi13からアプリOSGi14へバンドルをエクスポートし、アプリOSGi14の動作を監視する。これにより、アプリOSGi14がコアバンドルの機能を利用しつつ、コアバンドルを実行するOSGiフレームワークとアプリバンドルを実行するOSGiフレームワークを分離することができるので、アプリバンドルの信頼性を確保できない場合でも、コアバンドルの信頼性を維持することができる。
<Embodiment 1: Summary>
As described above, the host 10 according to the first embodiment includes the core OSGi13 and the application OSGi14, exports a bundle from the core OSGi13 to the application OSGi14, and monitors the operation of the application OSGi14. As a result, the OSGi framework that executes the core bundle can be separated from the OSGi framework that executes the application bundle while the application OSGi14 uses the function of the core bundle, so even if the reliability of the application bundle cannot be ensured. The reliability of the core bundle can be maintained.
 また、本実施形態1に係るホスト10は、コアバンドルとアプリバンドルをそれぞれOSGiバンドルとして実行するので、これらを個別のアプリケーションプロセスとして実行する場合と比較して、メモリ消費量を抑えることができる。 Further, since the host 10 according to the first embodiment executes the core bundle and the application bundle as OSGi bundles, the memory consumption can be suppressed as compared with the case where these are executed as individual application processes.
<実施の形態2>
 実施形態1で説明した構成において、UI・起動管理プログラム15の機能は、コアOSGi13の一部として組み込むこともできる。この場合、コアOSGi13は標準的なOSGiフレームワークとは異なるものとなる。
<Embodiment 2>
In the configuration described in the first embodiment, the function of the UI / startup management program 15 can be incorporated as a part of the core OSGi 13. In this case, the core OSGi 13 is different from the standard OSGi framework.
 また、アプリOSGi14は必ずしも1つでなくともよい。アプリOSGi14が複数存在する場合は、UI・起動管理プログラム15は各アプリOSGi14の動作を個別に監視する。 Moreover, the number of the application OSGi14 is not necessarily one. When there are a plurality of applications OSGi14, the UI / activation management program 15 individually monitors the operation of each application OSGi14.
<実施の形態3>
 実施形態1~2では、UI・起動管理プログラム15、コアOSGi13、アプリOSGi14を単一のホスト上で実行する例を説明したが、これらのうちいずれかを他の装置上で実行し、ネットワークを介して各装置を接続して実施形態1~2と同様の動作を実現することもできる。本発明の実施形態3では、これら3つのプログラムをそれぞれ別の装置上で実行する構成例を説明する。
<Embodiment 3>
In the first and second embodiments, the example in which the UI / startup management program 15, the core OSGi13, and the application OSGi14 are executed on a single host has been described. It is also possible to realize the same operation as in the first and second embodiments by connecting the respective devices via these. In the third embodiment of the present invention, a configuration example in which these three programs are executed on different devices will be described.
 図7は、本実施形態3に係るOSGiシステムの構成図である。本実施形態3において、UI・起動管理プログラム15、コアOSGi13、アプリOSGi14は、それぞれ管理装置100、コアOSGi装置200、アプリOSGi装置300に分割して配置されている。各装置はネットワークを介して接続されている。 FIG. 7 is a configuration diagram of the OSGi system according to the third embodiment. In the third embodiment, the UI / startup management program 15, the core OSGi13, and the application OSGi14 are divided into a management apparatus 100, a core OSGi apparatus 200, and an application OSGi apparatus 300, respectively. Each device is connected via a network.
 管理装置100は、アプリOSGi装置300上で動作するアプリOSGi14の動作を監視する。例えば、アプリOSGi14の動作を監視するプログラムをアプリOSGi装置300上にインストールしておき、管理装置100はこれを介してアプリOSGi14の動作を監視すればよい。管理装置100の機能は、実施形態2と同様にコアOSGi装置200のコアOSGi13と統合することもできる。 The management apparatus 100 monitors the operation of the application OSGi 14 that operates on the application OSGi apparatus 300. For example, a program for monitoring the operation of the application OSGi14 may be installed on the application OSGi device 300, and the management device 100 may monitor the operation of the application OSGi14 via this program. The function of the management apparatus 100 can be integrated with the core OSGi 13 of the core OSGi apparatus 200 as in the second embodiment.
 コアOSGi装置200のコアOSGi13とアプリOSGi装置300のアプリOSGi14は、実施形態1~2と同様にR-OSGiを介してOSGiバンドルをエクスポート/インポートする。実施形態2と同様に、アプリOSGi装置300は複数設けることもできる。この場合、管理装置100は各アプリOSGi装置300の動作を個別に監視する。 The core OSGi 13 of the core OSGi apparatus 200 and the application OSGi 14 of the application OSGi apparatus 300 export / import the OSGi bundle via the R-OSGi as in the first and second embodiments. Similar to the second embodiment, a plurality of application OSGi devices 300 may be provided. In this case, the management apparatus 100 monitors the operation of each application OSGi apparatus 300 individually.
 本発明は上記した実施形態に限定されるものではなく、様々な変形例が含まれる。上記実施形態は本発明を分かりやすく説明するために詳細に説明したものであり、必ずしも説明した全ての構成を備えるものに限定されるものではない。また、ある実施形態の構成の一部を他の実施形態の構成に置き換えることもできる。また、ある実施形態の構成に他の実施形態の構成を加えることもできる。また、各実施形態の構成の一部について、他の構成を追加・削除・置換することもできる。 The present invention is not limited to the above-described embodiment, and includes various modifications. The above embodiment has been described in detail for easy understanding of the present invention, and is not necessarily limited to the one having all the configurations described. A part of the configuration of one embodiment can be replaced with the configuration of another embodiment. The configuration of another embodiment can be added to the configuration of a certain embodiment. Further, with respect to a part of the configuration of each embodiment, another configuration can be added, deleted, or replaced.
 上記各構成、機能、処理部、処理手段等は、それらの一部や全部を、例えば集積回路で設計する等によりハードウェアで実現してもよい。また、上記の各構成、機能等は、プロセッサがそれぞれの機能を実現するプログラムを解釈し、実行することによりソフトウェアで実現してもよい。各機能を実現するプログラム、テーブル、ファイル等の情報は、メモリ、ハードディスク、SSD(Solid State Drive)等の記録装置、ICカード、SDカード、DVD等の記録媒体に格納することができる。 The above components, functions, processing units, processing means, etc. may be realized in hardware by designing some or all of them, for example, with an integrated circuit. Each of the above-described configurations, functions, and the like may be realized by software by interpreting and executing a program that realizes each function by the processor. Information such as programs, tables, and files for realizing each function can be stored in a recording device such as a memory, a hard disk, an SSD (Solid State Drive), or a recording medium such as an IC card, an SD card, or a DVD.
 10:ホスト、11:OS、121~123:JavaVM、13:コアOSGi、131:コアバンドルA、132:コアバンドルB、133:R-OSGiバンドルS、14:アプリOSGi、141:R-OSGiバンドルC、142:コアバンドルA、143:コアバンドルB、144:アプリバンドルX、145:アプリバンドルY、15:UI・起動管理プログラム、100:管理装置、200:コアOSGi装置、300:アプリOSGi装置。 10: Host, 11: OS, 121-123: JavaVM, 13: Core OSGi, 131: Core bundle A, 132: Core bundle B, 133: R-OSGi bundle S, 14: Application OSGi, 141: R-OSGi bundle C, 142: Core bundle A, 143: Core bundle B, 144: App bundle X, 145: App bundle Y, 15: UI / startup management program, 100: Management device, 200: Core OSGi device, 300: App OSGi device .

Claims (7)

  1.  OSGiフレームワークを実行する装置であって、
     OSGiフレームワークを実行する第1および第2OSGiフレームワーク部と、
     前記第1および第2OSGiフレームワーク部の動作を管理する管理部と、
     を備え、
     前記第1OSGiフレームワーク部は、
      前記第1OSGiフレームワーク部上で実行するOSGiバンドルを、前記第1OSGiフレームワーク部上に残したまま前記第2OSGiフレームワーク部へエクスポートするエクスポート部を備え、
     前記第2OSGiフレームワーク部は、
      前記第1OSGiフレームワーク部がエクスポートしたOSGiバンドルを前記第2OSGiフレームワーク部上で実行するOSGiバンドルとしてインポートするインポート部を備え、
     前記管理部は、
      前記第2OSGiフレームワーク部の稼動状態を監視し、前記第2OSGiフレームワーク部が正常動作していない場合は、前記第2OSGiフレームワーク部を再起動する
     ことを特徴とするOSGi実行装置。
    An apparatus for executing the OSGi framework,
    First and second OSGi framework units that execute the OSGi framework;
    A management unit for managing operations of the first and second OSGi framework units;
    With
    The first OSGi framework part is:
    An export unit that exports the OSGi bundle to be executed on the first OSGi framework unit to the second OSGi framework unit while leaving the OSGi bundle on the first OSGi framework unit;
    The second OSGi framework part is
    An import unit that imports an OSGi bundle exported by the first OSGi framework unit as an OSGi bundle to be executed on the second OSGi framework unit;
    The management unit
    An operating state of the second OSGi framework unit is monitored, and when the second OSGi framework unit is not operating normally, the second OSGi framework unit is restarted.
  2.  前記管理部は、
      前記第2OSGiフレームワーク部が実行するOSGiバンドルを呼び出すよう要求するリクエストを受け取り、前記第2OSGiフレームワーク部から前記要求されたOSGiバンドルを呼び出し、
      前記第2OSGiフレームワーク部から前記要求されたOSGiバンドルを呼び出すことができない場合は、その旨のエラーを前記リクエストの要求元へ送信する
     ことを特徴とする請求項1記載のOSGi実行装置。
    The management unit
    Receiving a request for calling an OSGi bundle executed by the second OSGi framework unit, calling the requested OSGi bundle from the second OSGi framework unit;
    The OSGi execution device according to claim 1, wherein when the requested OSGi bundle cannot be called from the second OSGi framework unit, an error to that effect is transmitted to the request source of the request.
  3.  前記第1OSGiフレームワーク部が実行するOSGiバンドルの製作者と、前記第2OSGiフレームワーク部が実行するOSGiバンドルのうち前記第1OSGiフレームワーク部からインポートしたものを除くOSGiバンドルの製作者は、互いに異なる
     ことを特徴とする請求項1記載のOSGi実行装置。
    The producer of the OSGi bundle executed by the first OSGi framework unit and the producer of the OSGi bundle other than those imported from the first OSGi framework unit among the OSGi bundles executed by the second OSGi framework unit are different from each other. The OSGi execution device according to claim 1.
  4.  前記第1OSGiフレームワーク部が実行するOSGiバンドルの製作者を示すフィールドに記載されている値と、前記第2OSGiフレームワーク部が実行するOSGiバンドルのうち前記第1OSGiフレームワーク部からインポートしたものを除くOSGiバンドルの製作者を示すフィールドに記載されている値は、互いに異なる
     ことを特徴とする請求項3記載のOSGi実行装置。
    Excludes the value written in the field indicating the producer of the OSGi bundle executed by the first OSGi framework unit and the OSGi bundle executed by the second OSGi framework unit imported from the first OSGi framework unit The OSGi execution device according to claim 3, wherein values described in a field indicating an OSGi bundle producer are different from each other.
  5.  前記OSG実行装置は、複数の前記第2OSGiフレームワーク部を備え、
     前記管理部は、各前記第2OSGiフレームワーク部の動作を管理する
     ことを特徴とする請求項1記載のOSGi実行装置。
    The OSG execution device includes a plurality of the second OSGi framework units,
    The OSGi execution device according to claim 1, wherein the management unit manages an operation of each of the second OSGi framework units.
  6.  前記管理部は、前記第1OSGiフレームワーク部の一部として構成されている
     ことを特徴とする請求項1記載のOSGi実行装置。
    The OSGi execution device according to claim 1, wherein the management unit is configured as a part of the first OSGi framework unit.
  7.  OSGiフレームワークを実行する第1および第2OSGi実行装置と、
     前記第1および第2OSGi実行装置の動作を管理する管理部と、
     を備え、
     前記第1OSGi実行装置は、
      前記第1OSGi実行装置のOSGiフレームワーク上で実行するOSGiバンドルを、前記第1OSGi実行装置のOSGiフレームワーク上に残したまま前記第2OSGi実行装置へエクスポートするエクスポート部を備え、
     前記第2OSGi実行装置は、
      前記第1OSGi実行装置がエクスポートしたOSGiバンドルを前記第2OSGi実行装置のOSGiフレームワーク上で実行するOSGiバンドルとしてインポートするインポート部を備え、
     前記管理部は、
      前記第2OSGi実行装置のOSGiフレームワークの稼動状態を監視し、前記第2OSGi実行装置のOSGiフレームワークが正常動作していない場合は、前記第2OSGi実行装置のOSGiフレームワークを再起動する
     ことを特徴とするOSGiシステム。
    First and second OSGi execution devices that execute the OSGi framework;
    A management unit for managing operations of the first and second OSGi execution devices;
    With
    The first OSGi execution device includes:
    An OSGi bundle to be executed on the OSGi framework of the first OSGi execution device, and an export unit that exports the OSGi bundle to the second OSGi execution device while remaining on the OSGi framework of the first OSGi execution device;
    The second OSGi execution device is
    An import unit that imports an OSGi bundle exported by the first OSGi execution device as an OSGi bundle to be executed on the OSGi framework of the second OSGi execution device;
    The management unit
    The operating state of the OSGi framework of the second OSGi execution device is monitored, and when the OSGi framework of the second OSGi execution device is not operating normally, the OSGi framework of the second OSGi execution device is restarted. OSGi system.
PCT/JP2012/071449 2012-03-28 2012-08-24 OSGi EXECUTION DEVICE AND OSGi SYSTEM WO2013145361A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2012-073231 2012-03-28
JP2012073231A JP2013206040A (en) 2012-03-28 2012-03-28 Osgi execution device and osgi system

Publications (1)

Publication Number Publication Date
WO2013145361A1 true WO2013145361A1 (en) 2013-10-03

Family

ID=49258708

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2012/071449 WO2013145361A1 (en) 2012-03-28 2012-08-24 OSGi EXECUTION DEVICE AND OSGi SYSTEM

Country Status (2)

Country Link
JP (1) JP2013206040A (en)
WO (1) WO2013145361A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6078515B2 (en) * 2014-11-13 2017-02-08 京セラドキュメントソリューションズ株式会社 Electronic equipment and programs

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001282755A (en) * 2000-03-30 2001-10-12 Nec Corp Singly restarting system for corba in integrated device
JP2005322243A (en) * 2004-04-30 2005-11-17 Microsoft Corp Vex-virtual extension framework
JP2006163840A (en) * 2004-12-07 2006-06-22 Canon Inc Information processor and its method
EP2088741A1 (en) * 2008-02-11 2009-08-12 Alcatel Lucent Method and OSGi bundle to enable sharing of a local service on an embedded device
JP2009200803A (en) * 2008-02-21 2009-09-03 Ricoh Co Ltd Image forming apparatus, information processing method and information processing program
JP2011197827A (en) * 2010-03-17 2011-10-06 Ricoh Co Ltd Information processor, information processing method, and information processing program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001282755A (en) * 2000-03-30 2001-10-12 Nec Corp Singly restarting system for corba in integrated device
JP2005322243A (en) * 2004-04-30 2005-11-17 Microsoft Corp Vex-virtual extension framework
JP2006163840A (en) * 2004-12-07 2006-06-22 Canon Inc Information processor and its method
EP2088741A1 (en) * 2008-02-11 2009-08-12 Alcatel Lucent Method and OSGi bundle to enable sharing of a local service on an embedded device
JP2009200803A (en) * 2008-02-21 2009-09-03 Ricoh Co Ltd Image forming apparatus, information processing method and information processing program
JP2011197827A (en) * 2010-03-17 2011-10-06 Ricoh Co Ltd Information processor, information processing method, and information processing program

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
JAN S.RELLERMEYER ET AL.: "R-OSGi: distributed applications through software modularization, Middleware", 07 PROCEEDINGS OF THE ACM/IFIP/ USENIX 2007, 2007, NEW YORK, pages 1 - 20 *
TEPPEI KODAMA ET AL.: "A Proposal of a Bundle Sharing Method for OSGi Framework", FIT2008, vol. 1, 20 August 2008 (2008-08-20), pages 263 - 264 *

Also Published As

Publication number Publication date
JP2013206040A (en) 2013-10-07

Similar Documents

Publication Publication Date Title
KR102430869B1 (en) Live migration of clusters in containerized environments
KR102120567B1 (en) Monitoring of isolated applications in containers
US9251040B2 (en) Remote debugging in a cloud computing environment
US10942790B2 (en) Automated-application-release-management subsystem that incorporates script tasks within application-release-management pipelines
US20180074862A1 (en) Processing element management in a streaming data system
US9575739B2 (en) Performing unattended software installation
TWI533213B (en) Storing and resuming application runtime state
CA2851249C (en) Integrated software development and deployment architecture and high availability client-server systems generated using the architecture
US8763005B2 (en) Virtual-machine-based application-service provision of front-end versions of back-end applications
US20170329588A1 (en) Method and Deployment Module for Managing a Container to be Deployed on a Software Platform
US11709705B2 (en) Event proxies for functions-as-a-service (FaaS) infrastructures
US20140149696A1 (en) Virtual machine backup using snapshots and current configuration
JP2014241178A (en) Virtual machine morphing for heterogeneous migration environments
JP2020533665A (en) An extensible method for executing custom algorithms on media works
US11888758B2 (en) Methods and apparatus to provide a custom installable open virtualization application file for on-premise installation via the cloud
US9860119B2 (en) Dynamic management of restful endpoints
US9588947B1 (en) Integrated administrative interface for open network programming applications
WO2013145361A1 (en) OSGi EXECUTION DEVICE AND OSGi SYSTEM
US9400663B2 (en) Managing middleware using an application manager
WO2015027733A1 (en) Running method, device, and system of distributed java program
CN117319368A (en) Remote control management method and related device
JP2014194707A (en) OSGi execution device
US20140189076A1 (en) Configuration of computer systems via simple object access protocol connections
Vallée et al. Management of Virtual Large-scale High-performance Computing Systems

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12873139

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12873139

Country of ref document: EP

Kind code of ref document: A1