2011-11-18, 00:52
jimk72 Wrote:I was having all kinds of problems like this with tcp. also had large requests(all artist, ect..) would be sent back in random chunks. I ended up switching over to http post ect.. that way I get the full response and it is only that response and then use the tcp to monitor for notifications. Most of them are very short so a custom parser to make sure it is only one notification was easy. All my problems related to JSON ended after that
I was considering this option, but was hoping it won't be necessary as I like the neatness of everything being handled in one communication stream.
I'd be interested to find out if there is any performance difference between using TCP where you have to manually parse to separate objects and using HTTP where you get the full response and hence not have to do the extra parsing. Guess I'll have to run a few timing tests. As every millisecond counts when your users have big libraries.