Enhancement #548

Threadless RSB

Added by S. Wrede almost 11 years ago. Updated about 10 years ago.

Status:ResolvedStart date:02/22/2011
Priority:NormalDue 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

Feature #550: Selection of Receiving StrategyResolved

Feature #206: Provide additional pull-based model for receiving events ...ResolvedJ. Moringen

Associated revisions

Revision 800a4f25
Added by Arne Nordmann almost 11 years ago

Configure option for single-threaded execution
Disabled by default, needs configuration mechanism
refs #548

Revision e58b1fb0
Added by J. Moringen almost 11 years ago

Added a factory for event receiving strategies
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

Revision 34e3b2cb
Added by J. Moringen almost 11 years ago

Cleanup, more configuration for DirectEventReceivingStrategy
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

Revision a3a18fc0
Added by J. Moringen almost 11 years ago

Made event receiving strategy fully configurable
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

Revision c831cb0e
Added by J. Moringen about 10 years ago

Cleaned up examples/reader/reader.cpp
refs #548
  • examples/reader/reader.cpp: removed logging-related code; added some
    comments

History

#1 Updated by Anonymous almost 11 years ago

DirectEventReceivingStrategy implemented, but disabled by default. Needs configuration mechanism, see #550.

#2 Updated by J. Moringen almost 11 years ago

  • Description updated (diff)
  • Status changed from New to In Progress

#3 Updated by S. Wrede almost 11 years ago

  • Target version set to 0.5

#4 Updated by J. Wienke almost 11 years ago

What is left for this issue? It's marked as 100%.

#5 Updated by S. Wrede almost 11 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 almost 11 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 over 10 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 over 10 years ago

  • Target version changed from rsb-0.10 to rsb-0.7

#9 Updated by J. Moringen about 10 years ago

  • Description updated (diff)
  • Status changed from In Progress to Resolved

Also available in: Atom PDF