I'm starting to look at the Exchange Streaming API ("ESA"). It's a great concept, you only get data when it changes and is relevant to you reducing the use of resource consumption on our side and on Betfair servers. It opens the door to increase advantage for being closer to the servers and the possibility for Betfair receiving money from clients who want to co-locate (i discussed this in another post).
My main problem relating the ESA is that is very error prone and i was interested in knowing in what ways people try to reduce the possibility of errors. There are well know situations in the financial markets where servers became so busy that this methodology of distributing data as it comes created major problems, one of them was that it was reporting old data like in the flash crash of 2010.
But i'm not focusing on server side errors, i'm more interested in client side errors.
When we use the request / response paradigm of the API-NG we are in fact unaware of market changes but when we query the market we always see the complete and current picture. In some sense, if we rely on invalid data in one second we can have the correct picture in the consequent call. This is very resilient.
When we use a subscribe paradigm like in the ESA if we get something wrong that mistake perpetuates until we make a new initial subscription. This is scary. I know that good coding can prevent this, but good coding is hard and sometimes only achieved after making some mistakes.
An analogy between the two paradigms is always checking your wallet for the amount of money you have (API-NG) or depending on the initial balance and the subsequent expenses and receivables you get, you just look into the wallet once (ESA).
One way i thought of reducing the possibility/impact of errors in ESA was to have a police routine routinely check the ESA image of the markets against a request from API-NG. If any discrepancy was detected then a full initial image was requested.
Another way was relying on the ESA to be informed that a market has changed but all data was then requested by an old API-NG call.
Any thoughts on this?
My main problem relating the ESA is that is very error prone and i was interested in knowing in what ways people try to reduce the possibility of errors. There are well know situations in the financial markets where servers became so busy that this methodology of distributing data as it comes created major problems, one of them was that it was reporting old data like in the flash crash of 2010.
But i'm not focusing on server side errors, i'm more interested in client side errors.
When we use the request / response paradigm of the API-NG we are in fact unaware of market changes but when we query the market we always see the complete and current picture. In some sense, if we rely on invalid data in one second we can have the correct picture in the consequent call. This is very resilient.
When we use a subscribe paradigm like in the ESA if we get something wrong that mistake perpetuates until we make a new initial subscription. This is scary. I know that good coding can prevent this, but good coding is hard and sometimes only achieved after making some mistakes.
An analogy between the two paradigms is always checking your wallet for the amount of money you have (API-NG) or depending on the initial balance and the subsequent expenses and receivables you get, you just look into the wallet once (ESA).
One way i thought of reducing the possibility/impact of errors in ESA was to have a police routine routinely check the ESA image of the markets against a request from API-NG. If any discrepancy was detected then a full initial image was requested.
Another way was relying on the ESA to be informed that a market has changed but all data was then requested by an old API-NG call.
Any thoughts on this?


Comment