On Thu, Jan 12, 2017 at 10:00 AM Gary M <[email protected]> wrote: > Thanks Pepijn, > > I was hoping to find a more positive answer.. I liked the idea of OSGi > interoperabilty with pre-existing java implementations. I was looking at > the bundle cache mechanism along with the dependency facility. Instead of > reading the bundle off a file system, I was thinking to have a bundle store > embedded in an object file, sort of a fake bundle file system. Eventually, > the cached images (code) would be shared memory. > > If this is a silly, ridiculous approach, please let me know. I won't be > insulted. >
No it is not a silly approach. It is interesting idea and I had a look at C++ Micro Services [1] [2] and I think it does exactly that. So attaching bundle resources to a library instead of adding the library in a bundle zip. So maybe C++ Micro Services is something for you? Note that it uses C++ instead of C. If I am correct it also support a static linking approach. An interesting approach, worth thinking about. So thanks piquing my interest :). [1] https://github.com/CppMicroServices/CppMicroServices [2] http://cppmicroservices.org/doc_2_1/group__MicroServicesCMake.html#ga5a2706d9c7ac4e3eaa1189d15e0d3e21 > > v/r > gary > > On Wed, Jan 11, 2017 at 1:15 PM, Pepijn Noltes <[email protected]> > wrote: > > > Hi Gary, > > > > On Wed, Jan 11, 2017 at 8:06 AM Gary M <[email protected]> wrote: > > > > > Hi, > > > > > > I've been lurking about the great celix project since its incubator > days. > > > Great work !! > > > > > > > Thanks > > > > > > > > > > Now I have an opportunity to potentially use it in a production > project. > > > > > > I'd like to build celix and bundles as a single binary library that can > > be > > > called via NodeJs. Actually, an external library in Amazon lambda's > > NodeJs > > > (no difference to standalone NodeJs). The reason for the single binary > is > > > to work around lambda's module load time causing high response > latencies. > > > > > > > > So if I understand correctly the problem is that when using the > > libcelix_framework library (and as result libcelix_utils library) to load > > celix bundles (e.g. zip files containing a MANIFEST and a (at least one) > > shared library) is too slow. Certainly considering with the nature of > > amazon lambda -> Function as as Service (FaaS). > > > > Although I would prefer to promote Celix as a good solution ;), I am not > > sure if in this case this is true. For one the dynamic nature of Celix > > (loading shared libraries on demand) already introduces overhead. But > more > > critical is that Celix creates bundle caches (as is specified in the > OSGi > > specification) and this is probably a big part of the startup overhead. > > > > > > > > > Any suggestions on how to proceed building celix and bundles into > binary > > > lib ? > > > > > > > The use of bundle caches and bundle revision is quite an integral part of > > Celix and IMO it is not really feasible to remove this. > > > > I do think it is interesting to consider if you would be happy not using > > the "complete" Celix solution but only service registry part. So the part > > where you can runtime register, unregister, lookup and listen for > services > > and also listen for service listeners (listener hook). > > > > I am not saying this is currently possible, because it is not; the > service > > registry depends on the concept of bundles, but I do think it possible to > > decouple that.. given enough effort. > > > > Hopefully that answer you question, if not please let us know. > > > > Greetings, > > Pepijn > > > > > > > > > > > > v/r > > > garyM > > > > > >
