Best Practices With Distributed OSGi

download Best Practices With Distributed OSGi

of 17

Transcript of Best Practices With Distributed OSGi

  • 8/12/2019 Best Practices With Distributed OSGi

    1/17

    2002 IBM CorporationConfidential | Date | Other Information, if necessary

    2009 by Marks !ppe, "cott #e$is% made a&ailable nder the '(# &)*0 | March 2+, 2009

    Best Practices for Distributed OSGiServices

    Markus Alexander KuppeScott Lewis

    http!!www"eclipse"or#!ecf

  • 8/12/2019 Best Practices With Distributed OSGi

    2/17

    2009 by Marks le-ander !ppe, "cott #e$is% made a&ailable nder the '(# &)*0 | March 2+, 2009

    $Isn't D-OSGi... just repeating themistake of every other RPC-

    base system in the !ast "#years$ Dis%uss...%

    http!!twitter"co&!n'bartlett

  • 8/12/2019 Best Practices With Distributed OSGi

    3/17

    2009 by Marks le-ander !ppe, "cott #e$is% made a&ailable nder the '(# &)*0 | March 2+, 2009

    $Isn't D-OSGi... just repeating the

    mistake of every other RPC-

    base system in the !ast "#

    years$

    (O)**+t,s our 'ob to &ake sure of this"""and the 'ob,s not finished

  • 8/12/2019 Best Practices With Distributed OSGi

    4/17

  • 8/12/2019 Best Practices With Distributed OSGi

    5/17

    2009 by Marks le-ander !ppe, "cott #e$is% made a&ailable nder the '(# &)*0 | March 2+, 2009

    (etwork 6ransparenc3

    Do 3ou hide the network,s aspects fro& the pro#ra&&er7

    Perfor&ance!6i&in#

    5eliabilit3!Partial 8ailure

    Nota #ood idea

    /A (ote on Distributed 9o&putin#

    / Lots of failed atte&pts at doin# so - See (eil,s tweet

    One conclusion 4ventuall3"""pro#ra&&ers of distributed service clientswant to knowand reactto what,s happenin#

    http://research.sun.com/techrep/1994/abstract-29.htmlhttp://research.sun.com/techrep/1994/abstract-29.html
  • 8/12/2019 Best Practices With Distributed OSGi

    6/17

    2009 by Marks le-ander !ppe, "cott #e$is% made a&ailable nder the '(# &)*0 | March 2+, 2009

    4nter OSGi Services

    (ow have OSGi Service 5e#istr3!Service5eference!Service5e#istration

    / 6he fra&ework &ana#es service re#istration!lookup!and cleanup

    . bundle9ontext"re#isterService0"""1

    .bundle9ontext"#etService5eferences0"""1

    . bundle9ontext"stop01

    Makes 5e#istration2 Lookup2 9lean-up work

    589 ::; provide transparentre&ote service re#istration2 lookup2 and

    clean-up

  • 8/12/2019 Best Practices With Distributed OSGi

    7/17 2009 by Marks le-ander !ppe, "cott #e$is% made a&ailable nder the '(# &)*0 | March 2+, 2009

    6his is GOOD 6ransparenc3

    Makes it ver3 eas3 for pro#ra&&ers to use - GOOD

    Providers 0i&ple&entations1 take care of the hard stuff 0distribution2seriali

  • 8/12/2019 Best Practices With Distributed OSGi

    8/17 2009 by Marks le-ander !ppe, "cott #e$is% made a&ailable nder the '(# &)*0 | March 2+, 2009

    But there is also Usage6ransparenc3

    Public M35esult foo0M3Para&eter1=

    9lients will expect it to work when the3 call it

    +t,s #oin# to fail with 5unti&e4xception"""or worse2 block

    6his willbe &uch &ore fre.uent than local services

    >hat are clients to do7

    Usage6ransparenc3"""Still a problem for those that design service

    interface

  • 8/12/2019 Best Practices With Distributed OSGi

    9/17 2009 by Marks le-ander !ppe, "cott #e$is% made a&ailable nder the '(# &)*0 | March 2+, 2009

    6ransparent Usage0cont1

    'C 4xposes +5e&oteServicevia service propert3 os#i"re&ote

    Gives prox3 A(D additional callin# patterns to service consu&er

    As3nc4xec2 8uture2 One->a3

    .1emote"er&iceracker

    Sa&e 8unctionalit3 as Service6racker

    +5e&oteService rather than Ob'ect

    http://www.eclipse.org/ecf/org.eclipse.ecf.docs/api/org/eclipse/ecf/remoteservice/IRemoteService.htmlhttp://www.eclipse.org/ecf/org.eclipse.ecf.docs/api/org/eclipse/ecf/remoteservice/util/tracker/RemoteServiceTracker.htmlhttp://www.eclipse.org/ecf/org.eclipse.ecf.docs/api/org/eclipse/ecf/remoteservice/util/tracker/RemoteServiceTracker.htmlhttp://www.eclipse.org/ecf/org.eclipse.ecf.docs/api/org/eclipse/ecf/remoteservice/IRemoteService.html
  • 8/12/2019 Best Practices With Distributed OSGi

    10/17

  • 8/12/2019 Best Practices With Distributed OSGi

    11/17

  • 8/12/2019 Best Practices With Distributed OSGi

    12/17 2009 by Marks le-ander !ppe, "cott #e$is% made a&ailable nder the '(# &)*0 | March 2+, 2009

    Discover3 best practice forservice consu&ers

    (O(4)*

    *+t,s our 'ob to &ake sure of this"""and it,s done -1

    9annot run discover3 s3nchronousl3 upon

    getServi%eReferen%es01 as it violates thenon-blockin# nature of OSGi

  • 8/12/2019 Best Practices With Distributed OSGi

    13/17

    2009 by Marks le-ander !ppe, "cott #e$is% made a&ailable nder the '(# &)*0 | March 2+, 2009

    Discover3 best practice forservice providers

    (O(4)*

    *+t,s our 'ob to &ake sure of this"""and it,s nearl3 done -1

    ?owever2 what,s with non ::; relevant

    service props7"""securit32 &arshallin#

  • 8/12/2019 Best Practices With Distributed OSGi

    14/17

    2009 by Marks le-ander !ppe, "cott #e$is% made a&ailable nder the '(# &)*0 | March 2+, 2009

    8or service providers or consu&er innon-OSGi based s3ste&s and deplo3ers

    . @ou i#nore discover3 entirel3 0'ust static confi#uration1 -1

    . 8ind a wa3 to +nte#rate with existin# solutions/ SLP2 &D(S2 D(S-SD2 DD+2 +(+2 C proprietar3

    . 9hose a protocol that best fits 3our re.uire&ents

    . Deal with all the protocol2 network""" details/ ?ave network specialist!ad&inistrators on the tea&

    . Do not trust service discover3 events 0unless 3ou secured it1

  • 8/12/2019 Best Practices With Distributed OSGi

    15/17

    2009 by Marks le-ander !ppe, "cott #e$is% made a&ailable nder the '(# &)*0 | March 2+, 2009

    589 ::;v outlook

    . Different DS> in one runti&e all handle a service re#istered

    event7/ >hat is the discover3 provider supposed to do7 Onl3 handle

    service publication for its &atchin# DS>7 8or all7

    . ?ow to do authentication7/ Make services available that won,t be consu&able because of

    access restrictions

    . Bein# &ore as3nchronous in distributed OSGi as well as thefra&ework itself7

  • 8/12/2019 Best Practices With Distributed OSGi

    16/17

    2009 by Marks le-ander !ppe, "cott #e$is% made a&ailable nder the '(# &)*0 | March 2+, 2009

    'clipse 'C (ro3ect

    Thanks spec writersThanks Scott Rosenbaum for making this talk happen

    Questions?

    http455$$$*eclipse*or65ecfhttp455$iki*eclipse*or65'C

  • 8/12/2019 Best Practices With Distributed OSGi

    17/17