tag:blogger.com,1999:blog-9210566578097047576.post5739084354481876042..comments2023-11-05T02:04:07.740-08:00Comments on <coderthoughts />: Distributed OSGi – A Simple ExampleDavid Bosschaerthttp://www.blogger.com/profile/13786738766478890804noreply@blogger.comBlogger27125tag:blogger.com,1999:blog-9210566578097047576.post-50747775051423480412015-03-27T02:22:42.830-07:002015-03-27T02:22:42.830-07:00The OSGi Remote Services specifications do not spe...The OSGi Remote Services specifications do not specify the protocol being used. That is up to the implementation. You might find an implementation that supports UDP if you look at the available implementations in <a href="http://en.wikipedia.org/wiki/OSGi_Specification_Implementations" rel="nofollow">http://en.wikipedia.org/wiki/OSGi_Specification_Implementations</a>.David Bosschaerthttps://www.blogger.com/profile/13786738766478890804noreply@blogger.comtag:blogger.com,1999:blog-9210566578097047576.post-358361729269132122015-03-27T02:11:58.602-07:002015-03-27T02:11:58.602-07:00Thank you for your response.
I’ve read some relat...Thank you for your response. <br />I’ve read some related documents here http://www.osgi.org/Specifications/HomePage, however I have not found TCP or UDP protocol specification. Can you help me more detail, please?<br />Huynh Ngoc Thohttps://www.blogger.com/profile/15848091238856365972noreply@blogger.comtag:blogger.com,1999:blog-9210566578097047576.post-53967172939269743882015-03-27T01:19:10.052-07:002015-03-27T01:19:10.052-07:00Hi Huynh Ngoc Tho, this implementation uses TCP, b...Hi Huynh Ngoc Tho, this implementation uses TCP, but the OSGi Remote Services specification doesn't prescribe the technology being used. If you look at the <a href="http://en.wikipedia.org/wiki/OSGi_Specification_Implementations" rel="nofollow">OSGi Specification Implementations</a> page (chapter 100 section) you may find other implementations that support other protocols including UDP...David Bosschaerthttps://www.blogger.com/profile/13786738766478890804noreply@blogger.comtag:blogger.com,1999:blog-9210566578097047576.post-68139900066021336782015-03-26T14:22:12.918-07:002015-03-26T14:22:12.918-07:00Hi, i have a problem relating to DOSGi, i tried th...Hi, i have a problem relating to DOSGi, i tried this example and i saw that DOSGi use TCP (at transport layer) for communication.<br /><br />Can we configure it with UDP ?Huynh Ngoc Thohttps://www.blogger.com/profile/15848091238856365972noreply@blogger.comtag:blogger.com,1999:blog-9210566578097047576.post-29338699747475532472011-05-18T00:44:38.746-07:002011-05-18T00:44:38.746-07:00Hi Hannes,
This blog article is a little bit outd...Hi Hannes,<br /><br />This blog article is a little bit outdated and some of the properties have been renamed in the Remote Services specification when it was finalized.<br /><br />Have you tried the examples linked from the CXF-DOSGi page: <a href="http://cxf.apache.org/distributed-osgi.html" rel="nofollow">http://cxf.apache.org/distributed-osgi.html</a>? They should all work well with the distribution you are using. A good place to start is the <a href="http://cxf.apache.org/distributed-osgi-greeter-demo-walkthrough.html" rel="nofollow">Greeter demo</a>.David Bosschaerthttps://www.blogger.com/profile/13786738766478890804noreply@blogger.comtag:blogger.com,1999:blog-9210566578097047576.post-40124834130161880562011-05-17T23:08:06.633-07:002011-05-17T23:08:06.633-07:00Hi David,
I have the same problem as weishan with...Hi David,<br /><br />I have the same problem as weishan with the server in your example.<br />If I request <br /><br />"services (objectClass=*Publication)"<br /><br />via the OSGI console, the message "No registered services." are printed out. Requesting the WSDL via Webbrowser, there is an HTTP404 error because the requested URI can't be found.<br />I'm using the current CXF singlebundle distribution (1.2.0).<br /><br />Is there anything needed to change in your example sothat it works well?<br /><br />Thanks<br />HannesSCEhttps://www.blogger.com/profile/09108823475210165080noreply@blogger.comtag:blogger.com,1999:blog-9210566578097047576.post-24202680629838328982011-04-19T01:11:47.574-07:002011-04-19T01:11:47.574-07:00Hi,
I was wondering if it's possibile to conf...Hi, <br />I was wondering if it's possibile to configure Zookeeper in order to first discover the ZooKeeper server and then access it. My intention is to configure the ZooKeeper clients without a static URL of the ZooKeeper.<br />Do you know if this is possibile?<br /><br />Thank youAnonymoushttps://www.blogger.com/profile/09472528477683306219noreply@blogger.comtag:blogger.com,1999:blog-9210566578097047576.post-63499550492277877492011-03-08T19:13:59.643-08:002011-03-08T19:13:59.643-08:00Nice post for looking at dosgi. I met a problem fo...Nice post for looking at dosgi. I met a problem for could not access the wsdl for all the dosgi posts using the latest dosgi release. One possible problem is that the new 1.2 dosgi release is not compatible? Because when i try to replace the 1.1snap shot release in this post: http://blog.akquinet.de/2009/09/14/distributed-osgi-application-with-apache-cxf-dosgi/#more-191, i could not access the wsdl either.Unknownhttps://www.blogger.com/profile/01321866549673145789noreply@blogger.comtag:blogger.com,1999:blog-9210566578097047576.post-12077625245504603202011-01-27T08:48:04.741-08:002011-01-27T08:48:04.741-08:00Hi David,
_______________________________________...Hi David,<br /><br />____________________________________________ <br />INFO: Notified - AVAILABLE: [org.myproject.webservices.yyy.Monitor] endpoint id: 984b7c00-044d-4433-927d-638c9a657e1a <br />27 janv. 2011 12:00:53 org.apache.cxf.dosgi.dsw.hooks.AbstractClientHook unknownEndpointId <br />INFO: registering proxy for endpoint ID: 984b7c00-044d-4433-927d-638c9a657e1a <br />27 janv. 2011 12:00:53 org.apache.cxf.dosgi.dsw.hooks.AbstractClientHook cacheEndpointId <br />INFO: caching proxy registration for endpoint ID: 984b7c00-044d-4433-927d-638c9a657e1a <br />____________________________________________ <br /><br />The single bundle dosgi cxf distrib shows at inspection: <br />____________________________________________ <br />objectClass = org.myproject.webservices.yyy.Monitor <br />org.apache.cxf.remote.dsw.client = Distributed OSGi Distribution Software Single-Bundle Distribution, version : 1.1.0.SNAPSHOT <br />osgi.remote.configuration.pojo.address = http://xx.yy.zz.tt//webservice/service.php?wsdl<br />osgi.remote.configuration.type = wsdl <br />osgi.remote.endpoint.id = 984b7c00-044d-4433-927d-638c9a657e1a <br />osgi.remote.interfaces = * <br />osgi.remote.service.interfaces = <br />service.id = 13 <br />service.imported = true <br />service.imported.configs = wsdl <br />________________________________________ <br /><br /><br />So I could simply GET this service with a tracker or other mecanisms - iPOJO, DS,... <br /><br />But I tried with a ServiceTracker and couldn't get any reference to this service. <br /><br />Are there specific version of bundles to use, I mean compendium-4.2 with cxf-dosgi-1.1 ....? <br /><br />Or what else ....?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-9210566578097047576.post-73049366238479632912011-01-20T04:50:44.544-08:002011-01-20T04:50:44.544-08:00Hi Pierre-Henry
Yes, you can use a remote url in ...Hi Pierre-Henry<br /><br />Yes, you can use a remote url in the osgi.remote.configuration.pojo.address. If I understand correctly you want to invoke a remote Web Service (which is not an OSGi service) as an OSGi Service. <br />What you need to do in this case is get a Java interface to that service and use that from the client side. As the osgi.remote.configuration.pojo.address (newer versions use org.apache.cxf.ws.address) the URL of your remote web service. Effectively what you're doing is replacing one of the sides of the Distributed OSGi demo with a non-OSGi implementation. <br />You might find more information here: <a href="http://cxf.apache.org/distributed-osgi.html" rel="nofollow">http://cxf.apache.org/distributed-osgi.html</a>...<br /><br />Best regards,<br /><br />DavidDavid Bosschaerthttps://www.blogger.com/profile/13786738766478890804noreply@blogger.comtag:blogger.com,1999:blog-9210566578097047576.post-4917995816036030932011-01-20T03:23:53.300-08:002011-01-20T03:23:53.300-08:00Thanks for the demo.
I have inspected the dosgi b...Thanks for the demo.<br /><br />I have inspected the dosgi bundle and get this print:<br />_________________<br />objectClass = org.coderthoughts.auction.AuctionService<br />org.apache.cxf.remote.dsw.client = Distributed OSGi Distribution Software Single-Bundle Distribution, version : 1.1.0.SNAPSHOT<br />osgi.remote.configuration.pojo.address = http://localhost:8080/auction/<br />osgi.remote.configuration.type = pojo<br />osgi.remote.endpoint.id = 5e4e9de1-a733-4953-8f36-ef5e038ca9fb<br />osgi.remote.interfaces = *<br />osgi.remote.service.interfaces = <br />service.id = 52<br />service.imported = true<br />service.imported.configs = org.apache.cxf.ws<br />_________________________________<br /><br />I had two questions:<br />1 - I suppose I can use a distant url in ws property, meaning I want to IMPORT a remote ws as an OSGi service ?<br /><br />2 - If so, how can I use it on the OSGi platfrom when it has been imported ?<br /><br />ThanksAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-9210566578097047576.post-56742848546169433772010-11-22T01:25:33.534-08:002010-11-22T01:25:33.534-08:00Hi David,
Thank you for this demo.
In the demo y...Hi David,<br /><br />Thank you for this demo.<br /><br />In the demo you are using the interface bundle on both the client and server side. Is it possible to not use the interface bundle on the client side and use the remote interface: in a distributed environment, we can discover unknown services and we don't have the interfaces describing them.<br /><br />Regards,<br />HamdiUnknownhttps://www.blogger.com/profile/02474595762803252952noreply@blogger.comtag:blogger.com,1999:blog-9210566578097047576.post-35303435769304635092010-11-22T01:12:22.346-08:002010-11-22T01:12:22.346-08:00Hi david,
Thank you for this demo, I notice that ...Hi david,<br /><br />Thank you for this demo, I notice that you are using the interface bundle on both the client and server side. Is it possible to not use the bundle on the client side, and use the remote interface: In a distributed environment,we can discover unknown services, and then we don't know the interface describing them on the client side.<br /><br />Regards,<br />HamdiUnknownhttps://www.blogger.com/profile/02474595762803252952noreply@blogger.comtag:blogger.com,1999:blog-9210566578097047576.post-84457732429074366642010-07-22T23:31:49.781-07:002010-07-22T23:31:49.781-07:00Hi Nirmal,
If the same service is exposed by mult...Hi Nirmal,<br /><br />If the same service is exposed by multiple remote frameworks it will appear multiple times in the registry, as you say. Having the same service appear multiple times in the OSGi Service Registry is not unusual at all. It can also happen locally and whether you want one of the services or are interested in all of them depends on the nature of the service. <br />I once wrote <a href="http://coderthoughts.blogspot.com/2007/11/osgi-services-for-dynamic-applications.html" rel="nofollow">a card game using OSGi services</a> where every card was represented as a service. In that case I wanted all of them. However, in other cases you may want to select one service that best fits your needs. Selecting a service is done using an LDAP-style Filter which is typically passed into the <a href="http://www.osgi.org/javadoc/r4v42/org/osgi/util/tracker/ServiceTracker.html" rel="nofollow">OSGi ServiceTracker</a>. The filter selects the service based on it's properties (a service has an arbitrary map of properties associated with it).<br /><br />The Distributed case is no different. If the same service appears multiple times and you only need to invoke one you can select the best one based on its properties. You could use this information to select the service automatically with a load balancer. A service could publish (and periodically update) a property which advertises its load and the load balancer could automatically select the service with the lowest load... Such a load balancer is not typically built in to Distributed OSGi products, but it can be built on top of the existing primitives...David Bosschaerthttps://www.blogger.com/profile/13786738766478890804noreply@blogger.comtag:blogger.com,1999:blog-9210566578097047576.post-69151016059581493722010-07-22T17:21:25.565-07:002010-07-22T17:21:25.565-07:00Hi David,
Thanks for your reply. I do agree putti...Hi David,<br /><br />Thanks for your reply. I do agree putting all services in remote is not a good idea.<br /><br />But what would happen if multiple containers expose the same service. How can the consumer choose which service to hit dynamically? Is there any load balancer inside container?Nirmalhttps://www.blogger.com/profile/05398051996229283882noreply@blogger.comtag:blogger.com,1999:blog-9210566578097047576.post-26497917809537136172010-07-19T01:55:51.273-07:002010-07-19T01:55:51.273-07:00Hi Nirmal,
Yes it is possible to create a remote ...Hi Nirmal,<br /><br />Yes it is possible to create a remote service registry. This is one of the models suggested in the Remote Service Admin specification (Chapter 122 in the <a href="http://www.osgi.org/Download/Release4V42" rel="nofollow">Enterprise Spec</a>). Together with the Service Registry Hooks (Chapter 12 in the <a href="http://www.osgi.org/Download/Release4V42" rel="nofollow">Core Spec</a>) services can be looked up in the remote service registry when needed. Services will still be mirrored in the local service registry BTW. <br /><br />Additionally, I don't think it's a good idea to put <b><i>all</i></b> your OSGi Services in the Remote Service Registry. Certain services are designed for local use only (e.g. think about the log service), so it won't make much sense to put them in a remote service registry, so which services you put in there depends on their role in the system.David Bosschaerthttps://www.blogger.com/profile/13786738766478890804noreply@blogger.comtag:blogger.com,1999:blog-9210566578097047576.post-79499848093437718952010-07-16T16:10:14.860-07:002010-07-16T16:10:14.860-07:00I recently studied about combination of Cloud comp...I recently studied about combination of Cloud computing and OSGi. I am<br />particularly interested in scalability of the service registry in the cloud. Is it possible for service registry to be moved to separate<br />instance in cloud for manageability?<br /><br />ThanksNirmalhttps://www.blogger.com/profile/05398051996229283882noreply@blogger.comtag:blogger.com,1999:blog-9210566578097047576.post-26092626897024518842010-06-10T09:34:21.658-07:002010-06-10T09:34:21.658-07:00Good demo,
Can the OSGi bundle access bundle acce...Good demo,<br /><br />Can the OSGi bundle access bundle access the web service implemented in web server?Unknownhttps://www.blogger.com/profile/11826034529457655988noreply@blogger.comtag:blogger.com,1999:blog-9210566578097047576.post-8702450856071673042010-05-17T14:11:10.646-07:002010-05-17T14:11:10.646-07:00RESTful services can be exposed nearly the same wa...RESTful services can be exposed nearly the same way as SOAP services can, some info is here<br /><br />http://cxf.apache.org/docs/jax-rs.html#JAX-RS-IntegrationwithDistributedOSGi<br /><br />cheers, SergeySergey Beryozkinhttps://www.blogger.com/profile/06251894780466207746noreply@blogger.comtag:blogger.com,1999:blog-9210566578097047576.post-19577251439548899432010-05-17T05:02:22.579-07:002010-05-17T05:02:22.579-07:00Hi David, great tutorial, but how can one expose R...Hi David, great tutorial, but how can one expose RESTful instead of SOAP Service with cxf dosgi?Georgi Dimitrovhttps://www.blogger.com/profile/10514081078310137844noreply@blogger.comtag:blogger.com,1999:blog-9210566578097047576.post-85348327491171175892009-08-21T00:59:36.728-07:002009-08-21T00:59:36.728-07:00Hi AOZ, have a look at http://cxf.apache.org/distr...Hi AOZ, have a look at <a href="http://cxf.apache.org/distributed-osgi-greeter-demo-walkthrough.html" rel="nofollow">http://cxf.apache.org/distributed-osgi-greeter-demo-walkthrough.html</a>. That uses Equinox 3.5 as the client side. I've just tried it with Equinox 3.5 GA on both the provider side and the consumer side and it worked for me.<br /><br />NB the name of the equinox org.eclipse.osgi_xxx.jar and org.eclipse.osgi.services_xxx.jar might vary slightly depending on your 3.5 build.<br /><br />Hope this helps,<br /><br />DavidDavid Bosschaerthttps://www.blogger.com/profile/13786738766478890804noreply@blogger.comtag:blogger.com,1999:blog-9210566578097047576.post-69790243552862602122009-08-20T11:48:32.442-07:002009-08-20T11:48:32.442-07:00Hi all,
All the D-OSGi Demos that I had inspected...Hi all,<br /><br />All the D-OSGi Demos that I had inspected choose Felix as a consumer-side. I am struggling in building an pure Eclipse (3.5) Demo that uses Equinox as OSGi container for both sides (Service provider and Service Consumer). Following the steps mentioned in this post, I success to publish the Service (as I request the WSDL), but the Consumer bundle (which is installed correctly) fails to discover it!!<br /><br />I post this comment just to declare my amazement on the D-OSGi Demos !!<br /><br />Regards,<br />AOZDr. Abdullah Zaghameemhttps://www.blogger.com/profile/10581863958798024340noreply@blogger.comtag:blogger.com,1999:blog-9210566578097047576.post-51686406334436172672009-06-07T15:26:16.604-07:002009-06-07T15:26:16.604-07:00I have a version of the demo with easy to reproduc...I have a version of the demo with easy to reproduce steps: <a href="http://code.google.com/p/apache-cxf-dosgi-demo/" rel="nofollow">http://code.google.com/p/apache-cxf-dosgi-demo/</a><br /><br />for anyone interested.Nalla Senthilnathanhttps://www.blogger.com/profile/16943363672635420201noreply@blogger.comtag:blogger.com,1999:blog-9210566578097047576.post-34354601430417763772009-02-20T11:50:00.000-08:002009-02-20T11:50:00.000-08:00Nice article, but I have to comment on semantics.....Nice article, but I have to comment on semantics...<BR/><BR/>Java is strictly pass-by-value.<BR/><BR/>What you're referring to as "pass-by-reference" really should be worded as "passing non-primitive/non-String-pointer" values.<BR/><BR/>You make a good point, but it makes language/compiler folks like me cringe when "pass-by-reference" is used in a Java context...<BR/><BR/>Please see http://javadude.com/articles/passbyvalue.htm for details.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-9210566578097047576.post-74617314244356803252009-02-03T05:52:00.000-08:002009-02-03T05:52:00.000-08:00I agree about scalability. 150 was just an example...I agree about scalability. 150 was just an example.<BR/><BR/>My concern was more about manageability. From experience having a lot of unrelated bundles in the same VM makes it harder to organize and support, especially in terms of start levels.<BR/><BR/>Hopefully Distribution can help on this matter.Frederic Conrottehttps://www.blogger.com/profile/09690816043693205755noreply@blogger.com