Make Riptide async by default?
See original GitHub issueRight now we always have to maintain two APIs: Rest (sync) and AsyncRest (async). Because of Riptide’s design they both support the very same routing trees out of the box. This already makes Riptide stand out from the competition, since their APIs usually differ dramatically between the two approaches.
The problem we have right now is the different return value for async: ListenableFuture<Capture>
vs. Capture
. Translating from async to sync is relative easy:
http.get(..)
.dispatch(..)
.to(Success.class);
vs.
http.get(..)
.dispatch(..)
.get(10, SECONDS)
.to(Success.class);
Given this, should we consider dropping the dedicated support for the synchronous version altogether?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
riptide/README.md at main · zalando/riptide - GitHub
Non-blocking IO is asynchronous by nature. In order to provide asynchrony for blocking IO you need to register an executor. Not passing an...
Read more >Async by default with 'use async'; - APIs - WICG
Let the developer specify it wants its code to be async by default, by adding a 'use async'; instruction to the EcmaScript specification....
Read more >Why shouldn't all functions be async by default? - Stack Overflow
The primary reason to not make everything async is because the purpose of async/await is to make it easier to write code in...
Read more >Making flows asynchronous by default - Node-RED
In Node-RED 1.0, we are changing the way messages pass between nodes from being synchronous to being asynchronous. This will, in some cases, ......
Read more >trdelnik-sandbox-cli - crates.io: Rust Package Registry
Trdelnik client - build and deploy an Anchor program to a local cluster and ... #[throws] #[fixture] async fn init_fixture() -> Fixture {...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In addition if we use Hystrix (which we really should) we already have a threadpool anyways, so that’s not a big downside.
They are right now, but that’s probably just caused by our mindset. If my tools would allow me to perform some request asynchronously, I’d probably do it way more often.