Tasks #243

Tasks #240: Refactor C++ Implementation to 2011-04-13 Domain Model

Improved converter selection

Added by J. Wienke about 13 years ago. Updated almost 13 years ago.

Status:ResolvedStart date:04/13/2011
Priority:NormalDue date:
Assignee:J. Moringen% Done:

100%

Category:C++Estimated time:2.00 hours
Target version:-

Description

Note

It has been decided that the implementation of this proposal will be delayed until
  1. Representation and semantics of types in the RSB context is better understood
  2. The current design actually proves insufficient

Tasks

  • Make converter repository globally accessible.
    • no singleton but method for global repository in converter namespace
  • Create DeserializationSelectionStrategy interface
  • Create SerializationSelectionStrategy interface
  • Implement WireSchemaStrategy -> DeserializationSelectionStrategy: selects converters based on wire schema (resembles current behavior)
  • Implement DataTypeStrategy -> SerializationSelectionStrategy: selects converters based on RTTI data type (resembles current behavior)

[De]serializationSelectionStrategy:

Rationale:
Selection of converters may depend on
  • use cases of the framework
  • the transport::connector
  • the wire schema

Responsibility:
Use-case dependent selection of converters.

Associated revisions

Revision 5368e380
Added by J. Moringen almost 13 years ago

Added converter configuration to ParticipantConfig::Transport
refs #243
  • src/rsb/ParticipantConfig.{h,cpp}: added data member
    ParticipantConfig::Transport::converters;
    ParticipantConfig::Transport is now responsible for handling its
    options including the new converter configuration; changed printing
    of ParticipantConfig::Transport to use rsc::runtime::Printable

Revision 590a2e58
Added by J. Moringen almost 13 years ago

Added unit test for parsing of converter configurations
refs #243
  • test/rsb.conf-for-smoke-test: added converter configuration
  • test/rsb.conf-semantic-errors-6: new file; test for handling of
    malformed converter configuration
  • test/rsb/ParticipantConfigTest.cpp: check expected converter
    configuration and process test/rsb.conf-semantic-errors-6 in test
    case testFromFile

Revision 5ae96780
Added by J. Moringen almost 13 years ago

Made inprocess connectors issue a warning when they receive a converter configuration
refs #243
  • src/rsb/transport/inprocess/InConnector.cpp: issue a warning when
    constructor arguments include a converter configuration since it
    makes no sense for inprocess connectors
  • src/rsb/transport/inprocess/OutConnector.cpp: likewise

Revision bbe3e351
Added by J. Moringen almost 13 years ago

Additional lookup methods in src/rsb/converter/Repository.h
refs #243
  • src/rsb/converter/Repository.h: added methods for looking up
    multiple converters by their common WireType or common DataType

Revision 79fc6166
Added by J. Moringen almost 13 years ago

Added base classes for converter selection in connector classes
refs #243
  • src/CMakeLists.txt: added files
    src/rsb/transport/ConverterSelecting{,In,Out}Connector.h
  • src/rsb/transport/ConverterSelectingConnector.h: new file; base
    class ConverterSelectingConnector which handles converter caching
    and lookup initiating
  • src/rsb/transport/ConverterSelectingInConnector.h: new file; base
    class ConverterSelectingInConnector which handles converter lookup
    and disambiguation based on WireSchema
  • src/rsb/transport/ConverterSelectingOutConnector.h: new file; base
    class ConverterSelectingOutConnector which handles converter lookup
    and disambiguation based on DataType

Revision 8b90f776
Added by J. Moringen almost 13 years ago

Adapted spread connectors and rsb::Factory to new converter configuration mechanism
fixes #243
  • src/rsb/Factory.{h,cpp}: if applicable, take converter configuration
    from transport configuration and inject into connector construction
    properties
  • src/rsb/transport/spread/InConnector.{h,cpp}: added base class
    ConverterSelectingInConnector; pass this to ReceiverTask :(
  • src/rsb/transport/spread/OutConnector.{h,cpp}: added base class
    ConverterSelectingOutConnector
  • src/rsb/transport/spread/ReceiverTask.{h,cpp}: use pointer to
    InConnector to obtain Converters
  • src/rsb/transport/spread/SpreadConnector.{h,cpp}: removed converter
    repository since the connectors manage converters themselves now

History

#1 Updated by J. Wienke almost 13 years ago

Now that we have a ParticipantConfig, why not add the desired set of converters to this configuration. Rationale: ParticipantConfig is the only user-level class that goes down to the transport layer. Hence, it would form a coherent extension to only specify settings for this level in this class.

Jan?

#2 Updated by J. Moringen almost 13 years ago

  • Status changed from New to In Progress
  • Assignee changed from S. Wrede to J. Moringen

#3 Updated by J. Moringen almost 13 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Applied in changeset r802.

Also available in: Atom PDF