Last post Aug 18, 2016 11:50 PM by kruddler
Aug 18, 2016 03:07 AM|Kruddler|LINK
I've been getting excited about the SignalR framework. I like the idea of SignalR because I figured that it would us to move away communication using markup languages. When I opened up the client library for SignalR today, I was horrified to see this:
Firstly, the data transfer is in strings. Secondly, it hard codes object transfer in JSON. Why?
I understand that JSON is the most common serialization transfer protocol on the web. There's nothing wrong with JSON. But, why is the SignalR framework tied so closely to JSON like this? Surely, one of the the points of using web sockets is to abstract
ourselves away from serialization concerns. What if our customers want to consume data in XML, or heaven forbid binary?
I was planning on using binary transfer for internal communications to save on performance and bandwidth transfer, but strings have cut this off at the knees. Isn't there a way to do binary transfer (byte) with SignalR?
Aug 18, 2016 07:00 AM|lextm|LINK
You definitely hit a well known thing, and Microsoft will take actions in the future, not now.
Aug 18, 2016 11:50 PM|Kruddler|LINK
It seems that the team have added "binary support"
I'm not sure what that means, but it sounds kinda promising. I'll update this thread when I can confirm whether or not this will allow binary serialization without conversion to/from string.