Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Future in WebApp (Java)
Search
Kengo TODA
July 17, 2016
Technology
230
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Future in WebApp (Java)
Short description about Future and CompletableFuture
Kengo TODA
July 17, 2016
More Decks by Kengo TODA
See All by Kengo TODA
セキュリティ担当がいない中小医療機関を院外のRISSはどう支えるべきか / How External RISS Can Help Small Medical Institutions
eller86
1
220
AI といっしょに仕事をする(子供向け)
eller86
0
54
Kotlin 開発のツラミを爆破した話! / Explode the difficulty of Kotlin dev!
eller86
0
200
生成AI 業務応用向けガイドライン 斜め読み / Overview of Generative AI Business Application Guidelines
eller86
0
220
KotlinユーザのためのJSpecify入門 / JSpecify 101 for Kotlin Devs
eller86
0
2.4k
JavaとGroovyで書かれたGradleプラグインをKotlinで書き直した話 / Converted a Gradle plugin from Groovy&Java to Kotlin
eller86
0
1.9k
ヒューマンスキル / The Humanskills
eller86
0
780
医療機関向けシステムの信頼性 / Reliability of systems for medical institutions
eller86
0
550
Server-side Kotlinを使うスタートアップでどんなDetektルールが育ったか / Detekt rules made in start-up working with Server-side Kotlin
eller86
0
1.7k
Other Decks in Technology
See All in Technology
AI時代に必要な脅威モデリング― 変化の速度に負けない理解とリスク判断
masakane55
5
1.2k
脆弱性診断って、何をしているの? 〜弱点を見つけて、会社の改善につなげるまで〜
keeg
0
770
スキルを作る、その前に!複数人で使われるスキルを 作るためのプロセス
junkifurukawa
2
370
AI時代だからこそ推したい!Gitコマンド再入門
munakata
0
160
転んだ話が背中を預ける理由になる / A_story_about_falling_down_gives_you_a_reason_to_watch_each_other_s_backs.pdf
pauli
3
340
検証フェーズはAIの回答を判断するための学習機会
toru_kubota
2
550
自律型 AI をセキュアに実装!Gemini と MIG で作る動的コード実行環境
recruitengineers
PRO
1
230
ハードウェアコンペでもAI駆動開発が進んでいる話
iotengineer22
1
650
SDDの運用にめげずに向き合った話
sansantech
PRO
1
140
生成AIを使って「人が」考える技術 ― AI時代の人機共想と実践ノウハウ|UNITT AC2026
ishiirikie
0
580
並行性の問題を防げ!実践トランザクション入門
occhi
0
280
継続的なAIコスト最適化
bgpat
1
270
Featured
See All Featured
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
740
Utilizing Notion as your number one productivity tool
mfonobong
4
610
Design in an AI World
tapps
1
350
We Have a Design System, Now What?
morganepeng
55
8.4k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
590
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
210
Writing Fast Ruby
sferik
630
63k
Skip the Path - Find Your Career Trail
mkilby
1
250
Thoughts on Productivity
jonyablonski
76
5.4k
Typedesign – Prime Four
hannesfritz
42
3.2k
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