Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

When whiteboards play together. JAX-RS and servlets the OSGi way - M Hoffmann & J Albert


Published on

OSGi Community Event 2017 Presentation by Mark Hoffmann & Juergen Albert [Data In Motion]

OSGi provides specifications for HTTP whiteboards as well as JAX-RS whiteboards. This talk will give you an real world insight of how these specifications can work together.

Are you familiar with the the problem when you quickly need a site setup consisting of whiteboard services such as static web resources, servlets and REST services for integration testing or a customer review?

So we got Jetty and Jersey in the team, they provide sample implementations for both of the specifications.

We will show you how easy it is to dynamically compose such setups running isolated from other sites. You will even get an idea of how to quickly compose your configuration from existing whiteboard services, serving your needs. Perhaps you need more of these setups at the same time, on the same framework? No problem, as you will see…… Let us show you how you can take advantage of all of the flexibility that OSGi whiteboards can offer.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

When whiteboards play together. JAX-RS and servlets the OSGi way - M Hoffmann & J Albert

  1. 1. When whiteboards play together. JAX-RS and Servlets the OSGi way Jürgen Albert, Mark Hoffmann Data In Motion Consulting GmbH 1
  2. 2. About Us ● Founded in 2011 ● Located in Jena/Thuringia - Germany ● OSGi Contributing Associate Member ● OSGi / MDSD related company ● Consulting, Development, Training 2
  3. 3. What to expect? ● OSGi HTTP Whiteboard introduction ● OSGi JaxRs Whiteboard introduction ● How do they work together? ● Advantages and Use-Cases ● Examples / Showcase 3
  4. 4. Introduction ● HTTP and REST are basic in every application ● Classic approach ○ Static defined XML or annotations ● Dynamic approach ○ OSGi ● Both Specs base upon OSGi Whiteboard pattern 4
  5. 5. OSGi Whiteboard Pattern ● Similar to the observer pattern ● Utilizing the service registry ● Observer and subject are a service/components ● Filtering observers using service properties ● 5
  6. 6. OSGi HTTP Whiteboard ● Since OSGi Enterprise R6 ● Minor update in R7 ● Dynamic registration of servlets, filters, contexts, listeners ● Multiple whiteboards / server instances ○ different protocols ○ different ports ● Isolation between whiteboards ● Easy configuration (ConfigAdmin, DS) 6
  7. 7. OSGi JaxRs Whiteboard ● New in OSGi Enterprise R7 ● Dynamic registration of applications, resources and extensions ● Multiple whiteboards / JaxRs server instances ○ different root context paths ○ different ports and protocols ● Isolation between whiteboards and applications ● Easy configuration (ConfigAdmin, DS) 7
  8. 8. How do both fit together? ● Example: Jersey using Jetty as web-server ● Jersey: ○ JaxRs servlet registered into Jetty ○ Handling of applications, resources and extension ● Jetty: Implementation for HTTP Whiteboard ● Dynamically registering Jersey servlets ● Servlets are consumed by the HTTP Whiteboard 8
  9. 9. Showcase Lets Rock 9
  10. 10. Thanks for listening! Resources: Web: Git: Repo: Misc: 10
  11. 11. Questions? 11