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
190
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
120
KotlinユーザのためのJSpecify入門 / JSpecify 101 for Kotlin Devs
eller86
0
1.5k
JavaとGroovyで書かれたGradleプラグインをKotlinで書き直した話 / Converted a Gradle plugin from Groovy&Java to Kotlin
eller86
0
1.5k
ヒューマンスキル / The Humanskills
eller86
0
690
医療機関向けシステムの信頼性 / Reliability of systems for medical institutions
eller86
0
410
Server-side Kotlinを使うスタートアップでどんなDetektルールが育ったか / Detekt rules made in start-up working with Server-side Kotlin
eller86
0
1.5k
Java開発者向けのKotlin Gradleビルドスクリプト入門 / Gradle Build Script in Kotlin 101
eller86
1
1.9k
Goodbye JSR305, Hello JSpecify!
eller86
2
5.2k
Java8〜16におけるバイトコード生成の変化 / Changes of Bytecode Generation from Java 8 to 16
eller86
4
4.5k
Other Decks in Technology
See All in Technology
Claude Code x Androidアプリ 開発
kgmyshin
1
270
React Server ComponentsでAPI不要の開発体験
polidog
PRO
0
350
Infrastructure as Prompt実装記 〜Bedrock AgentCoreで作る自然言語インフラエージェント〜
yusukeshimizu
1
160
AIドリブンのソフトウェア開発 - うまいやり方とまずいやり方
okdt
PRO
7
130
PFEM Online Feature Flag @ newmo
shinyaishitobi
2
150
サービスロボット最前線:ugoが挑むPhysical AI活用
kmatsuiugo
0
140
生成AIによるデータサイエンスの変革
taka_aki
0
3.1k
Amazon Bedrock AgentCoreのフロントエンドを探す旅 (Next.js編)
kmiya84377
1
160
メルカリIBIS:AIが拓く次世代インシデント対応
0gm
2
460
【OptimizationNight】数理最適化のラストワンマイルとしてのUIUX
brainpadpr
2
560
o11yツールを乗り換えた話
tak0x00
2
1.7k
生成AIによるソフトウェア開発の収束地点 - Hack Fes 2025
vaaaaanquish
34
16k
Featured
See All Featured
How GitHub (no longer) Works
holman
314
140k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
126
53k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
6k
Facilitating Awesome Meetings
lara
55
6.5k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3k
GraphQLとの向き合い方2022年版
quramy
49
14k
Being A Developer After 40
akosma
90
590k
jQuery: Nuts, Bolts and Bling
dougneiner
64
7.9k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.4k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
9
770
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