Streaming APIs: JSON vs XML and REST is King
Streaming APIs are becoming more popular because of the low latency they provide. What are the common protocols and data formats of these APIs? To find out I did a simple search on APIhub, the largest repository I found for streaming APIs. Below are the results of the 104 APIs that came up. The total won't equal 104 because I've removed a few of the very low-count protocols and data formats.


Source: www.APIhub.com
Although ProgrammableWeb had a smaller sample size of streaming APIs (34), their ratios matched what we see in APIhub's numbers. Over 75% of the APIs used REST, and JSON had only one more than XML. There were 20 for JSON vs 21 for XML.
When I compared the streaming APIs with the total number of APIs in APIhub, you see some differences in how these streaming APIs are being developed versus the general API pool
Here were my observations about the entire repository on APIhub:
It seems like the answer for REST is clearly 'yes', but I'm not so sure about XML vs. JSON. Here's a little qualitative data for you: Although streaming experts at Salesforce and DataSift use JSON (and PHP as an alternate for DataSift), Twitter uses XML. So there's no consensus among the major real-time players yet, and maybe that's because neither has the versatility to make the other obsolete.


Source: www.APIhub.com
Although ProgrammableWeb had a smaller sample size of streaming APIs (34), their ratios matched what we see in APIhub's numbers. Over 75% of the APIs used REST, and JSON had only one more than XML. There were 20 for JSON vs 21 for XML.
When I compared the streaming APIs with the total number of APIs in APIhub, you see some differences in how these streaming APIs are being developed versus the general API pool
Here were my observations about the entire repository on APIhub:
- SOAP APIs are equal to about half of the number of REST APIs.
- More APIs use XML for the data format. About 7000 use XML while approximately 5000 use JSON.
- The numbers for other data formats and protocols don't come close to the ones already mentioned in the first two points.
It seems like the answer for REST is clearly 'yes', but I'm not so sure about XML vs. JSON. Here's a little qualitative data for you: Although streaming experts at Salesforce and DataSift use JSON (and PHP as an alternate for DataSift), Twitter uses XML. So there's no consensus among the major real-time players yet, and maybe that's because neither has the versatility to make the other obsolete.






Comments
Romi Awasthy replied on Wed, 2013/01/23 - 9:30am
Great post Mitch. I would say that the adoption of JavaScript will drive towards JSON format. Javascript/REST/JSON is the future :)
Mitch Pronschinske replied on Thu, 2013/01/24 - 8:25am
in response to:
Romi Awasthy
I think that's what I'm seeing too, Romi. Thanks for sharing.
Troy Tolle replied on Thu, 2013/01/24 - 10:47am
Twitter announced that they are dropping support for XML and are only going to be providing JSON now for their API. I cannot find the reference to XML in their streaming API anymore. I think that helps push REST/JSON over the edge to the dominate platform.
Mitch Pronschinske replied on Thu, 2013/01/24 - 11:32am
in response to:
Troy Tolle
Helpful update, Troy! I think that makes the vote of confidence for JSON even stronger.
Junio Mousull replied on Sat, 2013/04/20 - 9:52am
dhea 25mg and json is powerfull!
Junio Mousull replied on Sat, 2013/04/20 - 9:54am
Junio Mousull replied on Tue, 2013/05/21 - 8:34am
Momo Singh replied on Tue, 2013/06/04 - 5:16am
Your website is very chatty. It will be useful for all of us. You have completed a work. I will come here again to inspect new updates. Thanks for posting. Web Design New York
Henkz Sall replied on Fri, 2013/06/14 - 7:17pm