javascript - Solving API Performance Issues with Cross Domain Ajax -
i'm in process of building out infrastructure support gaming platform intend scale out hundreds of thousands of users. since in entertainment / gaming industry, expecting heavy load each user session, therefore, performance of upmost importance.
we trying parallelize of architecture possible, meaning api, databases, , applications run off of different servers can horizontally scaled. 1 of applications web app, , we're having trouble due specific scenario involving same origin policy on legacy browsers.
this application running in web browser need speedy access models available through centralized api. while great our dedicated mobile clients, browsers unfortunately need cors support interface directly our api. problematic because of http verbs not supported on browsers (put / delete). our known workarounds are, rewrite api create more abstraction (we believe not best practice , increase development time , potentially performance) , work post using jsonp or create proxy (which add 2 leg trip , double latency performance).
bottom line is, have boiled question down to... these 2 options, or there else aren't considering, , if so, of these solutions better suited gaming platform.
another option consider jsonp. wrapping json response enable loaded script tag, can avoid problems same origin policy.
i can't speak performance issues of specific application without knowing app in detail. think see similar performance on server jsonp, since major difference on other methods concantenating string.
Comments
Post a Comment