Devoxx Poland 2016 - Christopher Batey - The Java developers' guide to asynchronous programming

preview_player
Показать описание
Blocking/synchronous programming has been the norm in Java. However this programming model has a major limitation: it requires one thread per concurrent request. This means that the number of requests you can process concurrently cannot exceed the number of threads, which limits scaling. This talk will explore how an asynchronous programming model can be used to avoid this limitation.

After an introduction to asynchronous design, there will be a live coding session where we will build an example service that makes concurrent calls.

We will cover the following tools:
- The Java Future
- New in Java 8: The CompletableFuture
- RxJava Observables
- The async Servlet, Spring and JAX-RS APIs
- The Ratpack Promise

The see the following patterns:
- Merging multiple calls into a single result
- Returning a result when a subset of multiple calls return without blocking waiting for the rest (e.g. saving an audit log without blocking the user request)
- Executing multiple calls and creating a result from the one that returns first

By the end of the session you should be aware of the popular tools you have for non-blocking programming in Java and when and why you should use them.
Рекомендации по теме
Комментарии
Автор

This was really awesome, he has made things very clear with live demo.

manishsingh-hkol
Автор

Thanks ! That's much clearer now !

ZackIOS
Автор

What's the code behind each of his services' ...Completable( ) calls? (Like They all return CompletableFutures but what are they doing before that? Submitting them to an Application-scope ExecutorService?

yousifucv
visit shbcf.ru