Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 79A25200B63 for ; Mon, 15 Aug 2016 16:43:20 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 781CC160AA7; Mon, 15 Aug 2016 14:43:20 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BCF2D160A8A for ; Mon, 15 Aug 2016 16:43:19 +0200 (CEST) Received: (qmail 6602 invoked by uid 500); 15 Aug 2016 14:43:18 -0000 Mailing-List: contact users-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@qpid.apache.org Delivered-To: mailing list users@qpid.apache.org Received: (qmail 6591 invoked by uid 99); 15 Aug 2016 14:43:18 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Aug 2016 14:43:18 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 03A6EC1709 for ; Mon, 15 Aug 2016 14:43:18 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -5.541 X-Spam-Level: X-Spam-Status: No, score=-5.541 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.519, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 3dtddgqWw8bh for ; Mon, 15 Aug 2016 14:43:17 +0000 (UTC) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 450DF5FBC4 for ; Mon, 15 Aug 2016 14:43:16 +0000 (UTC) Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1A6E78E3E4 for ; Mon, 15 Aug 2016 14:43:15 +0000 (UTC) Received: from marigold ([10.18.97.234]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u7FEhDJu008549 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 15 Aug 2016 10:43:14 -0400 Message-ID: <1471272193.3093.20.camel@redhat.com> Subject: Re: custom store plugin for qpidd From: Andrew Stitcher To: users@qpid.apache.org Date: Mon, 15 Aug 2016 10:43:13 -0400 In-Reply-To: References: <1471023103.3446.27.camel@redhat.com> <1471268804.3093.7.camel@redhat.com> Organization: Red Hat Inc Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 15 Aug 2016 14:43:15 +0000 (UTC) archived-at: Mon, 15 Aug 2016 14:43:20 -0000 On Mon, 2016-08-15 at 09:58 -0400, Matt Broadstone wrote: > ... > It's also my understanding that, in general, there's a requirement > than any > given store plugin be loaded one at a time (though you're correct > that it > seems the two windows plugins may be loaded simultaneously). I think > what > I'm really getting at here is if there is any downside to converting > the > store plugin to a shared library, rather than a cmake module, and > linking > each plugin that currently requires it directly to it - rather than > passing > arguments like: `--load-module store --load-module > my-custom-store-plugin`?  The existing windows mssql plugins seem to > depend > on undefined behavior in cmake, in that a `MODULE` target is built > exactly > like a `SHARED` target. > > That's what I've done in my local code and it seems to work just > fine, just > wanted to make sure I wasn't inadvertently breaking the windows path. > Unfortunately, I don't think I'll have the time to take over the > store > plugin refactor you're discussing, but I do agree that it sounds like > the > right way to go in terms of consistency and helping future > implementors. Ah, now this I can answer more authoritatively! (As I'm responsible for the current qpidd plugin architecture - to the extent it can be called that at all!) All plugins can be built intop qpidd from the functionality POV (allowing for some exceptions like only allowing one store plugin). This is because there is no plugin API as such. All plugin API registration currently occurs as a side effect of static global initialisation. It just so happens that on all platforms we care about loading a shared object/DLL will run the static initialisation code for the loaded code. Now if the same piece of code is just linked statically into the executation the static initialisation just gets run when the executabtle starts up. From this POV there is no difference between linking a DLL/shared library to the executable and linkng the code directly into the executable - the plugin module just gets initialised at executable start up. If you are going down the route of shared library for the store plugin in your configuration then you may as well just add it to the executable directly (or through a static library) there's no real point in using a shared library. However I've refrained from doing this simply because you can only do this on Windows as on Linux you can't do this and still use the linear/legacy stores as I've already mentioned. So I'd advise to keep the store plugin as it currently is until the Linux stores are converted. Incidentally there should be no real need outside of specific test scenarios to have --load-module arguments as the will all be loaded by default (as long as they are in the correct place, and if not then -- load-module won't work either!). This of course is screwed by having multiple stores present on Linux. Andrew --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org For additional commands, e-mail: users-help@qpid.apache.org