wcm.io caravan – osgi microservices · apache sling & friends tech meetup berlin, 28-30...
TRANSCRIPT
APACHE SLING & FRIENDS TECH MEETUPBERLIN, 28-30 SEPTEMBER 2015
wcm.io Caravan – OSGi MicroservicesStefan Seifert, pro!vision GmbH
Our Microservice Scenario
adaptTo() 2015 2
Backend 1SOAP
Backend 2REST
Backend 2REST
Mircoservices
Service 1
Service 2
Service 3
Service 4
ConsumingApps
NoSQL Cache
Our Microservice Scenario
adaptTo() 2015 3
Backend 1SOAP
Backend 2REST
Backend 2REST
Mircoservices
Service 1
Service 2
Service 3
Service 4
ConsumingApps
NoSQL Cache
• Data Aggregation• Data Consolidation• Data Filtering• Caching/Precaching• Resilience• Metrics• Business Logic
wcm.io Caravan
adaptTo() 2015 4
Open Source Project (ASL 2.0) For RESTful Microservices Collection of modular libraries
Use only what you need
http://caravan.wcm.io/
Microservice Stack based on OSGi
adaptTo() 2015 5
Based on OSGi and Apache Felix
Uses some Sling Tooling
Not using Sling Resource API
No Repository involved
Uses only REST/HTTP, no OSGi Remoting
adaptTo() 2015 6wcm.io Caravan Module Overview
Resilient HTTP Client
adaptTo() 2015 7
Based on the “Netflix Stack” Hystrix for Resilience, Circuit Breaker etc. Ribbon for Software Load Balancing
Asynchronous processing via RxJava RFC 6570 URI Templating Apache HTTP Clienthttp://caravan.wcm.io/io/http/
OSGi JAX-RS Integration
adaptTo() 2015 8
Based on Jersey Publish OSGi components as JAX-RS services Separate JAX-RS applications per bundle
http://caravan.wcm.io/jaxrs/publisher/
Hypermedia
adaptTo() 2015 9
Hypertext Application Language (HAL) HAL Resource Builder Integrates HAL Browser HAL documentation generated from sources
http://caravan.wcm.io/hal/
JSON Pipelining
adaptTo() 2015 10
Backend 1 Source Adapter
Extract 1 Model by
Key
NoSQL
{ JSON with 100 Models }
Time To Idle
26 hours
{ JSON with 1
Model }
Backend 2
{ JSON with 1
Models }
Time To Live
12 hours
NoSQL
Merge two
Pipelines
{ Aggre-gated
JSON }
Time To Live
4 hours
NoSQL
Map to Domain Objects
Key = (BE1/models/slice1)
Key = (BE2/model1)
Key = (BE1/models/slice1 AND BE2/model1)-mapped
Output JSON via
REST
{ Domain Objects JSON }
{ Domain Objects JSON }
http://caravan.wcm.io/pipeline/
wcm.io Caravan – Current Status
adaptTo() 2015 11
HTTP Resilient Client: Stable JAX-RS Integration: Stable Pipelining, HAL Resource API: Works well,
but APIs need to be refactored Metrics: First Steps
http://caravan.wcm.io/hal/
adaptTo() 2015 12http://caravan.wcm.io