$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Future in WebApp (Java)
Search
Kengo TODA
July 17, 2016
Technology
0
200
Future in WebApp (Java)
Short description about Future and CompletableFuture
Kengo TODA
July 17, 2016
Tweet
Share
More Decks by Kengo TODA
See All by Kengo TODA
生成AI 業務応用向けガイドライン 斜め読み / Overview of Generative AI Business Application Guidelines
eller86
0
130
KotlinユーザのためのJSpecify入門 / JSpecify 101 for Kotlin Devs
eller86
0
1.8k
JavaとGroovyで書かれたGradleプラグインをKotlinで書き直した話 / Converted a Gradle plugin from Groovy&Java to Kotlin
eller86
0
1.7k
ヒューマンスキル / The Humanskills
eller86
0
710
医療機関向けシステムの信頼性 / Reliability of systems for medical institutions
eller86
0
450
Server-side Kotlinを使うスタートアップでどんなDetektルールが育ったか / Detekt rules made in start-up working with Server-side Kotlin
eller86
0
1.6k
Java開発者向けのKotlin Gradleビルドスクリプト入門 / Gradle Build Script in Kotlin 101
eller86
1
2k
Goodbye JSR305, Hello JSpecify!
eller86
2
5.3k
Java8〜16におけるバイトコード生成の変化 / Changes of Bytecode Generation from Java 8 to 16
eller86
4
4.5k
Other Decks in Technology
See All in Technology
AWS Trainium3 をちょっと身近に感じたい
bigmuramura
1
140
AWS CLIの新しい認証情報設定方法aws loginコマンドの実態
wkm2
6
740
意外とあった SQL Server 関連アップデート + Database Savings Plans
stknohg
PRO
0
320
Fashion×AI「似合う」を届けるためのWEARのAI戦略
zozotech
PRO
2
460
.NET 10の概要
tomokusaba
0
110
AWSセキュリティアップデートとAWSを育てる話
cmusudakeisuke
0
280
評価駆動開発で不確実性を制御する - MLflow 3が支えるエージェント開発
databricksjapan
1
180
Haskell を武器にして挑む競技プログラミング ─ 操作的思考から意味モデル思考へ
naoya
6
1.5k
新 Security HubがついにGA!仕組みや料金を深堀り #AWSreInvent #regrowth / AWS Security Hub Advanced GA
masahirokawahara
1
2k
Sansanが実践する Platform EngineeringとSREの協創
sansantech
PRO
2
850
AWS Bedrock AgentCoreで作る 1on1支援AIエージェント 〜Memory × Evaluationsによる実践開発〜
yusukeshimizu
6
400
re:Invent2025 コンテナ系アップデート振り返り(+CloudWatchログのアップデート紹介)
masukawa
0
360
Featured
See All Featured
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.3k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Being A Developer After 40
akosma
91
590k
Speed Design
sergeychernyshev
33
1.4k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Optimizing for Happiness
mojombo
379
70k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Navigating Team Friction
lara
191
16k
Producing Creativity
orderedlist
PRO
348
40k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
1k
KATA
mclloyd
PRO
32
15k
Transcript
Future in WebApp Kengo TODA
Agenda • What is Future • What is CompletableFuture •
Common usage in WebApp
What is Future? • Proxy interface to get result of
async operation • Similar with JavaScript’s Promise
Ask, and it will be given to you
How to implement method which returns Future instance? • Asynchronous
Method Invocation (Java EE 6) • Creating Asynchronous Methods (Spring Framework)
What is CompletableFuture • New class from Java8, implements Future
interface • Similar with ListenableFuture in Guava and Spring Framework
Apply result to Function,
or combine them.
Merit: connect result of Async I/O seamlessly auth add new
post load timeline START END
None
When we use them? • When call async I/O •
Datastore • Message Queue • Cache • RESTful API
Example: When we use them? • If you are service
provider, • Public service API (interface for user) should return CompletableFuture instance if it may use I/O internally. • Then during I/O is running, your user can use current thread for other usage.
Keywords to google • Promise, Future • CompletableFuture • ListenableFuture
(Guava & Spring Framework) • Function composition