SlideShare a Scribd company logo
1 of 32
Download to read offline
Apache	
  Celix
 Universal	
  OSGi?


    Alexander	
  Broekhuis	
  
   alexander.broekhuis@luminis.eu
Introduc<on

• Alexander	
  Broekhuis
 • Started	
  as	
  Java	
  Engineer
 • Programming	
  C	
  since	
  2010
• At	
  Luminis	
  since	
  2008
 • Small	
  SoAware	
  House
 • Research	
  and	
  innovaEon	
  oriented
 • Involved	
  in	
  Open	
  Source	
  (Apache)
• Apache	
  commiKer	
  since	
  2010
Agenda

• IntroducEon
• History
• OSGi	
  in	
  C
• Remote	
  Services
• Development
• Universal	
  OSGi
• Status
Introduc<on

• OSGi	
  specificaEon	
  implemented	
  in	
  C
 • Adapted	
  where	
  needed
• Focussed	
  on	
  Embedded	
  Dynamic	
  Systems
• Based	
  on	
  Apache	
  Felix
• Remote	
  Services
 • Distributed	
  Systems
 • Interoperability	
  with	
  Java
History


• Started	
  in	
  2010
• Middleware
 • Mixed	
  Java/C	
  environment
 • Based	
  on	
  (de-­‐facto)	
  standards
• Open	
  Source
 • Generic	
  Middleware	
  -­‐>	
  No	
  core	
  business
 • Benefits	
  others,	
  but	
  also	
  benefits	
  FROM	
  others
OSGi	
  is:

• component	
  based	
  framework
• allows	
  dynamic	
  assembly	
  of	
  components
• Java,	
  so	
  independent	
  of	
  operaEng	
  system

OSGi	
  technology	
  is	
  the	
  dynamic	
  module	
  system	
  for	
  Java™
OSGi	
  technology	
  is	
  Universal	
  Middleware.
OSGi	
  technology	
  provides	
  a	
  service-­‐oriented,	
  component-­‐based	
  
environment	
  for	
  developers	
  and	
  offers	
  standardized	
  ways	
  to	
  
manage	
  the	
  so@ware	
  lifecycle.	
  These	
  capabiliBes	
  greatly	
  increase	
  
the	
  value	
  of	
  a	
  wide	
  range	
  of	
  computers	
  and	
  devices	
  that	
  use	
  the	
  
Java™	
  plaForm.
OSGi




        "-)*+((                                               !"#$%&'&($
                       "-)*+(($.
)*+,*                               )*+,*   )*+,/-0

                       ,$)1(3$.                                +&/3$

 $-.              4-"-)*+((                 )*122"-0   )*12

                      4-"-)*+(($.




                                                         !"#$%&'()*+,'-
OSGi



                                    !"#$%&                      !"#$%&
                                                                            !"#$%
                                                                              &"#$%'()*!!
        "-)*+((                                                !"#$%&'&($     +%,'()*!!
                       "-)*+(($.
)*+,*                               )*+,*    )*+,/-0                        !"#$%&'!
                                                                              ("#$%)*+,&-,.!!
                       ,$)1(3$.                                 +&/3$
                                                                              /0,%(1!"%*&-,.!!
 $-.              4-"-)*+((                  )*122"-0   )*12
                                                                              ("$%.*23,&-,.!!
                      4-"-)*+(($.
                                                                            !"#$%&'!&#!()
                                                                              *+,-."#$&+/.!!



                                                          !"#$%&'()*+,'-
OSGi



       !"#$%&       !"#$%&
                                 !"#$%
                                   &"#$%'()*!!
                                   +%,'()*!!

                                 !"#$%&'!
                                   ("#$%)*+,&-,.!!
                                   /0,%(1!"%*&-,.!!
                                   ("$%.*23,&-,.!!

                                 !"#$%&'!&#!()
                                   *+,-."#$&+/.!!



                !"#$%&'()*+,'-
OSGi

                              !"#$%&"'(")%*+#,

                                    !+-#"



       !"#$%&                      !"#$%&
                                                           !"#$%
                                                             &"#$%'()*!!
          !"#$%&'&$())'*&+,(-./'%0!$1012-)'3"24$1*&+,(-./'5
                                                             +%,'()*!!
          ''''!"#$%&',.%4')-(/-63"24$17.2-18-'&.2-18-9'5
          ''''''''&.2-18-:/1;%)-1/<1/,%&16<-./1:&$()):;1-=(0169>'2"$$>'
          ''''''''''''21?'<-./1@0!$699A                    !"#$%&'!
          ''''B                                              ("#$%)*+,&-,.!!
          ''''!"#$%&',.%4')-.!63"24$17.2-18-'&.2-18-9'5      /0,%(1!"%*&-,.!!
          ''''B
          B                                                  ("$%.*23,&-,.!!

                                                         !"#$%&'!&#!()
                                                           *+,-."#$&+/.!!



                              !"#$%&'()*+,'-
Benefits




• Making	
  products	
  with	
  many	
  variaEons
• Improving	
  quality	
  through	
  re-­‐use
• Speed:	
  Eme	
  to	
  market
OSGi	
  in	
  C


• Follows	
  the	
  OSGi	
  SpecificaEon
 • A	
  Service	
  Registry	
  for	
  tracking	
  services
 • Bundle	
  AcEvators	
  for	
  registering	
  services
 • Bundle	
  Lifecycle	
  for	
  tracking	
  Bundle	
  state
• Structs	
  instead	
  of	
  Interfaces
 • Using	
  funcEon	
  pointers	
  to	
  forward	
  calls
Services	
  in	
  C
• Service
 • Struct	
  with	
  funcEon	
  pointers
• AcEvator
 • start	
  /	
  stop
                                                      Activator                    <struct>
• Celix
                                                                    create
                                                  + start                          Service
                                registerService   + stop

 • bundleContext                                           create

                                                                             pointer
 • registry             Celix                       Component


 • etc..                             getService                     depends
Services	
  in	
  C	
  -­‐	
  BundleAc<vator

              Java - BundleActivator

@Override
public void start(BundleContext context) throws Exception {
	 System.out.println("Hello " + m_word);
}




                                    C - BundleActivator

         celix_status_t bundleActivator_start(void * userData, BUNDLE_CONTEXT context) {
         	 struct userData * data = (struct userData *) userData;
         	 printf("Hello %sn", data->word);
         	 return CELIX_SUCCESS;
         }
Services	
  in	
  C	
  -­‐	
  Service	
  registra<on

                       Java - Register service

context.registerService(
          ShellService.class.getName(), new ShellServiceImpl(), null);




                                   C - Register service

       SHELL_SERVICE shellService = (SHELL_SERVICE) apr_palloc(pool, (sizeof
       (*shellService));
       shellService->shell = shell;
       shellService->getCommands = shell_getCommands;
       shellService->getCommandDescription = shell_getCommandDescription;
       shellService->getCommandUsage = shell_getCommandUsage;
       shellService->getCommandReference = shell_getCommandReference;
       shellService->executeCommand = shell_executeCommand;

       SERVICE_REGISTRATION registration = NULL;
       status = bundleContext_registerService(
              context, SHELL_SERVICE_NAME, shellService, NULL, &registration);
Dynamic	
  Assembly
• Dynamic	
  Loading
 • Library
                                                        Depends
 • Using	
  dlfcn.h
   • dlopen	
  /	
  dlclose	
  
                                  <shared object>                     <shared object>
                                       Celix           Initializes       Provider       Realizes


   • dlsym
                                                                                            <struct>
                                                                               Uses
                                                                                            Provider
                                                                                            Service



                                                     Initializes     <shared object>
                                                                       Consumer


                                                    Depends
Deployment
• Bundling
 • Zip	
  file	
  with	
  Shared	
  Object
   • (.so,	
  .dll,	
  .dylib,	
  ...)
 • Manifest
   • Import	
  /	
  Export

• RunEme
 • Extracted	
  to	
  cache
Demo
• Paint	
  ApplicaEon
  • From	
  OSGi	
  in	
  AcEon
• Install	
  /	
  Start	
  /	
  Stop	
  bundles
Remote	
  Services


• Remote	
  Service	
  Admin
 • Enterprise	
  SpecificaEon
• Interoperability
• Protocol
 • SOAP?
 • REST/JSON
 • Hessian
Remote	
  Services

                                            «service»
      Server                                 Server                   Client
                                         imported = "true"



    «service»
     Server                 ServerStub     ServerProxy               Registry
  remote = "true"


          «track»


                 Remote                                   Proxy
                Publisher                                Publisher




                                            «service»
                            «service»
                                            Discovery
                            Discovery
                                             Service
                             Service
Remote	
  Services

                                            «service»
      Server                                 Server                   Client
                                         imported = "true"



    «service»
     Server                 ServerStub     ServerProxy               Registry
  remote = "true"


          «track»


                 Remote                                   Proxy
                Publisher                                Publisher




                                            «service»
                            «service»
  Stubs                                     Discovery                  Proxies
                            Discovery
                                             Service
                             Service
Remote	
  Services	
  in	
  Celix
• REST/JSON
 • Basic	
  implementaEon	
  working


• Hessian
 • Basic	
  (de)serializaEon	
  implementaEon	
  made


• Todo
 • Generate	
  code	
  for	
  endpoints	
  (stubs/proxies)
 • Test/Implement	
  interoperability	
  with	
  Java
Demo	
  -­‐	
  Remote	
  Services
• Calculator	
  Example	
  Service
                                  struct example_service {
                                  	 example_t example;
                                  	 celix_status_t (*add)(example_t example,
                                               double a, double b, double *result);
                                  	 celix_status_t (*sub)(example_t example,
                                               double a, double b, double *result);
                                  	 celix_status_t (*sqrt)(example_t example,
                                               double a, double *result);
                                  };

• Calculator	
  Shell	
  Commands
 • add	
  /	
  sub	
  /	
  sqrt
• Endpoints	
  using	
  REST	
  /	
  JSON
 • Embedded	
  Mongoose	
  webserver
Demo	
  -­‐	
  Remote	
  Services
• Calculator	
  Example	
  Service
                                  struct example_service {
                                  	 example_t example;
                                  	 celix_status_t (*add)(example_t example,
                                               double a, double b, double *result);
                                  	 celix_status_t (*sub)(example_t example,
                                               double a, double b, double *result);
                                  	 celix_status_t (*sqrt)(example_t example,
                                               double a, double *result);
                                  };

• Calculator	
  Shell	
  Commands
 • add	
  /	
  sub	
  /	
  sqrt
• Endpoints	
  using	
  REST	
  /	
  JSON
 • Embedded	
  Mongoose	
  webserver
PlaJorm	
  Support


• Apache	
  Portable	
  RunEme
 • Linux,	
  Unix,	
  Windows,	
  etc
 • Memory	
  pool
 • File	
  handling
 • Threads
• No	
  RealTime/Embedded
 • Reuse	
  APR	
  API
Building


• CMake
 • Cross	
  pladorm	
  /	
  MulE	
  IDE
• Framework
 • Standard	
  library
• Bundle	
  macros
 • Create	
  bundle	
  zip
 • Add	
  library	
  and	
  resources
Universal	
  OSGi
• RFP-­‐89
 • Proposed	
  to	
  the	
  mailing	
  list	
  in	
  2007
 • Since	
  then	
  remained	
  silent
 • Ongoing	
  effort	
  to	
  pick	
  up	
  again


• Supported	
  Languages
 • C++	
  /	
  .NET	
  language	
  (C#)	
  /	
  ECMAScript
 • What	
  about	
  C?
• Interest	
  from	
  Community?
Universal	
  OSGi	
  -­‐	
  Celix
• NaEve	
  port	
  in	
  C
• Status
  • Based	
  on	
  the	
  R4	
  SpecificaEon
    • Deployable	
  bundles
    • Bundle	
  lifecycle
    • Service	
  registry
    • Framework	
  API
  • Standards	
  for	
  IPC	
  and	
  communicaEons
    • Remote	
  Services
Status	
  -­‐	
  Framework


• Dynamic	
  Loading	
  of	
  Libraries
• Service	
  Registry	
  for	
  Querying	
  and	
  Registering
• Bundles	
  with	
  Manifest	
  for	
  Deployment
• Service	
  Tracker	
  for	
  tracking	
  Services
• Bundle	
  State	
  and	
  Life	
  Cycle
• Bundle	
  Cache	
  for	
  Storing	
  State
Status	
  -­‐	
  Extras


• Shell	
  ImplementaEon	
  for	
  InspecEng	
  Bundles
 • ps/start/stop/install/update/uninstall	
  commands
• Dependency	
  Manager	
  for	
  Dependencies
 • Simple	
  ImplementaEon
 • StaEc	
  Linked
• Open	
  Source	
  at	
  Apache
 • Currently	
  in	
  the	
  Incubator
Apache	
  Celix

• Roadmap
 • ...	
  
 • Deployment	
  Admin
 • Remote	
  Services
 • ConfiguraEon	
  Admin
 • Event	
  Admin
• Looking	
  for
 • Users	
  /	
  Testers	
  /	
  CommiKers
Links

• Original	
  Proposal:
 • hKp://wiki.apache.org/incubator/CelixProposal
• Incubator	
  Mailing	
  List	
  Archive:
 • hKp://incubator.markmail.org/search/?q=Celix
• IncubaEon	
  Status:
 • hKp://incubator.apache.org/projects/celix.html
• Project	
  Page:
 • hKp://incubator.apache.org/celix/

More Related Content

What's hot

HTML5 and CSS3 Refresher
HTML5 and CSS3 RefresherHTML5 and CSS3 Refresher
HTML5 and CSS3 RefresherIvano Malavolta
 
JQuery In Rails
JQuery In RailsJQuery In Rails
JQuery In RailsLouie Zhao
 
Perl调用微博API实现自动查询应答
Perl调用微博API实现自动查询应答Perl调用微博API实现自动查询应答
Perl调用微博API实现自动查询应答琛琳 饶
 
Testing Web Applications with GEB
Testing Web Applications with GEBTesting Web Applications with GEB
Testing Web Applications with GEBHoward Lewis Ship
 
jQuery%20on%20Rails%20Presentation
jQuery%20on%20Rails%20PresentationjQuery%20on%20Rails%20Presentation
jQuery%20on%20Rails%20Presentationguestcf600a
 
Angular.js Fundamentals
Angular.js FundamentalsAngular.js Fundamentals
Angular.js FundamentalsMark
 
jQuery from the very beginning
jQuery from the very beginningjQuery from the very beginning
jQuery from the very beginningAnis Ahmad
 
Introduction à CoffeeScript pour ParisRB
Introduction à CoffeeScript pour ParisRB Introduction à CoffeeScript pour ParisRB
Introduction à CoffeeScript pour ParisRB jhchabran
 
jQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a TreejQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a Treeadamlogic
 
RubyBarCamp “Полезные gems и plugins”
RubyBarCamp “Полезные gems и plugins”RubyBarCamp “Полезные gems и plugins”
RubyBarCamp “Полезные gems и plugins”apostlion
 
Learning jQuery made exciting in an interactive session by one of our team me...
Learning jQuery made exciting in an interactive session by one of our team me...Learning jQuery made exciting in an interactive session by one of our team me...
Learning jQuery made exciting in an interactive session by one of our team me...Thinqloud
 
Empowering End-users to Find Point-of-interests with a Public Display
Empowering End-users to Find Point-of-interests with a Public DisplayEmpowering End-users to Find Point-of-interests with a Public Display
Empowering End-users to Find Point-of-interests with a Public DisplayTetsuo Yamabe
 
How Kris Writes Symfony Apps
How Kris Writes Symfony AppsHow Kris Writes Symfony Apps
How Kris Writes Symfony AppsKris Wallsmith
 
Jqeury ajax plugins
Jqeury ajax pluginsJqeury ajax plugins
Jqeury ajax pluginsInbal Geffen
 
Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)Remy Sharp
 
Working Effectively With Legacy Tdiary Code Using Cucumber And Rspec
Working Effectively With Legacy Tdiary Code Using Cucumber And RspecWorking Effectively With Legacy Tdiary Code Using Cucumber And Rspec
Working Effectively With Legacy Tdiary Code Using Cucumber And RspecShintaro Kakutani
 

What's hot (18)

HTML5 and CSS3 Refresher
HTML5 and CSS3 RefresherHTML5 and CSS3 Refresher
HTML5 and CSS3 Refresher
 
JQuery In Rails
JQuery In RailsJQuery In Rails
JQuery In Rails
 
Perl调用微博API实现自动查询应答
Perl调用微博API实现自动查询应答Perl调用微博API实现自动查询应答
Perl调用微博API实现自动查询应答
 
Testing Web Applications with GEB
Testing Web Applications with GEBTesting Web Applications with GEB
Testing Web Applications with GEB
 
jQuery%20on%20Rails%20Presentation
jQuery%20on%20Rails%20PresentationjQuery%20on%20Rails%20Presentation
jQuery%20on%20Rails%20Presentation
 
JQuery Basics
JQuery BasicsJQuery Basics
JQuery Basics
 
Angular.js Fundamentals
Angular.js FundamentalsAngular.js Fundamentals
Angular.js Fundamentals
 
jQuery from the very beginning
jQuery from the very beginningjQuery from the very beginning
jQuery from the very beginning
 
Introduction à CoffeeScript pour ParisRB
Introduction à CoffeeScript pour ParisRB Introduction à CoffeeScript pour ParisRB
Introduction à CoffeeScript pour ParisRB
 
jQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a TreejQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a Tree
 
RubyBarCamp “Полезные gems и plugins”
RubyBarCamp “Полезные gems и plugins”RubyBarCamp “Полезные gems и plugins”
RubyBarCamp “Полезные gems и plugins”
 
Learning jQuery made exciting in an interactive session by one of our team me...
Learning jQuery made exciting in an interactive session by one of our team me...Learning jQuery made exciting in an interactive session by one of our team me...
Learning jQuery made exciting in an interactive session by one of our team me...
 
Empowering End-users to Find Point-of-interests with a Public Display
Empowering End-users to Find Point-of-interests with a Public DisplayEmpowering End-users to Find Point-of-interests with a Public Display
Empowering End-users to Find Point-of-interests with a Public Display
 
How Kris Writes Symfony Apps
How Kris Writes Symfony AppsHow Kris Writes Symfony Apps
How Kris Writes Symfony Apps
 
Jqeury ajax plugins
Jqeury ajax pluginsJqeury ajax plugins
Jqeury ajax plugins
 
Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)
 
PhoneGap: Local Storage
PhoneGap: Local StoragePhoneGap: Local Storage
PhoneGap: Local Storage
 
Working Effectively With Legacy Tdiary Code Using Cucumber And Rspec
Working Effectively With Legacy Tdiary Code Using Cucumber And RspecWorking Effectively With Legacy Tdiary Code Using Cucumber And Rspec
Working Effectively With Legacy Tdiary Code Using Cucumber And Rspec
 

Similar to Apache Celix Universal OSGi Framework

WALA Tutorial at PLDI 2010
WALA Tutorial at PLDI 2010WALA Tutorial at PLDI 2010
WALA Tutorial at PLDI 2010Julian Dolby
 
Massive device deployment - EclipseCon 2011
Massive device deployment - EclipseCon 2011Massive device deployment - EclipseCon 2011
Massive device deployment - EclipseCon 2011Angelo van der Sijpt
 
Introduction - Builders at Play
Introduction - Builders at PlayIntroduction - Builders at Play
Introduction - Builders at PlaySmart in Public
 
SEO - It Works Even if You Don’t Know How or Why
SEO - It Works Even if You Don’t Know How or Why SEO - It Works Even if You Don’t Know How or Why
SEO - It Works Even if You Don’t Know How or Why Wolfgang Weicht
 
[Harvard CS264] 04 - Intermediate-level CUDA Programming
[Harvard CS264] 04 - Intermediate-level CUDA Programming[Harvard CS264] 04 - Intermediate-level CUDA Programming
[Harvard CS264] 04 - Intermediate-level CUDA Programmingnpinto
 
Танки_в_Лунапарке: нагрузочное_тестирование_в_Яндексе
Танки_в_Лунапарке: нагрузочное_тестирование_в_ЯндексеТанки_в_Лунапарке: нагрузочное_тестирование_в_Яндексе
Танки_в_Лунапарке: нагрузочное_тестирование_в_ЯндексеYandex
 
LAMP_TRAINING_SESSION_6
LAMP_TRAINING_SESSION_6LAMP_TRAINING_SESSION_6
LAMP_TRAINING_SESSION_6umapst
 
Interaction design
Interaction designInteraction design
Interaction designfeifei2011
 
Materializing Energy
Materializing EnergyMaterializing Energy
Materializing EnergyJames Pierce
 
Betagroup 12 - Board of Innovation
Betagroup 12 - Board of InnovationBetagroup 12 - Board of Innovation
Betagroup 12 - Board of InnovationBoard of Innovation
 
Portefólio Joana Dinis Ferreira
Portefólio Joana Dinis FerreiraPortefólio Joana Dinis Ferreira
Portefólio Joana Dinis Ferreirajanedinis
 
CurríCulum Actualizado Carmen LaviñA
CurríCulum Actualizado Carmen LaviñACurríCulum Actualizado Carmen LaviñA
CurríCulum Actualizado Carmen LaviñAfernandoeresta2009
 
Nearby Startup Pitch for SUU 2013 conference
Nearby Startup Pitch for SUU 2013 conferenceNearby Startup Pitch for SUU 2013 conference
Nearby Startup Pitch for SUU 2013 conferenceAdam Nemeth
 

Similar to Apache Celix Universal OSGi Framework (20)

All about Apache ACE
All about Apache ACEAll about Apache ACE
All about Apache ACE
 
Device deployment
Device deploymentDevice deployment
Device deployment
 
Celix universal OSGi
Celix universal OSGiCelix universal OSGi
Celix universal OSGi
 
InnoDB Magic
InnoDB MagicInnoDB Magic
InnoDB Magic
 
WALA Tutorial at PLDI 2010
WALA Tutorial at PLDI 2010WALA Tutorial at PLDI 2010
WALA Tutorial at PLDI 2010
 
Massive device deployment - EclipseCon 2011
Massive device deployment - EclipseCon 2011Massive device deployment - EclipseCon 2011
Massive device deployment - EclipseCon 2011
 
Introduction - Builders at Play
Introduction - Builders at PlayIntroduction - Builders at Play
Introduction - Builders at Play
 
SEO - It Works Even if You Don’t Know How or Why
SEO - It Works Even if You Don’t Know How or Why SEO - It Works Even if You Don’t Know How or Why
SEO - It Works Even if You Don’t Know How or Why
 
[Harvard CS264] 04 - Intermediate-level CUDA Programming
[Harvard CS264] 04 - Intermediate-level CUDA Programming[Harvard CS264] 04 - Intermediate-level CUDA Programming
[Harvard CS264] 04 - Intermediate-level CUDA Programming
 
Танки_в_Лунапарке: нагрузочное_тестирование_в_Яндексе
Танки_в_Лунапарке: нагрузочное_тестирование_в_ЯндексеТанки_в_Лунапарке: нагрузочное_тестирование_в_Яндексе
Танки_в_Лунапарке: нагрузочное_тестирование_в_Яндексе
 
LAMP_TRAINING_SESSION_6
LAMP_TRAINING_SESSION_6LAMP_TRAINING_SESSION_6
LAMP_TRAINING_SESSION_6
 
Interaction design
Interaction designInteraction design
Interaction design
 
Materializing Energy
Materializing EnergyMaterializing Energy
Materializing Energy
 
Betagroup 12 - Board of Innovation
Betagroup 12 - Board of InnovationBetagroup 12 - Board of Innovation
Betagroup 12 - Board of Innovation
 
Portefólio Joana Dinis Ferreira
Portefólio Joana Dinis FerreiraPortefólio Joana Dinis Ferreira
Portefólio Joana Dinis Ferreira
 
#ThisIsHappening
#ThisIsHappening#ThisIsHappening
#ThisIsHappening
 
Currículum Carmen Laviña
Currículum Carmen LaviñaCurrículum Carmen Laviña
Currículum Carmen Laviña
 
CurríCulum Actualizado Carmen LaviñA
CurríCulum Actualizado Carmen LaviñACurríCulum Actualizado Carmen LaviñA
CurríCulum Actualizado Carmen LaviñA
 
Nearby Startup Pitch for SUU 2013 conference
Nearby Startup Pitch for SUU 2013 conferenceNearby Startup Pitch for SUU 2013 conference
Nearby Startup Pitch for SUU 2013 conference
 
Csharp intsight[1]
Csharp intsight[1]Csharp intsight[1]
Csharp intsight[1]
 

Recently uploaded

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 

Recently uploaded (20)

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 

Apache Celix Universal OSGi Framework

  • 1. Apache  Celix Universal  OSGi? Alexander  Broekhuis   alexander.broekhuis@luminis.eu
  • 2. Introduc<on • Alexander  Broekhuis • Started  as  Java  Engineer • Programming  C  since  2010 • At  Luminis  since  2008 • Small  SoAware  House • Research  and  innovaEon  oriented • Involved  in  Open  Source  (Apache) • Apache  commiKer  since  2010
  • 3. Agenda • IntroducEon • History • OSGi  in  C • Remote  Services • Development • Universal  OSGi • Status
  • 4. Introduc<on • OSGi  specificaEon  implemented  in  C • Adapted  where  needed • Focussed  on  Embedded  Dynamic  Systems • Based  on  Apache  Felix • Remote  Services • Distributed  Systems • Interoperability  with  Java
  • 5. History • Started  in  2010 • Middleware • Mixed  Java/C  environment • Based  on  (de-­‐facto)  standards • Open  Source • Generic  Middleware  -­‐>  No  core  business • Benefits  others,  but  also  benefits  FROM  others
  • 6. OSGi  is: • component  based  framework • allows  dynamic  assembly  of  components • Java,  so  independent  of  operaEng  system OSGi  technology  is  the  dynamic  module  system  for  Java™ OSGi  technology  is  Universal  Middleware. OSGi  technology  provides  a  service-­‐oriented,  component-­‐based   environment  for  developers  and  offers  standardized  ways  to   manage  the  so@ware  lifecycle.  These  capabiliBes  greatly  increase   the  value  of  a  wide  range  of  computers  and  devices  that  use  the   Java™  plaForm.
  • 7. OSGi "-)*+(( !"#$%&'&($ "-)*+(($. )*+,* )*+,* )*+,/-0 ,$)1(3$. +&/3$ $-. 4-"-)*+(( )*122"-0 )*12 4-"-)*+(($. !"#$%&'()*+,'-
  • 8. OSGi !"#$%& !"#$%& !"#$% &"#$%'()*!! "-)*+(( !"#$%&'&($ +%,'()*!! "-)*+(($. )*+,* )*+,* )*+,/-0 !"#$%&'! ("#$%)*+,&-,.!! ,$)1(3$. +&/3$ /0,%(1!"%*&-,.!! $-. 4-"-)*+(( )*122"-0 )*12 ("$%.*23,&-,.!! 4-"-)*+(($. !"#$%&'!&#!() *+,-."#$&+/.!! !"#$%&'()*+,'-
  • 9. OSGi !"#$%& !"#$%& !"#$% &"#$%'()*!! +%,'()*!! !"#$%&'! ("#$%)*+,&-,.!! /0,%(1!"%*&-,.!! ("$%.*23,&-,.!! !"#$%&'!&#!() *+,-."#$&+/.!! !"#$%&'()*+,'-
  • 10. OSGi !"#$%&"'(")%*+#, !+-#" !"#$%& !"#$%& !"#$% &"#$%'()*!! !"#$%&'&$())'*&+,(-./'%0!$1012-)'3"24$1*&+,(-./'5 +%,'()*!! ''''!"#$%&',.%4')-(/-63"24$17.2-18-'&.2-18-9'5 ''''''''&.2-18-:/1;%)-1/<1/,%&16<-./1:&$()):;1-=(0169>'2"$$>' ''''''''''''21?'<-./1@0!$699A !"#$%&'! ''''B ("#$%)*+,&-,.!! ''''!"#$%&',.%4')-.!63"24$17.2-18-'&.2-18-9'5 /0,%(1!"%*&-,.!! ''''B B ("$%.*23,&-,.!! !"#$%&'!&#!() *+,-."#$&+/.!! !"#$%&'()*+,'-
  • 11. Benefits • Making  products  with  many  variaEons • Improving  quality  through  re-­‐use • Speed:  Eme  to  market
  • 12. OSGi  in  C • Follows  the  OSGi  SpecificaEon • A  Service  Registry  for  tracking  services • Bundle  AcEvators  for  registering  services • Bundle  Lifecycle  for  tracking  Bundle  state • Structs  instead  of  Interfaces • Using  funcEon  pointers  to  forward  calls
  • 13. Services  in  C • Service • Struct  with  funcEon  pointers • AcEvator • start  /  stop Activator <struct> • Celix create + start Service registerService + stop • bundleContext create pointer • registry Celix Component • etc.. getService depends
  • 14. Services  in  C  -­‐  BundleAc<vator Java - BundleActivator @Override public void start(BundleContext context) throws Exception { System.out.println("Hello " + m_word); } C - BundleActivator celix_status_t bundleActivator_start(void * userData, BUNDLE_CONTEXT context) { struct userData * data = (struct userData *) userData; printf("Hello %sn", data->word); return CELIX_SUCCESS; }
  • 15. Services  in  C  -­‐  Service  registra<on Java - Register service context.registerService( ShellService.class.getName(), new ShellServiceImpl(), null); C - Register service SHELL_SERVICE shellService = (SHELL_SERVICE) apr_palloc(pool, (sizeof (*shellService)); shellService->shell = shell; shellService->getCommands = shell_getCommands; shellService->getCommandDescription = shell_getCommandDescription; shellService->getCommandUsage = shell_getCommandUsage; shellService->getCommandReference = shell_getCommandReference; shellService->executeCommand = shell_executeCommand; SERVICE_REGISTRATION registration = NULL; status = bundleContext_registerService( context, SHELL_SERVICE_NAME, shellService, NULL, &registration);
  • 16. Dynamic  Assembly • Dynamic  Loading • Library Depends • Using  dlfcn.h • dlopen  /  dlclose   <shared object> <shared object> Celix Initializes Provider Realizes • dlsym <struct> Uses Provider Service Initializes <shared object> Consumer Depends
  • 17. Deployment • Bundling • Zip  file  with  Shared  Object • (.so,  .dll,  .dylib,  ...) • Manifest • Import  /  Export • RunEme • Extracted  to  cache
  • 18. Demo • Paint  ApplicaEon • From  OSGi  in  AcEon • Install  /  Start  /  Stop  bundles
  • 19. Remote  Services • Remote  Service  Admin • Enterprise  SpecificaEon • Interoperability • Protocol • SOAP? • REST/JSON • Hessian
  • 20. Remote  Services «service» Server Server Client imported = "true" «service» Server ServerStub ServerProxy Registry remote = "true" «track» Remote Proxy Publisher Publisher «service» «service» Discovery Discovery Service Service
  • 21. Remote  Services «service» Server Server Client imported = "true" «service» Server ServerStub ServerProxy Registry remote = "true" «track» Remote Proxy Publisher Publisher «service» «service» Stubs Discovery Proxies Discovery Service Service
  • 22. Remote  Services  in  Celix • REST/JSON • Basic  implementaEon  working • Hessian • Basic  (de)serializaEon  implementaEon  made • Todo • Generate  code  for  endpoints  (stubs/proxies) • Test/Implement  interoperability  with  Java
  • 23. Demo  -­‐  Remote  Services • Calculator  Example  Service struct example_service { example_t example; celix_status_t (*add)(example_t example, double a, double b, double *result); celix_status_t (*sub)(example_t example, double a, double b, double *result); celix_status_t (*sqrt)(example_t example, double a, double *result); }; • Calculator  Shell  Commands • add  /  sub  /  sqrt • Endpoints  using  REST  /  JSON • Embedded  Mongoose  webserver
  • 24. Demo  -­‐  Remote  Services • Calculator  Example  Service struct example_service { example_t example; celix_status_t (*add)(example_t example, double a, double b, double *result); celix_status_t (*sub)(example_t example, double a, double b, double *result); celix_status_t (*sqrt)(example_t example, double a, double *result); }; • Calculator  Shell  Commands • add  /  sub  /  sqrt • Endpoints  using  REST  /  JSON • Embedded  Mongoose  webserver
  • 25. PlaJorm  Support • Apache  Portable  RunEme • Linux,  Unix,  Windows,  etc • Memory  pool • File  handling • Threads • No  RealTime/Embedded • Reuse  APR  API
  • 26. Building • CMake • Cross  pladorm  /  MulE  IDE • Framework • Standard  library • Bundle  macros • Create  bundle  zip • Add  library  and  resources
  • 27. Universal  OSGi • RFP-­‐89 • Proposed  to  the  mailing  list  in  2007 • Since  then  remained  silent • Ongoing  effort  to  pick  up  again • Supported  Languages • C++  /  .NET  language  (C#)  /  ECMAScript • What  about  C? • Interest  from  Community?
  • 28. Universal  OSGi  -­‐  Celix • NaEve  port  in  C • Status • Based  on  the  R4  SpecificaEon • Deployable  bundles • Bundle  lifecycle • Service  registry • Framework  API • Standards  for  IPC  and  communicaEons • Remote  Services
  • 29. Status  -­‐  Framework • Dynamic  Loading  of  Libraries • Service  Registry  for  Querying  and  Registering • Bundles  with  Manifest  for  Deployment • Service  Tracker  for  tracking  Services • Bundle  State  and  Life  Cycle • Bundle  Cache  for  Storing  State
  • 30. Status  -­‐  Extras • Shell  ImplementaEon  for  InspecEng  Bundles • ps/start/stop/install/update/uninstall  commands • Dependency  Manager  for  Dependencies • Simple  ImplementaEon • StaEc  Linked • Open  Source  at  Apache • Currently  in  the  Incubator
  • 31. Apache  Celix • Roadmap • ...   • Deployment  Admin • Remote  Services • ConfiguraEon  Admin • Event  Admin • Looking  for • Users  /  Testers  /  CommiKers
  • 32. Links • Original  Proposal: • hKp://wiki.apache.org/incubator/CelixProposal • Incubator  Mailing  List  Archive: • hKp://incubator.markmail.org/search/?q=Celix • IncubaEon  Status: • hKp://incubator.apache.org/projects/celix.html • Project  Page: • hKp://incubator.apache.org/celix/