celix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pepijn Noltes <pepijnnol...@gmail.com>
Subject Re: Question: Can I build celix and bundles into a single binary library ?
Date Wed, 11 Jan 2017 20:15:01 GMT
Hi Gary,

On Wed, Jan 11, 2017 at 8:06 AM Gary M <garym@oedata.com> wrote:

> Hi,
> I've been lurking about the great celix project since its incubator days.
> Great work !!


> 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.


> v/r
> garyM

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message