3 ms·
FYI - You can emulate this on your own backend quite easily provided you can write a route that can serve multiple API calls at once. From the client-side, you
by newhouseb 15y ago
FYI - You can emulate this on your own backend quite easily provided you can write a route that can serve multiple API calls at once. From the client-side, you treat ajax-calls like you would treat auto-completed search - every time you want to do an ajax call you set a timer that says 'Run this AJAX request in 10ms', if you do another ajax call within 10ms, you cancel all timers and fold those API requests into the current request. This chain continues until you go 10ms without any calls and you send off a bundled API call to the server.
- jamroom 15y agoCompletely - the only part that's hard is conditionals - what if you want to check the success/fail of a link in the chain? You'll have to bring the results back to your client. The Trestle Chain server let's you create if/else conditionals that can run different chain segments based on any results/headers returned from previous links, so it's "scriptable" in a sense, which is cool.