Enhancement #548
Threadless RSB
Status: | Resolved | Start date: | 02/22/2011 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 100% | |
Category: | Performance Optimization | |||
Target version: | rsb-0.7 |
Description
For performance (and other) reasons, it can be handy to avoid multi-threading. Therefore, a threadless RSB configuration should be possible. Actually, the result should be that a simple in-process variant of RSB uses exactly one thread.
For this, a number of issues have to be solved:
- DirectEventSendingStrategy ✓
- DirectEventReceivingStrategy ✓ (r2522)
(Uses the caller's thread context to dispatch events) - Factory for Sending and Receiving strategies ✓ (for receiving, r2531)
- Integration in config mechanism ✓ (for receiving, r2533)
- For the SpreadConnector the Reader pattern needs to be implemented to stick with the single thread ✓ (r3600)
Subtasks
Associated revisions
Configure option for single-threaded execution
Disabled by default, needs configuration mechanism
refs #548
refs #548, #550
- src/CMakeLists.txt: added files
src/rsb/eventprocessing/EventReceivingStrategyFactory.h and
src/rsb/eventprocessing/strategies.{h,cpp} - src/rsb/Factory.cpp: register event sending/receiving strategies in
factory constructor - src/rsb/eventprocessing/DirectEventReceivingStrategy.{h,cpp}: added
static create method to support factory construction - src/rsb/eventprocessing/ParallelEventReceivingStrategy.{h,cpp}:
likewise; removed unnecessary constructor - src/rsb/eventprocessing/EventReceivingStrategyFactory.h: new file;
contains a factory for event receiving strategies - src/rsb/eventprocessing/strategies.{h,cpp}: new files; contain
registration of event sending/receiving strategies
refs #548, #550
- src/rsb/eventprocessing/DirectEventReceivingStrategy.{h,cpp}: added
singlethreaded construct property to static create method;
eliminated code duplication in filter and handle methods; fixed and
extended documentation comment of DirectEventReceivingStrategy class
refs #548, #550
- src/rsb/ParticipantConfig.{h,cpp}: added
nested class ParticipantConfig::EventProcessingStrategy and members
event{Receiving,Sending}Strategy - src/rsb/Listener.{h,cpp}: pass received ParticipantConfig object to
configurator - src/rsb/Reader.cpp: likewise
- src/rsb/eventprocessing/InRouteConfigurator.{h,cpp}: added config
parameter to constructor; store event receiving strategy
configuration for use by derived classes - src/rsb/eventprocessing/PullInRouteConfigurator.{h,cpp}: added
config parameter to constructor; pass to base class - src/rsb/eventprocessing/PushInRouteConfigurator.{h,cpp}: likewise;
use stored event receiving strategy configuration in
createEventReceivingStrategy
refs #548
- examples/reader/reader.cpp: removed logging-related code; added some
comments
History
#1 Updated by Anonymous over 12 years ago
DirectEventReceivingStrategy implemented, but disabled by default. Needs configuration mechanism, see #550.
#2 Updated by J. Moringen over 12 years ago
- Description updated (diff)
- Status changed from New to In Progress
#3 Updated by S. Wrede over 12 years ago
- Target version set to 0.5
#4 Updated by J. Wienke over 12 years ago
What is left for this issue? It's marked as 100%.
#5 Updated by S. Wrede over 12 years ago
For C++, the Reader interface is missing AFAIK.
Apart from that, we should split the ticket into different languages or discuss where if we want to support that at all in the other languages. Probably, we stick to C++ as this use case is less relevant for the other high-level languages.
#6 Updated by J. Wienke over 12 years ago
- Target version changed from 0.5 to rsb-0.10
We will move this to 0.6 as the reader is part of 0.6 (see #206)
#7 Updated by J. Wienke about 12 years ago
Is this hard to fulfill finally? If not I would think this could go into 0.7 to clean up the open tasks a bit,
#8 Updated by S. Wrede about 12 years ago
- Target version changed from rsb-0.10 to rsb-0.7
#9 Updated by J. Moringen almost 12 years ago
- Description updated (diff)
- Status changed from In Progress to Resolved
#10 Updated by S. Wrede almost 12 years ago
Example is here: source:trunk/cpp/core/examples/reader/reader.cpp.