bundles in separate process

7 views
Skip to first unread message

Pieter Eendebak

unread,
Sep 5, 2016, 7:43:33 AM9/5/16
to ipopo-dev
Dear newsgroup,

Can ipopo start bundles in a new process instead of a new thread? I need this in order to make use of multiple cpu cores for my bundles.

When I start the pelix shell two times (using python -m pelix.shell) I cannot the see bundles started in the first shell from the second shell. Is it possible to make the shell see all the bundles started on a given system? 

With kind regards,
Pieter Eendebak

Thomas Calmant

unread,
Sep 5, 2016, 8:56:17 AM9/5/16
to ipopo-dev
Hi Pieter,

The short answer is "no", but you should take a look at remote services.

The way Pelix/iPOPO works (registries, direct calls, ...) is not directly compatible with the way multiprocessing works (fork, pipes, queues, ...).

However, if you use services to give access to the core features of your bundles, you might have two ways to run your code in different processes:
1/ Using remote services [1]: you start as many Frameworks as necessary and let them detect their peers and consume their services;
2/ By having a single Framework, but each bundle start a new work process. Some proxies can be registered as services to send orders to and retrieves results from the underlying process.

In both cases, the services are consumed the same way: only the underlying binding changes.
Using remote services [1] is easier to implement (everything is already included), but costs I/O time.
Having services to hide the multiprocess aspect gives more control and maybe costs less I/O time, but it needs to be developped from scratch.


Kind regards,
Thomas
Reply all
Reply to author
Forward
0 new messages