serializers

#1

Hi

also I was curious what serializer crossbar use so I put print in every serializers method serialize() and I see that crossbar use cbor and json at the same time and only one client …why is that? why not cbor only?

even if i put to my config serializers:[“cbor”] nothing seems to change

0 Likes

#2

Hi,

> also I was curious what serializer crossbar use so I put print in every
> serializers method serialize() and I see that crossbar use cbor and json
> at the same time and only one client ...why is that? why not cbor only?

Crossbar.io supports multiple serializers _at the same time_, and can translate transparently between clients using different serializers.

We support multiple serializers, because a) there are tradeoffs (eg JSON is fast in browsers, because it is native code) and b) different WAMP client languages have different levels of support for serializers.

> even if i put to my config serializers:["cbor"] nothing seems to change

Using this config, Crossbar.io will still _print_ all the available serializers at startup in the log, but only use CBOR - only clients supporting (and requesting) CBOR will be able to connect.

Cheers,
/Tobias

0 Likes

#3

thx for Your response,
but as I said - I put print in serialize method of every serializer, not on constructor or something, so I’m pretty confident that it serialize using json and cbor

W dniu środa, 9 listopada 2016 16:12:44 UTC+1 użytkownik Tobias Oberstein napisał:

···

Hi,

also I was curious what serializer crossbar use so I put print in every

serializers method serialize() and I see that crossbar use cbor and
json

at the same time and only one client …why is that? why not cbor only?

Crossbar.io supports multiple serializers at the same time, and can
translate transparently between clients using different serializers.

We support multiple serializers, because a) there are tradeoffs (eg JSON
is fast in browsers, because it is native code) and b) different WAMP
client languages have different levels of support for serializers.

even if i put to my config serializers:[“cbor”] nothing seems to change

Using this config, Crossbar.io will still print all the available
serializers at startup in the log, but only use CBOR - only clients
supporting (and requesting) CBOR will be able to connect.

Cheers,

/Tobias

0 Likes

#4

CB serializes every event published exactly once independent of the number of subscribers, but will do so (and cache the preserialized message) for every serializer installed - independent of the specific serializer negotiated for a specific client.

So you cannot convince yourself using naive print, but you could either use wireshark or turn on loglevel=trace in CB to watch the messages and bytes that actually get sent down the wire.

In any case: I am pretty sure it works;) dig deeper if you dont belive me . .

···

Am 10.11.2016 1:38 nachm. schrieb “Michał Lipiński” michal....@gmail.com:

thx for Your response,
but as I said - I put print in serialize method of every serializer, not on constructor or something, so I’m pretty confident that it serialize using json and cbor

W dniu środa, 9 listopada 2016 16:12:44 UTC+1 użytkownik Tobias Oberstein napisał:

Hi,

also I was curious what serializer crossbar use so I put print in every

serializers method serialize() and I see that crossbar use cbor and
json

at the same time and only one client …why is that? why not cbor only?

Crossbar.io supports multiple serializers at the same time, and can
translate transparently between clients using different serializers.

We support multiple serializers, because a) there are tradeoffs (eg JSON
is fast in browsers, because it is native code) and b) different WAMP
client languages have different levels of support for serializers.

even if i put to my config serializers:[“cbor”] nothing seems to change

Using this config, Crossbar.io will still print all the available
serializers at startup in the log, but only use CBOR - only clients
supporting (and requesting) CBOR will be able to connect.

Cheers,

/Tobias

You received this message because you are subscribed to the Google Groups “Crossbar” group.

To unsubscribe from this group and stop receiving emails from it, send an email to crossbario+unsubscribe@googlegroups.com.

To post to this group, send email to cross...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/crossbario/e8078f75-d193-4264-bc21-5df5c0d9e9e4%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

0 Likes