1 / 25

OSGi TM 简介

OSGi TM 简介. BlueDavy OSGi China User Group Director http://china.osgiusers.org. 1.0 2008-05-13. Agenda. OSGi 概述 OSGi 应用演示 OSGi 的未来 进一步学习. OSGi 概述. OSGi 的发展轨迹 OSGi 是什么 谁在用 OSGi. OSGi 的发展轨迹. 1999 年 3 月, OSGi 联盟 ( 非盈利性质 ) 成立,目标 是建立家庭网关,并通过互联网向家庭网络提供各种服务,例如通过 web 页面控制咖啡机等;.

molly-cooke
Télécharger la présentation

OSGi TM 简介

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. OSGiTM简介 BlueDavy OSGi China User Group Director http://china.osgiusers.org 1.0 2008-05-13

  2. Agenda • OSGi概述 • OSGi应用演示 • OSGi的未来 • 进一步学习 2

  3. OSGi概述 • OSGi的发展轨迹 • OSGi是什么 • 谁在用OSGi 3

  4. OSGi的发展轨迹 • 1999年3月,OSGi联盟(非盈利性质)成立,目标 是建立家庭网关,并通过互联网向家庭网络提供各种服务,例如通过web页面控制咖啡机等; 4

  5. OSGi的发展轨迹 • 2000年发布OSGi Service Platform V 1.0,2001年发布V 2.0,2003年发布V 3.0,2005年发布V 4.0,2007年发布V 4.1; Planned R4 Home Automation Vehicle Mobile Application Manager MIDP Container Signed Bundles Declarative Services Power Management Device Management Security Policies UPnP Exporter Diagnostics/Monitoring Framework Layering Initial Provisioning UPnP … R3 UPnP Initial Provisioning Name Space Jini Start Level IO Connector Wire Admin XML Parser Measurement & State Position Execution Env. R2 Package Admin Configuration Admin Permission Admin User Admin Preferences MetaType Service Tracker R1 Framework Http Log Device Access 2000 2001 2005 2003 5

  6. OSGi的发展轨迹 • Eclipse V3.0采用OSGi,使得OSGi成功进入Java企业应用领域,并成为其中重要一员; • 同时Eclipse推出了OSGi R4 RI:Equinox 6

  7. OSGi的发展轨迹 • OSGi成为JSR 232、JSR 291,正式成为Java官方规范系列成员; • 近两年来OSGi迅猛发展,已经成为业界焦点; 7

  8. OSGi是什么 • Dynamic Module System For Java • 这是OSGi最开始的定义; • 意味着基于OSGi就可以模块化的开发Java应用; • 意味着基于OSGi就可以模块化的部署Java应用; • 还可以动态的管理模块。 • Universal Middleware • 这是OSGi近年来新取的名词,目标是让OSGi脱离语言限制,成为所有语言的统一模型。 8

  9. OSGi是什么 • 作为一个Module System For Java,OSGi提供了这些: • 明确的定义了什么是模块; • 明确的定义了模块之间的交互方式; • 支持模块化的部署。 9

  10. OSGi是什么 • 明确定义模块 • 在OSGi中这不是一个虚拟的概念,而是一个实体:Bundle; • Bundle是一个普通的jar,只是其META-INF中的manifest.mf中描述了一些标准的模块的信息。 bundle bundle bundle bundle bundle Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Helloworld Plug-in Bundle-SymbolicName: helloworld Bundle-Version: 1.0.0 Bundle-Localization: plugin Bundle-Activator: helloworld.Activator Import-Package: org.osgi.framework;version="1.3.0" bundle bundle 10

  11. 明确定义模块的交互方式 以package方式交互: 通过Export-Package对外提供packages; 通过Import-Package使用其他模块的packages; Package支持版本机制; 以service方式进行交互: 符合面向接口原则; 支持IoC方式注入; 面向服务的组件模型,Single VM下SOA的一种典型实现。 Service registry packages packages OSGi是什么 OSGi Framework Bundle Bundle JAVA Operating System Hardware 11

  12. OSGi是什么 • 支持模块化的部署 • Bundle可通过多种方式部署到OSGi框架中,例如命令行、web界面、目录等等; 12

  13. Dynamic 支持模块生命周期的动态管理; 意味着可以动态的安装、启动、停止、更新和删除模块; OSGi是什么 INSTALLED STARTING start RESOLVED ACTIVE stop UNINSTALLED STOPPING 13

  14. OSGi是什么 • Dynamic • 支持模块中Service生命周期的自动管理; • 意味着自动动态的发现所需的服务并注入; • 意味着当所注入的服务不可用时将自动删除; 14

  15. OSGi是什么 • Dynamic • 支持动态的进行配置管理(类似JMX) • 意味着可以在运行期动态的调整配置; • 配置动态调整时自动通知相应感兴趣的组件。 15

  16. 谁在用OSGi • IBM • Websphere • RSA • BEA • microServices,所有BEA的产品都基于microServices上; • JBoss AS 5.0 • Sun Glassfish V3 • Eclipse • Apache • Struts 2 • Spring • Spring-DM、Spring Application Platform • Simens,Nokia,BMW,Cisco,SAP,Oracle,IONA等等 • 最近推出的很多新产品都会写上based on OSGi or run on OSGi 16

  17. Agenda • OSGi概述 • OSGi应用演示 • OSGi的未来 • 进一步学习 17

  18. OSGi应用演示 • 来看一个简单的OSGi应用的demo • 启动后看到的是一个简单的留言板应用,只有留言板列表,其他什么功能都没有; • 现在我们想给它添加一个新增留言的功能,做法是从目前的Bundle库中下载新增留言的Bundle,然后安装此Bundle并启动,刷新留言板列表页面,就看到新增留言功能被动态的添加上去了。 18

  19. OSGi应用演示 • 通过这样一个简短的演示,可以看到OSGi应用具备的特性: • 模块化; • 即插即用; • 这些特性都是OSGi直接提供的,并不需要自己去做一些特别处理来支持。 19

  20. Agenda • OSGi概述 • OSGi应用演示 • OSGi的未来 • 进一步学习 20

  21. OSGi的未来 • 随着今年年底EEG发布RFC 119,相信OSGi将在分布式应用领域占据一席之地; • 随着年底EEG发布RFC 66和Spring Application Platform为OSGi所做的改进,OSGi会成为web框架可选的底层平台之一; • OSGi与SCA的结合是必然的趋势; • Sun在JavaOne 2008上宣布:Java 7 will support OSGi,这也意味着到Java 7流行之时,OSGi会成为Java界的必备技能。 21

  22. Agenda • OSGi概述 • OSGi应用演示 • OSGi的未来 • 进一步学习 22

  23. 进一步学习 • http://china.osgiusers.org • OSGi Specifications • 《OSGi实战》Opendoc • 《OSGi进阶》Opendoc • http://www.osgi.org • http://www.aqute.biz 23

  24. 交流时间 欢迎加入我们的 http://groups.google.com/group/osgi-cn 24

  25. OSGi China User Group 谢 谢! Click to edit company slogan .

More Related