Return-Path: X-Original-To: apmail-incubator-celix-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-celix-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C9DED10705 for ; Thu, 5 Dec 2013 16:18:29 +0000 (UTC) Received: (qmail 11389 invoked by uid 500); 5 Dec 2013 16:18:29 -0000 Delivered-To: apmail-incubator-celix-dev-archive@incubator.apache.org Received: (qmail 11352 invoked by uid 500); 5 Dec 2013 16:18:24 -0000 Mailing-List: contact celix-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: celix-dev@incubator.apache.org Delivered-To: mailing list celix-dev@incubator.apache.org Received: (qmail 11344 invoked by uid 99); 5 Dec 2013 16:18:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Dec 2013 16:18:23 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of a.broekhuis@gmail.com designates 209.85.128.42 as permitted sender) Received: from [209.85.128.42] (HELO mail-qe0-f42.google.com) (209.85.128.42) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Dec 2013 16:18:18 +0000 Received: by mail-qe0-f42.google.com with SMTP id b4so16929139qen.1 for ; Thu, 05 Dec 2013 08:17:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=jL+s4rPQlXkhDZNyiSM/hjtBegh37bCctLr8IDYnL4w=; b=ierL7QDd75rc7xcuasQFeUZFjim/v4NIwLnDboOGWF9+Bw4IgliVceCd3+NsUwD6cB irh6e3DAHWFZeJqFFxp0Y82zQPvmGCwXrYIblEHYC0umkvgnxFYZHlIHYoJi1LBsXe0W 55vTyN2TpqJTGG7kkwl9k7kNk/PkaUOetm+R2mk0Vt3ZoR+fGdGA40WNIzMS7IwJE8eS Xr/2V8mvtmq8LZb647oDskVMt5TX3PTeSqk2d/apYb3r7hSq1Ae68TSYByq3/Ldz1GSz 5NwXW63lPzqRmQEeIbc7Nogwq9LQ+QvzuElK5Ues5p7evEMFTlCdI5fNJ33bpIFcmRnJ Coeg== MIME-Version: 1.0 X-Received: by 10.49.127.101 with SMTP id nf5mr149086160qeb.61.1386260278022; Thu, 05 Dec 2013 08:17:58 -0800 (PST) Received: by 10.96.14.134 with HTTP; Thu, 5 Dec 2013 08:17:57 -0800 (PST) In-Reply-To: <11a25c20b9e79462c12693cafc016bfe@imap.sundevil.de> References: <5213C63A.1050002@gmail.com> <52150460.7070606@gmail.com> <52356979.1040002@sundevil.de> <03fa0772516eaaab4c1fcf59f52f00e9@imap.sundevil.de> <5238198D.8050209@sundevil.de> <4f9dbca6c64a7583e34c4be4cab8eadc@imap.sundevil.de> <52454D60.9030906@sundevil.de> <617379229e8f0bcdc85d3ed8fe429f1d@imap.sundevil.de> <11a25c20b9e79462c12693cafc016bfe@imap.sundevil.de> Date: Thu, 5 Dec 2013 17:17:57 +0100 Message-ID: Subject: Re: Remote service using shared mem From: Alexander Broekhuis To: celix-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=047d7b6dc0bc70257804eccbdf7f X-Virus-Checked: Checked by ClamAV on apache.org --047d7b6dc0bc70257804eccbdf7f Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Bjoern, I'm now trying to apply the patch and have some new issues, I've added some remarks in between: * It is created against an older revision, some small changes that easily can be fixed. For a final patch I'd like this to be solved, but isn't a big issue. * It now uses "semtimedop", which is a GLibC function (and not posix) so now it doesn't work on OSX. While I think we should work towards a broader support with these kind of things, I can live with the first version being Linux (GLibC) only. But this does mean I cannot test it at this moment.. So someone should definitely still do this (Pepijn?) * Calculator Endpoint/Proxy uses the older format for the JSON data (which is incompatible with the Amdatu RSA). This is a small change in the encoding/decoding, but isn't a big issue. * The SHM RSA uses setHandler/setCallback instead of setEndpointProperties. The existing HTTP RSA doesn't use these yet. At this moment this breaks the Calculator example when used with the HTTP RSA. Probably not that difficult to port back to the HTTP RSA. I prefer the newer method, so definitely in favour of applying those changes to the HTTP RSA as well. Some other remarks/updates not yet mentioned on this list: Yesterday we already talked about how to donate this code. Since this code introduces new bundles it makes the most sense to handle this using a Code Grant and IP Clearance. We already discussed that Pepijn is willing to do the paper work, so hopefully it al doesn't take that much time. So to summarize (in order): 1) We need a working set of bundles (at least tested on Linux, preferably on OSX as well). Existing code should still work as well. 2) After that a code grant with Issue number and MD5 sum needs to be filled in and filed. 3) Finally the IP Clearance should be handled. I have some time to do some work, so I can help out a bit. For now I'll work on getting the setHandler/setCallback method in the HTTP RSA as well, if that is in place, ideally you shouldn't need to update those for the SHM RSA. Anything I forgot or overlooking? 2013/12/4 Bj=F6rn Petri > > > I updated the functionality of the discovery component to ensure that all > threads perform its update routine, when a service was added/stopped or t= he > discovery bundle is stopped. > > I would be happy if you find the time to give it a short check. > > Regards, > Bjoern > > > > > > Am 2013-10-03 14:07, schrieb Bj=F6rn Petri: > > Hi Alexander, >> >> introducing the lock in the discovery_stop function was done with >> purpose. The unlocking and locking should enable all >> discovery-polling-threads to update their local list of services and >> in the case of the stopping discovery bundle it should allow the >> thread to leave it's loop (the loop control variable should be set to >> false before performing the unlock and lock). So, it should actually >> not wait on the join - I'll take a look at the code and check what is >> going on there. >> >> Regards, >> Bj=F6rn >> >> >> >> >> Am 2013-10-03 11:59, schrieb Alexander Broekhuis: >> >>> Hi Bjoern, >>> >>> I have some problems with the discovery now. If I try to stop the >>> discovery >>> bundle, it tries to join the discovery thread, but somehow the lock isn= 't >>> released and the thread doesn't exit. >>> >>> Looking in the code, the discovery_stop now has an unlock directly >>> followed >>> by a lock. This seems to be the problem. Did a small error sneak in? Or >>> is >>> there some reason for the unlock/lock? >>> >>> I'll do some more testing later on this week, so I'll get back to you := ) >>> >>> >>> 2013/10/2 Bj=F6rn Petri >>> >>> >>>> Alexander, >>>> >>>> I updated the rs shared memory implementation to >>>> >>>> (1) use System-V shared memory routines instead of ones from APR, >>>> (2) make use of your install_bundles macro, >>>> (3) perform some necessary cleanup when the exported service is stoppe= d >>>> (This is also missing in the "standard"-rsa implementation). See >>>> remoteServiceAdmin_**removeExportedService function for details, >>>> (4) get rid of the linking of the example_proxy against the rsa_shm, >>>> (5) and fixed some minor bugs. >>>> >>>> looking forward to your feedback, >>>> Bjoern >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> Am 2013-09-27 16:11, schrieb Alexander Broekhuis: >>>> >>>> 2013/9/27 Bj=F6rn Petri >>>> >>>>> >>>>> On 09/18/2013 06:29 PM, Alexander Broekhuis wrote: >>>>> >>>>>> >>>>>> I checked it, and there are some small leftovers in the code. The >>>>>> proxy >>>>>> >>>>>>> still includes the rsa and also links with the library. >>>>>>> >>>>>>> >>>>>>> How do you want to get rid of this dependency? The proxy needs to >>>>>> include >>>>>> definition of the remote_proxy_service as well as the rsa does. Do I >>>>>> miss >>>>>> something? >>>>>> >>>>>> >>>>>> Since the proxy now uses the function pointer and only the service >>>>> struct >>>>> of the RSA it only needs the header files (as far as I can tell). Als= o, >>>>> with the concept of bundles, and Celix not supporting code-sharing at >>>>> this >>>>> point, bundles (actually the library in it) should never link to a >>>>> library >>>>> of any other bundle. >>>>> Libraries are loaded locally, so the symbols aren't shared with >>>>> others. So >>>>> this means that if you link with another bundle, at runtime there wil= l >>>>> be >>>>> unresolved references. Hence the need for services (structs with >>>>> function >>>>> pointers) etc. >>>>> >>>>> >>>> >>>> > --=20 Met vriendelijke groet, Alexander Broekhuis --047d7b6dc0bc70257804eccbdf7f--