Bndtools 101 Getting Started with OSGi Development Why Use OSGi? - - PowerPoint PPT Presentation

bndtools 101
SMART_READER_LITE
LIVE PREVIEW

Bndtools 101 Getting Started with OSGi Development Why Use OSGi? - - PowerPoint PPT Presentation

Bndtools 101 Getting Started with OSGi Development Why Use OSGi? Many Java Developers OSGi is From the Future Microservices since 1998 Continuous delivery since 1999 Software component repositories since 2003 Runtime


slide-1
SLIDE 1

Bndtools 101

Getting Started with OSGi Development

slide-2
SLIDE 2

– Many Java Developers

“Why Use OSGi?”

slide-3
SLIDE 3

OSGi is From the Future

  • Microservices since 1998
  • Continuous delivery since

1999

  • Software component

repositories since 2003

  • Runtime resolve/assemble

since 2005

image credit: Sam Howzit (flickr.com/photos/aloha75/)
slide-4
SLIDE 4

Why Aren’t We All Using It?

  • Steep Learning Curve…?
  • Complexity…?
  • Weak Tools…?
slide-5
SLIDE 5

Famous Dude

  • “Things should be as simple

as possible, but no simpler”

slide-6
SLIDE 6

Actually He Said…

  • “It can scarcely be denied

that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation

  • f a single datum of

experience.”

slide-7
SLIDE 7

Inherent vs Accidental Complexity

slide-8
SLIDE 8

OSGi Really Is “As Simple as Possible” Holy Sh*t We Needed Better Tools!

image credit: Uwe Schwarzbach (flickr.com/photos/uwebkk/)
slide-9
SLIDE 9

Bndtools

“One tool to bnd them all”

slide-10
SLIDE 10
  • 0. Initial Setup
  • Create Workspace Config
  • Setup Repository
image credit: Germán Poo-Caamaño (flickr.com/photos/gpoo/)
slide-11
SLIDE 11
  • 1. Define API
  • Blog
  • BlogListener
  • Baseline
  • Release
image credit: Jessica Spengler (flickr.com/photos/wordridden/)
slide-12
SLIDE 12
  • 2. Create Provider
  • Add blog.api to build path.
  • Add MongoDB client from

JPM.

slide-13
SLIDE 13
  • 3. Run It!
  • Add blog.provider to Run

Requirements

  • Resolve and Run
image credit: Dru Bloomfield (flickr.com/photos/athomeinscottsdale/)
slide-14
SLIDE 14
  • 4. Create Consumer
  • Add blog.api and servlet 2.5

API to build path

  • Publish Servlet service
  • Add service property: alias=/

blog

  • Add HTTP whiteboard & event

admin to Run Requirements

image credit: epSos .de (flickr.com/photos/epsos/)
slide-15
SLIDE 15
  • 5. Evolve the API
  • Add deleteEntry() method to

Blog

  • Fix the baselining errors
  • Release
slide-16
SLIDE 16
  • 6. Package and Ship It
  • Export as standalone JAR
  • Run from bash
image credit: Glyn Lowe Photoworks. (flickr.com/photos/glynlowe/)
slide-17
SLIDE 17

What Did We Make?

Blog Provider Blog Consumer (REST) Jetty HTTP Whiteboard

Blog Servlet HttpService

slide-18
SLIDE 18

What Did We Make?

  • A modular, dynamically assembled, type-safe,

versioned microservice.

  • … in 45 minutes (give or take)
slide-19
SLIDE 19

Over to You

  • Bndtools 2.4 M1 Just

Released: bndtools.org

  • Demo Sources: github.com/

bndtools/101

NEW

slide-20
SLIDE 20

Thanks!

The Bndtools Team, Working Hard(ly)