The first contact with OSGi, an online news that was seen in 2006, mentions that the BMW car's communication-entertainment (infotainment) system employs an OSGi architecture that is designed to control speakers, lighting, navigation and communications equipment on cars, The entire system consists of more than 1000 modules, starting time only need 3.5 seconds, which for a java-based framework, has two significance: first, that the Java implementation efficiency is not bad; second, the OSGi framework is particularly good performance. So the author has a great interest in the OSGi framework, and later finally in a project responsible for research and development of applications based on the OSGi framework, since then it has a unique feeling. Thankfully, OSGi made a lot of gains in 2007: BEA, Eclipse Foundation and INTERFACE21 joined the OSGi Alliance, which attracted wide attention in the Eclipsecon 2007 conference, with Spring-osgi, Technology, such as Web Service and OSGi, is the most compelling, which marks the future of OSGi in close conjunction with enterprise applications; OSGi R4 standard release, related content successfully written to the JSR 291 specification, the Spring 2.5 framework release, claiming all jar packages are compatible with OSGi Standard; Although OSGi did not succeed in the Java EE 6 Draft plan, Sun announced that it would focus on OSGi in the next generation of Java EE standards. Therefore, I personally believe that in the near future, OSGi will certainly play a strong role in enterprise applications, based on the OSGi framework of products will emerge. This article provides an overview of the OSGi framework from the historical background of OSGi, OSGi features, OSGi Open source Framework Introduction, OSGI development environment deployment, and the OSGi version of Hello World Five, which I hope readers can reap.
Historical background of OSGi
What is OSGi? Osgi--open Service Gateway Initiative literally means a common platform for services. The 1999 OSGi Alliance was established as a non-profit international organization designed to establish an open service standard and open standards for service delivery through the network, and was the initiator of open business gateways. The initial goal of the OSGi Federation is to build a platform for the business on a wide area network and LAN or device. History always has astonishing similarity, just as Java was born in an embedded development project, but was applied to the development of the network platform, the earliest design of OSGi for the embedded application, such as set-top box, service Gateway, mobile phone, car, etc. are the main environment of its application. Later, because of the many excellent features of OSGi (dynamic system behavior, hot-swappable plug-in architecture, high reusability, high efficiency, etc.), it was applied to many PC application development, so it was gradually known and loved by developers. Now that the understanding of OSGi is far from being interpreted in its literal and original sense, I think it is more precise to call it a lightweight, loosely coupled, service-oriented application development framework.
OSGi is really well known or closely related to eclipse. Eclipse has been a Java developer's preferred IDE for many years and believes that no one should be unaware of eclipse as long as it is a Java developer. In its previous version of Eclipse 3.0, it had its own plug-in system, which was designed to be highly sophisticated and admired by many developers, but the Eclipse Fund, when it was released in Eclipse 3.0, made a bold move to take eclipse Gradually migrate into the OSGi framework and implement an OSGi open source framework, named Equinox, which is updated as each eclipse is released. One of the reasons eclipse does this is because Eclipse's plug-in system coincides with OSGi's design idea, and the other is that OSGi is more canonical and has a more complete definition of the plug-in system. It turns out that eclipse, after adopting the OSGi architecture, has been hugely successful in terms of performance, scalability, and two development perspectives. The following illustration shows the relationship between Eclipse and the OSGi framework.