1 / 14

JavaScript Micro Services Simon Kaegi 27 March 2012

JavaScript Micro Services Simon Kaegi 27 March 2012. What are Micro Services?. OSGi minus the modularity. … about software development in a browser. Orion and OSGi Modularity. e4 – OSGi style modularity in JavaScript { " Bundle-SymbolicName ":"sample.jsbundle", " Bundle-Version ":"1.0",

liesel
Download Presentation

JavaScript Micro Services Simon Kaegi 27 March 2012

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. JavaScript Micro Services Simon Kaegi 27 March 2012

  2. What are Micro Services? • OSGi minus the modularity

  3. … about software development in a browser

  4. Orion and OSGi Modularity • e4 – OSGi style modularity in JavaScript { "Bundle-SymbolicName":"sample.jsbundle", "Bundle-Version":"1.0", "Bundle-ScriptPath":"script.js", "Import-Package":"a.resource;version=[1.0.0,2.0.0)", "Export-Package":"sample.resource;version=1.0.0", "Require-Bundle:"some.other.bundle“ } • AMD – RequireJS define(["dojo", "orion/serviceregistry", "dojo/DeferredList"], function(dojo, mServiceregistry){… return exports});

  5. Orion Plugins • Orion applications are NOT made up of plugins • Orion pages are designed to be 'extended' with plugins • Orion plugins are 'separate' HTML pages hosted in non-visible IFrames • Can be cross origin and communicate using HTML5 postMessage which is ASYNC • Plugins are isolated and secure against direct modification of the hosting page

  6. Web Application Front-end Web Client Web Application Front-end Web Server Web Application Front-end Plugin Web Application Front-end Plugin Web Application Front-end Plugin Web Application Front-end Web Client Web Application Front-end Web Server Web Application Front-end Proxied Service Web Application Front-end Proxied Service Java Web Application / OSGi Proxy Server / Portal

  7. Web Application Front-end Web Client Web Application Front-end Web Server Web Application Front-end Plugin Web Application Front-end Web Server Web Application Front-end Plugin Web Application Front-end Web Server Orion way / Client-side Extension

  8. Eclipse IDE Extensibility

  9. Orion Extensibility registerService(INTERFACE_NAME, IMPLEMENTATION, PROPERTIES) In-page Plugin

  10. Comparing OSGi and Orion Service APIs • Orion provides a nearly complete implementation of the Service API from OSGi BundleContext • ServiceReference, ServiceRegistration, … • service listeners, event types • Use Strings instead of java.lang.class when referencing Service interfaces • All Service calls return a “promise” – needed to abstract asynchronous service implementations • No ServiceTracker currently • originally built into getService but this was a mistake

  11. What’s next • Declarative Services • wire.js – extends Asynchronous Module Definition define([“wire!aService", “wire!anotherService], function(aService, anotherService){…}); • Configuration Admin and Metatype Services • Permission Policy and Admin

  12. http://eclipse.org/orion/

More Related