apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Broekhuis <a.broekh...@gmail.com>
Subject Fwd: Usage of Apache Portable Runtime in Celix
Date Tue, 26 Apr 2011 14:34:55 GMT
Hello APR and Celix community,

Some while ago I posted the message below the the Celix developers
list, and I think it might be useful to ask the same questions on the
APR list.

To summarize, Apache Celix is an incubator project aiming at the
implementation of the OSGi specification in C
(http://incubator.apache.org/celix/). And lately I've begun looking at
APR as a possible platform abstraction.

Some questions I have:
One of the possible targets of Celix is the embeded world. Is there
some work and/or knowledge regarding the usage of APR with for example
TI SYS/BIOS? If not, it is possible/difficult to implement (a subset
of) the APR headers for other platform?

What is a good way to look at the usage of memory pools? Celix
provides a middleware layer on top of which functionality must be
deployed. Should the use of APR be something we enforce to the users?
Or can we keep the APR usage internal, so the user can still decide
what to do.
Celix exists out of a framework. On top of this framework bundles can
be installed. Inside a bundle is the user written software.
Interaction with the framework is always via the context of the
bundle. So from this point of view we could "hide" the apr usage from
the user, but still provide hooks if a user wants to use it.

So now I'm struggling with when to use a new pool, when to clean the
pools etc. Is there some general advice for this, or does it depend to
much on the design of Celix?

Thanx in advance,

---------- Forwarded message ----------
From: Alexander Broekhuis <a.broekhuis@gmail.com>
Date: 15 April 2011 10:01
Subject: Usage of Apache Portable Runtime in Celix
To: celix-dev@incubator.apache.org


Hi all,

Some while ago I started looking at the usage of APR in Celix.

APR provides an abstraction to OS specific tasks (file io, threading
etc), the use of APR possible makes it a lot easier to port Celix to
different platforms.
Also, APR uses memory pools for allocation and deallocation, this
could make memory management easier.

Memory pools can, for example, be used for:
- each bundle (create during installation, destroy during
uninstallation/shutdown)
- each started component (create during activator create, destroy
during activator stop)
etc.
To be able to make this work, it is important to define the lifecycle
of "objects" in the framework. This makes it possible to keep the
dynamics, but loose all freeing and destroying of allocations
throughout the code.

Of course there are also some issues, mostly concerning with the
target platforms of Celix. One of the goals is to be able to use Celix
in embedded environments. APR currently does provide support for most
uses OSed (linux, windows, bsd, ...) but not for embedded platforms
such as TI's SYS/BIOS (previously named DSP/BIOS).
Maybe (part of) the APR headers can be used to implement it for other platforms.

I would like to know if this is something we can use in Celix, and
maybe if there is someone with more knowledge about APR who can help
look at how APR can be integrated and used.

--
With kind regards,

Alexander Broekhuis



-- 
Met vriendelijke groet,

Alexander Broekhuis

Mime
View raw message