Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cf-dev] Californium on OSGi

Hi,

I think there is a misunderstanding.

Adding proper OSGi meta-data does not introduce a dependency to OSGi. It only means additional information in the MANIFEST that makes a bundle usable in an OSGi context.
That also means, if users don't want OSGi, they don't need it and they should not have any additional dependency or downside.

The more modularity is only seen in californium-osgi. I have no concerns about the other modules. They should just provide proper OSGi meta-data. ;-)

Mit freundlichen Grüßen / Best regards

 Dirk Fauth

Automotive Service Solutions, ESI application (AA-AS/EIS2-EU) 
Robert Bosch GmbH | Postfach 11 29 | 73201 Plochingen | GERMANY | www.bosch.com
Tel. +49(7153)666-1155 | Dirk.Fauth@xxxxxxxxxxxx

Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart, HRB 14000; 
Aufsichtsratsvorsitzender: Franz Fehrenbach; Geschäftsführung: Dr. Volkmar Denner, 
Dr. Stefan Asenkerschbaumer, Dr. Rolf Bulander, Dr. Stefan Hartung, Dr. Markus Heyn, Dr. Dirk Hoheisel,
Christoph Kübel, Uwe Raschke, Dr. Werner Struth, Peter Tyroller



-----Ursprüngliche Nachricht-----
Von: cf-dev-bounces@xxxxxxxxxxx [mailto:cf-dev-bounces@xxxxxxxxxxx] Im Auftrag von Kraus Achim (INST/ECS4)
Gesendet: Donnerstag, 23. März 2017 08:56
An: Californium (Cf) developer discussions <cf-dev@xxxxxxxxxxx>
Betreff: Re: [cf-dev] Californium on OSGi

Hi Dirk,

I got the feeling, that you want everything in californium being OSGi aware. 
But there are lot of people, who don't need that and therefore don't want dependencies on that.
Therefore the OSGi subproject was created. If more modularity is required, I guess we will need more OSGi subprojects.

If you want to provide that, please create a new branch and prepare a PR.

Mit freundlichen Grüßen / Best regards

Achim Kraus

Bosch Software Innovations GmbH
Communications (INST/ECS4)
Stuttgarter Straße 130
71332 Waiblingen
GERMANY
www.bosch-si.de
www.blog.bosch-si.com 

Registered office: Berlin, Register court: Amtsgericht Charlottenburg, HRB 148411 B
Executives: Dr.-Ing. Rainer Kallenbach; Michael Hahn


Von: cf-dev-bounces@xxxxxxxxxxx [mailto:cf-dev-bounces@xxxxxxxxxxx] Im Auftrag von Fauth Dirk (AA-AS/EIS2-EU)
Gesendet: Dienstag, 21. März 2017 14:59
An: cf-dev@xxxxxxxxxxx
Betreff: [cf-dev] Californium on OSGi

Hi,

I am evaluating Californium for usage inside an OSGi application. I stumbled across several issues I would like to discuss:

1. Inconsistent providing of OSGi meta-data Some bundles provide proper OSGi meta-data, some not. IMHO all provided bundles should provide proper OSGi meta-data

californium-core-2.0.0-M3 - no OSGi meta-data
californium-proxy-2.0.0-M3 - no OSGi meta-data
element-connector-2.0.0-M3 -OSGi meta-data provided
scandium-2.0.0-M3 - OSGi meta-data provided

IMHO also core and proxy should provide proper OSGi meta-data 2. Californium bundles not available for installation in Eclipse To include Californium in an OSGi bundle, it needs to be downloaded from Maven Central and manually included in the target platform. I'm not sure how good it would work with Bndtools, as they have a different repository approach. But for Eclipse PDE this is not very elegant. For this the Californium bundles should be provided via p2 Update Site. Of course that also means that all projects are provided with proper OSGi information.
3. californium-osgi not modular
That bundle is not really modular in the sense of OSGi. It contains the contents of core and element-connector aswell as the OSGi extension. element-connector already provides OSGi meta-data. core would need the OSGi meta-data as said in 1. Then it should be possible to put things together on the bundle level, not putting things together in one big bundle. But I'm not sure if there are some Classloader operations inside that would avoid the clear bundle separation.
4. Netty dependency (almost) nowhere mentioned I nowhere found Netty being mentioned as a dependency. Well it is mentioned in the MANIFEST of element-connector. Without the io.netty bundles in place, californium-osgi is not starting. If I follow the Hands-on tutorial Netty is now mentioned and not needed to start the server. So I wonder if io.netty is really required or an optional dependency.
5. ManagedServer not started automatically californium-osgi contains a ManagedServer, which is a managed service that can be configured via ConfigurationAdmin and provides the white-board-pattern for registering Resources dynamically. A good idea so far, but the service is not registered automatically and therefore the server is not started. Users need to know that they have to do this manually and of course also how to do this.

IMHO the ManagedServer should be an Immediate Component, with a required configuration. This would enable to create multiple servers in one runtime with different configurations. Not sure if that makes sense, otherwise it should be a singleton service. It should have a service reference to EndPointFactory. DYNAMIC GREEDY to support dynamic exchange of it. Does that make sense?

I also noticed that there is no way to start the server. In its current state I need to create the ManagedServer instance and call update(null) to start it. It therefore requires a configuration to be set although it says it can start with a default configuration. This is also not very consistent.

For the last point I think I can try to provide something via PR. Need to test what I am able to do. But for the other topics I'm unsure. The first point looks like it could be solved easily by updating the pom.xml. The second is a bit more complicated, not sure if Eclipse Bundle Recipes could help here. 3. is dependent on whether core is doing some Classloader stuff or not, otherwise also a pom.xml point. And 4. is more a question in first place. If it is optional it is also a pom.xml topic.

Would be great if I could get some response on this. As far as it is possible for me, I would be also glad if I could help. Actually I'm even planning to write a small blog post about using Californium in OSGi, to give people some advice.

Additionally I have another question. When is the planned release date of 2.0.0? I see and test currently with a 2.0.0-M3. The Eclipse project page doesn't mention a 2.0.0 release with a release date. Is M3 already so close to the release that the needed OSGi changes can't be added anymore?


Mit freundlichen Grüßen / Best regards 

Dirk Fauth

Automotive Service Solutions, ESI application (AA-AS/EIS2-EU) Robert Bosch GmbH | Postfach 11 29 | 73201 Plochingen | GERMANY | http://www.bosch.com Tel. +49(7153)666-1155 | mailto:Dirk.Fauth@xxxxxxxxxxxx 

Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart, HRB 14000;
Aufsichtsratsvorsitzender: Franz Fehrenbach; Geschäftsführung: Dr. Volkmar Denner, Dr. Stefan Asenkerschbaumer, Dr. Rolf Bulander, Dr. Stefan Hartung, Dr. Markus Heyn, Dr. Dirk Hoheisel, Christoph Kübel, Uwe Raschke, Dr. Werner Struth, Peter Tyroller 

_______________________________________________
cf-dev mailing list
cf-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/cf-dev


Back to the top