2 ms·
> However in Java it isn't that hard anymore to make a Sync Library Async Not necessarily true. Sure you can create a set of worker threads that take requests,
by mmastrac 11y ago
> However in Java it isn't that hard anymore to make a Sync Library Async
Not necessarily true. Sure you can create a set of worker threads that take requests, process them synchronously, and hand stuff back but that's going to inflate your thread count and it's nowhere as optimal as writing a library that is async-aware from the first line of code.
On top of that, lots of Java code assumes that you'll be making various sequenced calls from the same thread. You'll find that libraries will randomly corrupt data or return stale reads if they haven't been synchronized properly. Many protocols (ie: Redis) have built-in pipelining that isn't used in sync libraries.
- merb 11y ago> You'll find that libraries will randomly corrupt data or return stale reads if they haven't been synchronized properly Yeah that's what I meant with my second edit. it's really really aweful if libraries use a too mutual style.