3 ms·
I agree, they should at least compare to Go. However, it is fair to say that when using Java, you have to choose carefully since many API's block on I/O, inclu
by skybrian 13y ago
I agree, they should at least compare to Go.
However, it is fair to say that when using Java, you have to choose carefully since many API's block on I/O, including those that Java programmers use by default and are most likely to be familiar with.
- saryant 13y agoThe biggest impediment to async programming in Java-land is the lack of an async JDBC driver.
- larsmak 13y agoIt's really not that hard to make thing run async / paralell in java: You just create a ExecutorService and submit your runnables / callables. The java.util.concurrent-package makes this easy, and google guava has some useful extensions as well (e.g. ListenableFuture). This approach does of course spawn new threads, but threads are lightweight and using a ExecutorService allows for pooling of the threads (ThreadPoolExecutor). I do this all the time, when I find parts of the code that's worth optimizing - e.g. fetching multiple objects from a distant db-server (like aws).