Hello,

I implemented something like that 6 years ago (!)

Essentially, you have use to use extern "C" to generate a public C ABI,
then dlopen/LoadLibrary the plugin and finally dlsym/GetProcAddress a few
well-known entry points (e. g. setup, run, teardown, etc). It's not that
complex. Just make sure you refcount instances in case you want to support
unloading plugins. If you want to allow plugin upgrades without restarting
the server, you may want to version symbols. Check Drepper's:
http://www.akkadia.org/drepper/dsohowto.pdf

Alternatively, you could use COM as a universal binary format. That would
allow for plugins to be compiled once and run on every platform, at the
cost of significantly increasing plugin development complexity. COM is
well-documented and trusted in enterprise circles.

An unorthodox alternative to COM would be to use FastCGI as the binary
format for plugins. It would also allow your plugins to be compiled once
and run on every platform (although Windows support may be weaker).





On Thu, Jul 24, 2014 at 11:29 PM, Jeffrey Scott Flesher Gmail <
jeffrey.scott.fles...@gmail.com> wrote:

>  I have been looking at Cross platform Plugin for use with Wt,
> I will begin testing this one:
>
> http://www.codeproject.com/Articles/20648/DynObj-C-Cross-Platform-Plugin-Objects
> http://sourceforge.net/projects/dynobj
> http://dynobj.sourceforge.net/
>
> But wanted to know if anyone has given Plugins any thoughts,
> if so, what do you think?
>
> The idea is to write a plugin that will be able to insert itself into the
> menu system and be used as a normal Wt Widget,
> that becomes part of the project as a whole,
> the advantage is that you can compile and deploy the Module separately,
> thus I do not need to restart the service and lose users who are online,
> my goal would be to make a program that is just a stub that never changes,
> and accesses everything via a library and plugins,
> this should be easier to maintain and easier on memory, if you are not
> using a module,
> and because you never have to restart your app to use updates in its
> modules,
> it makes the system more stable.
>
> Obviously there are lots of ways to do this, which is the best for Wt is
> what my question concerns,
> if others already have a working system, would they be willing to share
> those ideas with me,
> for an Open Source CMS, which will use this system to implement all its
> features.
>
> Thanks
> Jeffrey Scott Flesher
>
>
>
> ------------------------------------------------------------------------------
> Want fast and easy access to all the code in your enterprise? Index and
> search up to 200,000 lines of code with a free copy of Black Duck
> Code Sight - the same software that powers the world's largest code
> search on Ohloh, the Black Duck Open Hub! Try it now.
> http://p.sf.net/sfu/bds
> _______________________________________________
> witty-interest mailing list
> witty-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
>


-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to