Bug #2163

Remove rsb.wire-schema property from metaData in socket transport

Added by R. Haschke over 9 years ago. Updated over 6 years ago.

Status:NewStart date:01/27/2015
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Specification
Target version:rsb-0.18

Description

While in socket transport, there is a metadata key userInfos:rsb.wire-schema, it is missing in spread transport:

example: same event send over socket vs spread:
event *Event[id = *EventId[participantId = UUID[557f285a-0811-43c7-a506-8d05eed7a0c2], sequenceNumber = 0] at 0x7f1de4004e00, type = bytearray, scope = Scope[/], metaData = MetaData[senderId = UUID[557f285a-0811-43c7-a506-8d05eed7a0c2], creationTime = 1422357430672652, sendTime = 1422357430730011, receiveTime = 1422357430767356, deliverTime = 1422357430767369, userTimes = {}, userInfos = {(rsb.wire-schema, int64)}], method = , causes = {}] at 0x7f1de4004c20

event *Event[id = *EventId[participantId = UUID[4dbfdb24-1a1c-4904-a57b-1cfb7a2b4d77], sequenceNumber = 0] at 0x7f1dec002900, type = bytearray, scope = Scope[/], metaData = MetaData[senderId = UUID[4dbfdb24-1a1c-4904-a57b-1cfb7a2b4d77], creationTime = 1422357549316573, sendTime = 1422357549365453, receiveTime = 1422357549420429, deliverTime = 1422357549420432, userTimes = {}, userInfos = {}], method = , causes = {}] at 0x7f1dec004b70

How can I robustly access the wireSchema, if I want to lazily deserialize events?

History

#1 Updated by J. Wienke over 9 years ago

  • Description updated (diff)

#2 Updated by J. Wienke over 9 years ago

This is basically an implementation detail and not intended for client usage. Such information should normally only be used inside converters, since there are transports like inprocess where no wire schema exists at all.

#3 Updated by R. Haschke over 9 years ago

From my point of view, the socket transport should use the internal Notification data structures to access the wire-schema, instead of cluttering the metaData. What if, the user wants to set a property rsb.wire-schema herself? ;-)

#4 Updated by R. Haschke over 9 years ago

  • Subject changed from non-uniform event format in socket/spread transport to remove rsb.wire-schema property from metaData in socket transport
  • Target version set to rsb-0.12

The only way to robustly access the wireschema is at conversion time.
There is the rsb::converter::SchemaAndByteArrayConverter for this purpose.

Nevertheless, the socket transport should remove the rsb.wire-schema property from metaData.

#5 Updated by J. Moringen over 9 years ago

  • Category changed from C++ to Specification

R. Haschke wrote:

The only way to robustly access the wireschema is at conversion time.
There is the rsb::converter::SchemaAndByteArrayConverter for this purpose.

For arbitrary user code, yes. However, tools such as the loggers may want to receive deserialized payloads along with "best effort" transport-specific meta-data such as wire-schema, notification size or serialized payload size. This is an "best effort" protocol because some transports conceptually cannot provide this information and other transport implementations may not have the necessary code.

What if, the user wants to set a property rsb.wire-schema herself? ;-)

I think this information is currently missing in the specification, but the idea of meta-data items named rsb.* was that they are reserved for RSB and thus user code should not attempt to create such meta-data items. In general, user code should not make assumptions about the presence or absence of any meta-data item.

Nevertheless, the socket transport should remove the rsb.wire-schema property from metaData.

I see a number of possibilities here:
  1. Do not create the meta-data item, as suggested above
  2. Adapt the Spread transport to also create the meta-data item (if it does not already)
  3. Make the creation of such meta-data item configurable via an option of the respective transport (the CL implementation does this for a number of similar meta-data items). Tools such as loggers can then explicitly request the meta-data items.

#6 Updated by J. Wienke about 9 years ago

  • Target version changed from rsb-0.12 to rsb-0.13

#7 Updated by J. Moringen about 8 years ago

  • Target version changed from rsb-0.13 to rsb-0.14

#8 Updated by J. Moringen almost 8 years ago

  • Target version changed from rsb-0.14 to rsb-0.15

#9 Updated by J. Moringen over 7 years ago

  • Target version changed from rsb-0.15 to rsb-0.16

#10 Updated by J. Moringen about 7 years ago

  • Target version changed from rsb-0.16 to rsb-0.17

#11 Updated by J. Moringen over 6 years ago

  • Subject changed from remove rsb.wire-schema property from metaData in socket transport to Remove rsb.wire-schema property from metaData in socket transport
  • Target version changed from rsb-0.17 to rsb-0.18

Also available in: Atom PDF