Re: [osgi-dev] Tool/API to analyze component dependencies
Hi Alain It’s not possible to model this accurately at build time because services may come and go at runtime, and their service properties may change with configuration. Added to this it is also possible to change the target filters on references which changes/restricts what they may bind to. Another potential pitfall with the static approach is that not all services are provided with DS. At the very least you would also need to analyse the Provide-Capability header to find other services. In summary, the best that you can do with static analysis is to come up with a guess of how things might wire. The Runtime DTOs will tell you how things have actually wired. Best Regards, Tim > On 17 Jul 2018, at 13:14, BJ Hargrave via osgi-dev > wrote: > > Yes, that is at runtime. > -- > > BJ Hargrave > Senior Technical Staff Member, IBM // office: +1 386 848 1781 > OSGi Fellow and CTO of the OSGi Alliance // mobile: +1 386 848 3788 > hargr...@us.ibm.com > > > - Original message - > From: Alain Picard > To: hargr...@us.ibm.com > Cc: osgi-dev@mail.osgi.org > Subject: Re: [osgi-dev] Tool/API to analyze component dependencies > Date: Tue, Jul 17, 2018 8:07 AM > > Thanks BJ, from what I see that will do the trick, expect that it is runtime, > but I can live with that. > > Alain > > On Tue, Jul 17, 2018 at 7:58 AM BJ Hargrave <mailto:hargr...@us.ibm.com>> wrote: > Look at the ServiceComponentRuntime service: > https://osgi.org/specification/osgi.cmpn/7.0.0/service.component.html#service.component-introspection > > <https://osgi.org/specification/osgi.cmpn/7.0.0/service.component.html#service.component-introspection> > > It provides access to DTOs which describe each component description, > ComponentDescriptionDTO, and actual component instances, > ComponentConfigurationDTO. You can follows the ReferenceDTOs to see the > dependency graph. > > > -- > > BJ Hargrave > Senior Technical Staff Member, IBM // office: +1 386 848 1781 > OSGi Fellow and CTO of the OSGi Alliance // mobile: +1 386 848 3788 > hargr...@us.ibm.com <mailto:hargr...@us.ibm.com> > > > - Original message - > From: Alain Picard via osgi-dev <mailto:osgi-dev@mail.osgi.org>> > Sent by: osgi-dev-boun...@mail.osgi.org > <mailto:osgi-dev-boun...@mail.osgi.org> > To: osgi-dev@mail.osgi.org <mailto:osgi-dev@mail.osgi.org> > Cc: > Subject: [osgi-dev] Tool/API to analyze component dependencies > Date: Tue, Jul 17, 2018 6:27 AM > > As I'm going through our migration to DS I am in need of understanding our > component "graph" and to make sure there are no cycles. For the core ones, I > manually created of small dot file from the @Reference and used graphviz to > render. > > Now I am looking for some API to automate the process, at dev time if > possible. AFAIK, DS will read the component.xml and create a registry with > all info. Can I make use of this resolution to grab all the info that I need? > > Thanks > Alain > ___ > OSGi Developer Mail List > osgi-dev@mail.osgi.org <mailto:osgi-dev@mail.osgi.org> > https://mail.osgi.org/mailman/listinfo/osgi-dev > <https://mail.osgi.org/mailman/listinfo/osgi-dev> > > > > ___ > OSGi Developer Mail List > osgi-dev@mail.osgi.org > https://mail.osgi.org/mailman/listinfo/osgi-dev ___ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev
Re: [osgi-dev] Tool/API to analyze component dependencies
Yes, that is at runtime. --BJ HargraveSenior Technical Staff Member, IBM // office: +1 386 848 1781OSGi Fellow and CTO of the OSGi Alliance // mobile: +1 386 848 3788hargr...@us.ibm.com - Original message -From: Alain Picard To: hargr...@us.ibm.comCc: osgi-dev@mail.osgi.orgSubject: Re: [osgi-dev] Tool/API to analyze component dependenciesDate: Tue, Jul 17, 2018 8:07 AM Thanks BJ, from what I see that will do the trick, expect that it is runtime, but I can live with that. Alain On Tue, Jul 17, 2018 at 7:58 AM BJ Hargravewrote: Look at the ServiceComponentRuntime service: https://osgi.org/specification/osgi.cmpn/7.0.0/service.component.html#service.component-introspection It provides access to DTOs which describe each component description, ComponentDescriptionDTO, and actual component instances, ComponentConfigurationDTO. You can follows the ReferenceDTOs to see the dependency graph. --BJ HargraveSenior Technical Staff Member, IBM // office: +1 386 848 1781OSGi Fellow and CTO of the OSGi Alliance // mobile: +1 386 848 3788hargr...@us.ibm.com - Original message -From: Alain Picard via osgi-dev Sent by: osgi-dev-boun...@mail.osgi.orgTo: osgi-dev@mail.osgi.orgCc:Subject: [osgi-dev] Tool/API to analyze component dependenciesDate: Tue, Jul 17, 2018 6:27 AM As I'm going through our migration to DS I am in need of understanding our component "graph" and to make sure there are no cycles. For the core ones, I manually created of small dot file from the @Reference and used graphviz to render. Now I am looking for some API to automate the process, at dev time if possible. AFAIK, DS will read the component.xml and create a registry with all info. Can I make use of this resolution to grab all the info that I need? Thanks Alain ___OSGi Developer Mail Listosgi-dev@mail.osgi.orghttps://mail.osgi.org/mailman/listinfo/osgi-dev ___ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev
Re: [osgi-dev] Tool/API to analyze component dependencies
Look at the ServiceComponentRuntime service: https://osgi.org/specification/osgi.cmpn/7.0.0/service.component.html#service.component-introspection It provides access to DTOs which describe each component description, ComponentDescriptionDTO, and actual component instances, ComponentConfigurationDTO. You can follows the ReferenceDTOs to see the dependency graph. --BJ HargraveSenior Technical Staff Member, IBM // office: +1 386 848 1781OSGi Fellow and CTO of the OSGi Alliance // mobile: +1 386 848 3788hargr...@us.ibm.com - Original message -From: Alain Picard via osgi-dev Sent by: osgi-dev-boun...@mail.osgi.orgTo: osgi-dev@mail.osgi.orgCc:Subject: [osgi-dev] Tool/API to analyze component dependenciesDate: Tue, Jul 17, 2018 6:27 AM As I'm going through our migration to DS I am in need of understanding our component "graph" and to make sure there are no cycles. For the core ones, I manually created of small dot file from the @Reference and used graphviz to render. Now I am looking for some API to automate the process, at dev time if possible. AFAIK, DS will read the component.xml and create a registry with all info. Can I make use of this resolution to grab all the info that I need? Thanks Alain ___OSGi Developer Mail Listosgi-dev@mail.osgi.orghttps://mail.osgi.org/mailman/listinfo/osgi-dev ___ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev