Here's what we found out:
- The current API we're using for Facebook supports XML and that it does not support JSON
- The current API also does not allow gzip-encoding
Both of these things were a huge bummer, but since it's what we have to work with I continued on. I did some tests and found that about 500 friends was about 50KB of data. Now, this might not really sound like much in the world today, but it takes a whopping 550ms to complete. That's crazy for only 50KB of data! Now, considering that because of the way TCP works, this is 6 round trips and our ping to Facebook is about 70ms, 420 of that 550ms is wasted in TCP overhead. Now, there is nothing I can do about the TCP overhead (though it will be much better in our hosted environment) it's definately something I will keep in mind when dealing with our other REST apis.
Just to satisfy the curiosity of my mind I calculated that each friend was about 100 bytes of XML. If I were to convert to using the Facebook graph API and I switched to using JSON as my data format it would be more like 80 bytes per friend. While that's a nice savings it's even better if you then use the compressed json stream, which is only 15 bytes per friend.
I think it might be time to do some rewriting...
--Colt
4 comments:
This is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article.
iphone app development in hyderabad
ios app development in hyderabad
Good job in presenting the correct content with the clear explanation. The content looks real with valid information. Good Work
ivanka hot
Android Training Institute in Noida
Thanks for sharing this blog. It was so informative.
Best way to introduce yourself in an interview
How to introduce myself in a job interview
Post a Comment