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
210
0
Share
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
生成AI 業務応用向けガイドライン 斜め読み / Overview of Generative AI Business Application Guidelines
eller86
0
170
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
510
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.5k
Java8〜16におけるバイトコード生成の変化 / Changes of Bytecode Generation from Java 8 to 16
eller86
4
4.6k
Other Decks in Technology
See All in Technology
AIドリブン開発の実践知 ― AI-DLC Unicorn Gym実施から見えた可能性と課題
mixi_engineers
PRO
0
120
Kubernetes基盤における開発者体験 とセキュリティの両⽴ / Balancing developer experience and security in a Kubernetes-based environment
chmikata
0
210
AWSで2番目にリリースされたサービスについてお話しします(諸説あります)
yama3133
0
130
Oracle AI Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
6
1.4k
Cortex Codeでデータの仕事を全部Agenticにやりきろう!
gappy50
0
330
Hooks, Filters & Now Context: Why MCPs Are the “Hooks” of the AI Era
miriamschwab
0
120
主催・運営として"場をつくる”というアウトプットのススメ
_mossann_t
0
130
AIがコードを書く時代の ジェネレーティブプログラミング
polidog
PRO
3
640
Discordでリモートポケカしてたら、なぜかDOを25分間動かせるようになった話
umireon
0
110
組織的なAI活用を阻む 最大のハードルは コンテキストデザインだった
ixbox
1
1.2k
Oracle AI Databaseデータベース・サービス: BaseDB/ExaDB-Dの可用性
oracle4engineer
PRO
1
170
さくらのクラウドでつくるCloudNative Daysのオブザーバビリティ基盤
b1gb4by
0
130
Featured
See All Featured
The SEO identity crisis: Don't let AI make you average
varn
0
440
Evolving SEO for Evolving Search Engines
ryanjones
0
170
Art, The Web, and Tiny UX
lynnandtonic
304
21k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.5k
Darren the Foodie - Storyboard
khoart
PRO
3
3.1k
The browser strikes back
jonoalderson
0
900
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
96
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
73k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
160
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
23k
Making the Leap to Tech Lead
cromwellryan
135
9.8k
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