celix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Broekhuis <a.broekh...@gmail.com>
Subject Re: Remote service using shared mem
Date Mon, 16 Sep 2013 11:16:35 GMT

The whole netstring spec is quite straightforward (http://cr.yp.to/proto/**
> netstrings.txt <http://cr.yp.to/proto/netstrings.txt>). Hence it should
> not be that difficult to use it in Java. Probably there are already some
> implementations available.

Thanks, I was also talking about the whole shmem usage. But I already took
a look, and it fairly straightforward. I need to doe some research wrt Java
and shmem.

> It does check and although tries to attach to the shared memory if
> available. But it is a little bit more tricky for the semaphores as there
> might be the need to re-initalize them. Especially for the discovery part -
> using the current implementation it is not possible to determine whether
> there is already another celix instance running which has initialized those
> semaphores or whether they have been left from an segfaulting celix.

Makes sense.

Some other remarks/questions:

I noticed you created a new proxy for shm usage. While currently this is
ok, I think we need to do some refactoring to take out the transport
knowledge from the endpoints, they should only handle encoding/decoding.
Some generic callback method in the RSA should be called, which then takes
care of the transport.

Naming of the shmem files etc is currently fixed (/tmp/...), this should be
made an property. Now it simply won't work on Win32 at all, although I am
not sure how shmem is solved on windows, trying to keep the code as
platform independent as possible is always a good thing.

In the RSA (line 543) itself there is a hardcoded reference to
/services/example, why is this?

When testing "remote-services-shm" and stopping the "example" bundle, the
discovery tries to deregister an entry, this results in a call to register
which somehow fails with an segfault. Maybe I am missing something, but
there is no removal anywhere. How is this supposed to work? Btw, before the
segfault the following error is printed:
DISCOVERY: Endpoint for example, with filter "(null)" removed
DISCOVERY : discovery_registerSHMService : encoding data from HashMap failed

I have problems getting the code to run on my Mac. I run into several
segfaults, so this needs some more testing before I can commit it.

Met vriendelijke groet,

Alexander Broekhuis

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