Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
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
210
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
160
KotlinユーザのためのJSpecify入門 / JSpecify 101 for Kotlin Devs
eller86
0
1.9k
JavaとGroovyで書かれたGradleプラグインをKotlinで書き直した話 / Converted a Gradle plugin from Groovy&Java to Kotlin
eller86
0
1.8k
ヒューマンスキル / The Humanskills
eller86
0
740
医療機関向けシステムの信頼性 / Reliability of systems for medical institutions
eller86
0
500
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
2.1k
Goodbye JSR305, Hello JSpecify!
eller86
2
5.4k
Java8〜16におけるバイトコード生成の変化 / Changes of Bytecode Generation from Java 8 to 16
eller86
4
4.6k
Other Decks in Technology
See All in Technology
Kubernetesにおける推論基盤
ry
1
380
会社紹介資料 / Sansan Company Profile
sansan33
PRO
16
410k
モブプログラミング再入門 ー 基本から見直す、AI時代のチーム開発の選択肢 ー / A Re-introduction of Mob Programming
takaking22
5
1.5k
チームのモメンタムに投資せよ! 不確実性と共存しながら勢いを生み出す3つの実践
kakehashi
PRO
1
100
タスク管理も1on1も、もう「管理」じゃない ― KiroとBedrock AgentCoreで変わった"判断の仕事"
yusukeshimizu
6
2.6k
内製AIチャットボットで学んだDatadog LLM Observability活用術
mkdev10
0
110
NewSQL_ ストレージ分離と分散合意を用いたスケーラブルアーキテクチャ
hacomono
PRO
4
340
AIエージェント時代に備える AWS Organizations とアカウント設計
kossykinto
3
970
2026-03-11 JAWS-UG 茨城 #12 改めてALBを便利に使う
masasuzu
2
380
Sansanでの認証基盤内製化と移行
sansantech
PRO
0
440
スクリプトの先へ!AIエージェントと組み合わせる モバイルE2Eテスト
error96num
0
170
脳内メモリ、思ったより揮発性だった
koutorino
0
350
Featured
See All Featured
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
67
37k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
390
Paper Plane (Part 1)
katiecoart
PRO
0
5.6k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
140
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Utilizing Notion as your number one productivity tool
mfonobong
4
260
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
170
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Design in an AI World
tapps
0
170
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
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