SlideShare a Scribd company logo
1 of 38
Download to read offline
이희승 (@trustin) / 開発1センター / LINE
Building Asynchronous
Microservices with Armeria
Armeriaで始める非同期Microservice開発
Why build another
microservice framework?
Asynchrony
●
Most web frameworks are blocking and synchronous.
– 1000 concurrent requests require 1000 threads.
– In modern systems, a service sends requests to another backend.
– Threads are busy doing nothing but just waiting for the backend.
– Request queue is not consumed fast enough.
– Result:
●
Fragile system that falls apart even on a tiny backend failure
●
Inefficient system that takes more memory and CPU than what it actually does
Reactive Streams
●
Should we really buffer everything until a response is sent?
– Retrieving 100,000 rows from a table
●
Why should a client send many requests to reduce the server memory
pressure?
– Retrieving 1,000 rows 100 times
●
What if we want to stream infinitely?
– Stock quotes
●
Our protocol is not a problem here.
– Our ‘blocking’ programming model is blocking ‘us’.
Better RPC support
●
RPC has been hardly a 1st-class citizen in web
frameworks.
– Distinction from RPC-level and HTTP-level failure
– Access logs with RPC-level details
– Debugging console
●
What if …
– We build a microservice framework with RPC at its core?
More reasons back in 2015
●
Leverage Java 8 syntax
– Lambda expressions
– Default interface methods
– Static interface methods
●
Provide ‘working’ HTTP/2 implementation
– ‘H2C’ support (HTTP/2 over ‘C’leartext)
– OpenSSL-based faster TLS connection
Better UX for devs
●
This is the last yet most important part.
●
Nobody wants a framework that’s hard to use.
●
Can we design …
– a user-friendly asynchronous programming API
– … with modest learning curve?
Our answer – Armeria
●
HTTP/2
– Both ciphertext and cleartext, a.k.a. h2 and h2c
●
Reactive
– Implements Reactive Streams API
●
Ability to mix different types of services in a single server
– gRPC, Thrift, REST services
– Legacy webapps via embedded Tomcat or Jetty
●
High-performance
– Netty with /dev/epoll transport and BoringSSL SSLEngine
●
Easy to learn and fun to use (hopefully)
Armeria by examples
HTTP / REST
Hello, world!
Hello, world – Parameterized
Hello, world – Annotated
With CompletableFuture
Streaming a million integers
There are more!
●
Query parameters
●
Request and response converters
●
Exception handlers
●
Content type negotiation
●
Regular-expression path mapping
●
Aims to be on-par or better than <your favorite web framework>
Armeria by examples
Thrift and gRPC
gRPC & Thrift basics
a. Write an IDL file – .proto or .thrift
b. A compiler compiles it into .java files.
c. Implement interfaces generated at ‘b’.
gRPC
Thrift
Decorating services
Separation of concerns
Intercepting an HTTP request
Intercepting a RPC request
●
Complete access to the RPC call information
●
Override the parameters and methods
Decorator as core extension mechanism
●
Request throttling
●
Metric collection
●
Distributed tracing (Zipkin)
●
HTTP content encoding
●
HTTP authn/z
●
CORS
●
Circuit breakers
●
Automatic retries
●
…
Distributed tracing with Brave·Zipkin
Playing better with RPC
Armeria documentation service
Armeria documentation service
●
Enabled by adding DocService to ServerBuilder
●
Browse and invoke RPC services in an Armeria server
●
Supports both gRPC and Thrift
●
We have a plan to add:
– Support for plain HTTP, like Swagger
– Metric monitoring console
– Runtime configuration editor, e.g. logger level
●
Share the URL to reproduce a call.
All the pieces fit together
The ultimate all-in-one micro(?) service
What about client-side?
Armeria client API
●
Similar experience to the server-side API
– e.g. Common type, Decorators, RPC-friendliness
●
Client-specific stuff
– Circuit breakers
– Automatic retries
– Client-side load balancing
– Retrofit integration
Got interested?
Let’s build Armeria together!
●
Use it.
●
Ask questions.
●
Request new features.
●
Tell us what rocks and sucks.
●
Consider joining the effort.
Meet us at GitHub and Slack
●
https://github.com/line/armeria
●
https://line-slacknow.herokuapp.com/line-armeria/

More Related Content

What's hot

オイラー先生のおしゃれな素数判定 - 第14回 #日曜数学会
オイラー先生のおしゃれな素数判定 - 第14回 #日曜数学会オイラー先生のおしゃれな素数判定 - 第14回 #日曜数学会
オイラー先生のおしゃれな素数判定 - 第14回 #日曜数学会Junpei Tsuji
 
ローマと道に関するいくつかの問題とその解決
ローマと道に関するいくつかの問題とその解決ローマと道に関するいくつかの問題とその解決
ローマと道に関するいくつかの問題とその解決at_akada
 
Колмогоров А.Н., Фомин С.В. Элементы теории функций и функционального анализа.
Колмогоров А.Н., Фомин С.В. Элементы теории функций и функционального анализа. Колмогоров А.Н., Фомин С.В. Элементы теории функций и функционального анализа.
Колмогоров А.Н., Фомин С.В. Элементы теории функций и функционального анализа. Yura Maturin
 
SIMDで整数除算
SIMDで整数除算SIMDで整数除算
SIMDで整数除算shobomaru
 
Deep Dive: Maximizing Amazon EC2 and Amazon Elastic Block Store Performance
Deep Dive: Maximizing Amazon EC2 and Amazon Elastic Block Store PerformanceDeep Dive: Maximizing Amazon EC2 and Amazon Elastic Block Store Performance
Deep Dive: Maximizing Amazon EC2 and Amazon Elastic Block Store PerformanceAmazon Web Services
 
キャッシュコヒーレントに囚われない並列カウンタ達
キャッシュコヒーレントに囚われない並列カウンタ達キャッシュコヒーレントに囚われない並列カウンタ達
キャッシュコヒーレントに囚われない並列カウンタ達Kumazaki Hiroki
 
日本語テキスト音声合成のための句境界予測モデルの検討
日本語テキスト音声合成のための句境界予測モデルの検討日本語テキスト音声合成のための句境界予測モデルの検討
日本語テキスト音声合成のための句境界予測モデルの検討Kosuke Futamata
 
プログラミングコンテストでのデータ構造 2 ~平衡二分探索木編~
プログラミングコンテストでのデータ構造 2 ~平衡二分探索木編~プログラミングコンテストでのデータ構造 2 ~平衡二分探索木編~
プログラミングコンテストでのデータ構造 2 ~平衡二分探索木編~Takuya Akiba
 
zk-SNARKsの仕組みについて
zk-SNARKsの仕組みについてzk-SNARKsの仕組みについて
zk-SNARKsの仕組みについてts21
 
LINEの新卒採用試験 ズバリ問題解説
LINEの新卒採用試験 ズバリ問題解説LINEの新卒採用試験 ズバリ問題解説
LINEの新卒採用試験 ズバリ問題解説LINE Corporation
 
高速な暗号実装のためにしてきたこと
高速な暗号実装のためにしてきたこと高速な暗号実装のためにしてきたこと
高速な暗号実装のためにしてきたことMITSUNARI Shigeo
 
CODE FESTIVAL 2015 解説
CODE FESTIVAL 2015 解説CODE FESTIVAL 2015 解説
CODE FESTIVAL 2015 解説AtCoder Inc.
 
ABC in Nebraska: Belden to Laurel Bridge
ABC in Nebraska: Belden to Laurel BridgeABC in Nebraska: Belden to Laurel Bridge
ABC in Nebraska: Belden to Laurel BridgeJill Reeves
 
快快樂樂SIMD
快快樂樂SIMD快快樂樂SIMD
快快樂樂SIMDWei-Ta Wang
 
AVX-512(フォーマット)詳解
AVX-512(フォーマット)詳解AVX-512(フォーマット)詳解
AVX-512(フォーマット)詳解MITSUNARI Shigeo
 
ハードディスクの正しい消去(2015.7)
ハードディスクの正しい消去(2015.7)ハードディスクの正しい消去(2015.7)
ハードディスクの正しい消去(2015.7)UEHARA, Tetsutaro
 

What's hot (20)

女の子になれなかった人のために
女の子になれなかった人のために女の子になれなかった人のために
女の子になれなかった人のために
 
オイラー先生のおしゃれな素数判定 - 第14回 #日曜数学会
オイラー先生のおしゃれな素数判定 - 第14回 #日曜数学会オイラー先生のおしゃれな素数判定 - 第14回 #日曜数学会
オイラー先生のおしゃれな素数判定 - 第14回 #日曜数学会
 
ローマと道に関するいくつかの問題とその解決
ローマと道に関するいくつかの問題とその解決ローマと道に関するいくつかの問題とその解決
ローマと道に関するいくつかの問題とその解決
 
Колмогоров А.Н., Фомин С.В. Элементы теории функций и функционального анализа.
Колмогоров А.Н., Фомин С.В. Элементы теории функций и функционального анализа. Колмогоров А.Н., Фомин С.В. Элементы теории функций и функционального анализа.
Колмогоров А.Н., Фомин С.В. Элементы теории функций и функционального анализа.
 
SIMDで整数除算
SIMDで整数除算SIMDで整数除算
SIMDで整数除算
 
Deep Dive: Maximizing Amazon EC2 and Amazon Elastic Block Store Performance
Deep Dive: Maximizing Amazon EC2 and Amazon Elastic Block Store PerformanceDeep Dive: Maximizing Amazon EC2 and Amazon Elastic Block Store Performance
Deep Dive: Maximizing Amazon EC2 and Amazon Elastic Block Store Performance
 
En läsande klass
En läsande klassEn läsande klass
En läsande klass
 
キャッシュコヒーレントに囚われない並列カウンタ達
キャッシュコヒーレントに囚われない並列カウンタ達キャッシュコヒーレントに囚われない並列カウンタ達
キャッシュコヒーレントに囚われない並列カウンタ達
 
日本語テキスト音声合成のための句境界予測モデルの検討
日本語テキスト音声合成のための句境界予測モデルの検討日本語テキスト音声合成のための句境界予測モデルの検討
日本語テキスト音声合成のための句境界予測モデルの検討
 
[DL Hacks]FPGA入門
[DL Hacks]FPGA入門[DL Hacks]FPGA入門
[DL Hacks]FPGA入門
 
プログラミングコンテストでのデータ構造 2 ~平衡二分探索木編~
プログラミングコンテストでのデータ構造 2 ~平衡二分探索木編~プログラミングコンテストでのデータ構造 2 ~平衡二分探索木編~
プログラミングコンテストでのデータ構造 2 ~平衡二分探索木編~
 
zk-SNARKsの仕組みについて
zk-SNARKsの仕組みについてzk-SNARKsの仕組みについて
zk-SNARKsの仕組みについて
 
LINEの新卒採用試験 ズバリ問題解説
LINEの新卒採用試験 ズバリ問題解説LINEの新卒採用試験 ズバリ問題解説
LINEの新卒採用試験 ズバリ問題解説
 
高速な暗号実装のためにしてきたこと
高速な暗号実装のためにしてきたこと高速な暗号実装のためにしてきたこと
高速な暗号実装のためにしてきたこと
 
CODE FESTIVAL 2015 解説
CODE FESTIVAL 2015 解説CODE FESTIVAL 2015 解説
CODE FESTIVAL 2015 解説
 
Za atsu-20170328
Za atsu-20170328Za atsu-20170328
Za atsu-20170328
 
ABC in Nebraska: Belden to Laurel Bridge
ABC in Nebraska: Belden to Laurel BridgeABC in Nebraska: Belden to Laurel Bridge
ABC in Nebraska: Belden to Laurel Bridge
 
快快樂樂SIMD
快快樂樂SIMD快快樂樂SIMD
快快樂樂SIMD
 
AVX-512(フォーマット)詳解
AVX-512(フォーマット)詳解AVX-512(フォーマット)詳解
AVX-512(フォーマット)詳解
 
ハードディスクの正しい消去(2015.7)
ハードディスクの正しい消去(2015.7)ハードディスクの正しい消去(2015.7)
ハードディスクの正しい消去(2015.7)
 

Similar to Building Asynchronous Microservices with Armeria

Building high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache ThriftBuilding high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache ThriftRX-M Enterprises LLC
 
WebSocket MicroService vs. REST Microservice
WebSocket MicroService vs. REST MicroserviceWebSocket MicroService vs. REST Microservice
WebSocket MicroService vs. REST MicroserviceRick Hightower
 
The Internet of Things ... Babel
The Internet of Things ... BabelThe Internet of Things ... Babel
The Internet of Things ... BabelNaLUG
 
Apache Thrift, a brief introduction
Apache Thrift, a brief introductionApache Thrift, a brief introduction
Apache Thrift, a brief introductionRandy Abernethy
 
gRPC Design and Implementation
gRPC Design and ImplementationgRPC Design and Implementation
gRPC Design and ImplementationVarun Talwar
 
Netflix Massively Scalable, Highly Available, Immutable Infrastructure
Netflix Massively Scalable, Highly Available, Immutable InfrastructureNetflix Massively Scalable, Highly Available, Immutable Infrastructure
Netflix Massively Scalable, Highly Available, Immutable InfrastructureAmer Ather
 
The new (is it really ) api stack
The new (is it really ) api stackThe new (is it really ) api stack
The new (is it really ) api stackLuca Mattia Ferrari
 
Web technology-guide
Web technology-guideWeb technology-guide
Web technology-guideSrihari
 
Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017
Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017
Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017Mustafa AKIN
 
Achieving mass scale with Quasar Fibers
Achieving mass scale with Quasar FibersAchieving mass scale with Quasar Fibers
Achieving mass scale with Quasar FibersIdan Sheinberg
 
Realtime traffic analyser
Realtime traffic analyserRealtime traffic analyser
Realtime traffic analyserAlex Moskvin
 
Advanced web application architecture - Talk
Advanced web application architecture - TalkAdvanced web application architecture - Talk
Advanced web application architecture - TalkMatthias Noback
 
Zero Downtime JEE Architectures
Zero Downtime JEE ArchitecturesZero Downtime JEE Architectures
Zero Downtime JEE ArchitecturesAlexander Penev
 
Stevens Hfc2010
Stevens Hfc2010Stevens Hfc2010
Stevens Hfc2010jzw200
 
APIs & Underlying Protocols #APICraftSF
APIs & Underlying Protocols #APICraftSFAPIs & Underlying Protocols #APICraftSF
APIs & Underlying Protocols #APICraftSFAndrei Savu
 
Article http over transport protocols
Article   http over transport protocolsArticle   http over transport protocols
Article http over transport protocolsIcaro Camelo
 

Similar to Building Asynchronous Microservices with Armeria (20)

Building high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache ThriftBuilding high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache Thrift
 
WebSocket MicroService vs. REST Microservice
WebSocket MicroService vs. REST MicroserviceWebSocket MicroService vs. REST Microservice
WebSocket MicroService vs. REST Microservice
 
The Internet of Things ... Babel
The Internet of Things ... BabelThe Internet of Things ... Babel
The Internet of Things ... Babel
 
Apache Thrift, a brief introduction
Apache Thrift, a brief introductionApache Thrift, a brief introduction
Apache Thrift, a brief introduction
 
gRPC Design and Implementation
gRPC Design and ImplementationgRPC Design and Implementation
gRPC Design and Implementation
 
HTTP/2
HTTP/2HTTP/2
HTTP/2
 
Netflix Massively Scalable, Highly Available, Immutable Infrastructure
Netflix Massively Scalable, Highly Available, Immutable InfrastructureNetflix Massively Scalable, Highly Available, Immutable Infrastructure
Netflix Massively Scalable, Highly Available, Immutable Infrastructure
 
The new (is it really ) api stack
The new (is it really ) api stackThe new (is it really ) api stack
The new (is it really ) api stack
 
Web technology-guide
Web technology-guideWeb technology-guide
Web technology-guide
 
Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017
Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017
Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017
 
Achieving mass scale with Quasar Fibers
Achieving mass scale with Quasar FibersAchieving mass scale with Quasar Fibers
Achieving mass scale with Quasar Fibers
 
Realtime traffic analyser
Realtime traffic analyserRealtime traffic analyser
Realtime traffic analyser
 
gRPC
gRPCgRPC
gRPC
 
Otimizando servidores web
Otimizando servidores webOtimizando servidores web
Otimizando servidores web
 
Advanced web application architecture - Talk
Advanced web application architecture - TalkAdvanced web application architecture - Talk
Advanced web application architecture - Talk
 
Api 101
Api 101Api 101
Api 101
 
Zero Downtime JEE Architectures
Zero Downtime JEE ArchitecturesZero Downtime JEE Architectures
Zero Downtime JEE Architectures
 
Stevens Hfc2010
Stevens Hfc2010Stevens Hfc2010
Stevens Hfc2010
 
APIs & Underlying Protocols #APICraftSF
APIs & Underlying Protocols #APICraftSFAPIs & Underlying Protocols #APICraftSF
APIs & Underlying Protocols #APICraftSF
 
Article http over transport protocols
Article   http over transport protocolsArticle   http over transport protocols
Article http over transport protocols
 

More from LINE Corporation

JJUG CCC 2018 Fall 懇親会LT
JJUG CCC 2018 Fall 懇親会LTJJUG CCC 2018 Fall 懇親会LT
JJUG CCC 2018 Fall 懇親会LTLINE Corporation
 
Reduce dependency on Rx with Kotlin Coroutines
Reduce dependency on Rx with Kotlin CoroutinesReduce dependency on Rx with Kotlin Coroutines
Reduce dependency on Rx with Kotlin CoroutinesLINE Corporation
 
Kotlin/NativeでAndroidのNativeメソッドを実装してみた
Kotlin/NativeでAndroidのNativeメソッドを実装してみたKotlin/NativeでAndroidのNativeメソッドを実装してみた
Kotlin/NativeでAndroidのNativeメソッドを実装してみたLINE Corporation
 
Use Kotlin scripts and Clova SDK to build your Clova extension
Use Kotlin scripts and Clova SDK to build your Clova extensionUse Kotlin scripts and Clova SDK to build your Clova extension
Use Kotlin scripts and Clova SDK to build your Clova extensionLINE Corporation
 
The Magic of LINE 購物 Testing
The Magic of LINE 購物 TestingThe Magic of LINE 購物 Testing
The Magic of LINE 購物 TestingLINE Corporation
 
UI Automation Test with JUnit5
UI Automation Test with JUnit5UI Automation Test with JUnit5
UI Automation Test with JUnit5LINE Corporation
 
Feature Detection for UI Testing
Feature Detection for UI TestingFeature Detection for UI Testing
Feature Detection for UI TestingLINE Corporation
 
LINE 新星計劃介紹與新創團隊分享
LINE 新星計劃介紹與新創團隊分享LINE 新星計劃介紹與新創團隊分享
LINE 新星計劃介紹與新創團隊分享LINE Corporation
 
​LINE 技術合作夥伴與應用分享
​LINE 技術合作夥伴與應用分享​LINE 技術合作夥伴與應用分享
​LINE 技術合作夥伴與應用分享LINE Corporation
 
LINE 開發者社群經營與技術推廣
LINE 開發者社群經營與技術推廣LINE 開發者社群經營與技術推廣
LINE 開發者社群經營與技術推廣LINE Corporation
 
日本開發者大會短講分享
日本開發者大會短講分享日本開發者大會短講分享
日本開發者大會短講分享LINE Corporation
 
LINE Chatbot - 活動報名報到設計分享
LINE Chatbot - 活動報名報到設計分享LINE Chatbot - 活動報名報到設計分享
LINE Chatbot - 活動報名報到設計分享LINE Corporation
 
在 LINE 私有雲中使用 Managed Kubernetes
在 LINE 私有雲中使用 Managed Kubernetes在 LINE 私有雲中使用 Managed Kubernetes
在 LINE 私有雲中使用 Managed KubernetesLINE Corporation
 
LINE TODAY高效率的敏捷測試開發技巧
LINE TODAY高效率的敏捷測試開發技巧LINE TODAY高效率的敏捷測試開發技巧
LINE TODAY高效率的敏捷測試開發技巧LINE Corporation
 
LINE 區塊鏈平台及代幣經濟 - LINK Chain及LINK介紹
LINE 區塊鏈平台及代幣經濟 - LINK Chain及LINK介紹LINE 區塊鏈平台及代幣經濟 - LINK Chain及LINK介紹
LINE 區塊鏈平台及代幣經濟 - LINK Chain及LINK介紹LINE Corporation
 
LINE Things - LINE IoT平台新技術分享
LINE Things - LINE IoT平台新技術分享LINE Things - LINE IoT平台新技術分享
LINE Things - LINE IoT平台新技術分享LINE Corporation
 
LINE Pay - 一卡通支付新體驗
LINE Pay - 一卡通支付新體驗LINE Pay - 一卡通支付新體驗
LINE Pay - 一卡通支付新體驗LINE Corporation
 
LINE Platform API Update - 打造一個更好的Chatbot服務
LINE Platform API Update - 打造一個更好的Chatbot服務LINE Platform API Update - 打造一個更好的Chatbot服務
LINE Platform API Update - 打造一個更好的Chatbot服務LINE Corporation
 
Keynote - ​LINE 的技術策略佈局與跨國產品開發
Keynote - ​LINE 的技術策略佈局與跨國產品開發Keynote - ​LINE 的技術策略佈局與跨國產品開發
Keynote - ​LINE 的技術策略佈局與跨國產品開發LINE Corporation
 

More from LINE Corporation (20)

JJUG CCC 2018 Fall 懇親会LT
JJUG CCC 2018 Fall 懇親会LTJJUG CCC 2018 Fall 懇親会LT
JJUG CCC 2018 Fall 懇親会LT
 
Reduce dependency on Rx with Kotlin Coroutines
Reduce dependency on Rx with Kotlin CoroutinesReduce dependency on Rx with Kotlin Coroutines
Reduce dependency on Rx with Kotlin Coroutines
 
Kotlin/NativeでAndroidのNativeメソッドを実装してみた
Kotlin/NativeでAndroidのNativeメソッドを実装してみたKotlin/NativeでAndroidのNativeメソッドを実装してみた
Kotlin/NativeでAndroidのNativeメソッドを実装してみた
 
Use Kotlin scripts and Clova SDK to build your Clova extension
Use Kotlin scripts and Clova SDK to build your Clova extensionUse Kotlin scripts and Clova SDK to build your Clova extension
Use Kotlin scripts and Clova SDK to build your Clova extension
 
The Magic of LINE 購物 Testing
The Magic of LINE 購物 TestingThe Magic of LINE 購物 Testing
The Magic of LINE 購物 Testing
 
GA Test Automation
GA Test AutomationGA Test Automation
GA Test Automation
 
UI Automation Test with JUnit5
UI Automation Test with JUnit5UI Automation Test with JUnit5
UI Automation Test with JUnit5
 
Feature Detection for UI Testing
Feature Detection for UI TestingFeature Detection for UI Testing
Feature Detection for UI Testing
 
LINE 新星計劃介紹與新創團隊分享
LINE 新星計劃介紹與新創團隊分享LINE 新星計劃介紹與新創團隊分享
LINE 新星計劃介紹與新創團隊分享
 
​LINE 技術合作夥伴與應用分享
​LINE 技術合作夥伴與應用分享​LINE 技術合作夥伴與應用分享
​LINE 技術合作夥伴與應用分享
 
LINE 開發者社群經營與技術推廣
LINE 開發者社群經營與技術推廣LINE 開發者社群經營與技術推廣
LINE 開發者社群經營與技術推廣
 
日本開發者大會短講分享
日本開發者大會短講分享日本開發者大會短講分享
日本開發者大會短講分享
 
LINE Chatbot - 活動報名報到設計分享
LINE Chatbot - 活動報名報到設計分享LINE Chatbot - 活動報名報到設計分享
LINE Chatbot - 活動報名報到設計分享
 
在 LINE 私有雲中使用 Managed Kubernetes
在 LINE 私有雲中使用 Managed Kubernetes在 LINE 私有雲中使用 Managed Kubernetes
在 LINE 私有雲中使用 Managed Kubernetes
 
LINE TODAY高效率的敏捷測試開發技巧
LINE TODAY高效率的敏捷測試開發技巧LINE TODAY高效率的敏捷測試開發技巧
LINE TODAY高效率的敏捷測試開發技巧
 
LINE 區塊鏈平台及代幣經濟 - LINK Chain及LINK介紹
LINE 區塊鏈平台及代幣經濟 - LINK Chain及LINK介紹LINE 區塊鏈平台及代幣經濟 - LINK Chain及LINK介紹
LINE 區塊鏈平台及代幣經濟 - LINK Chain及LINK介紹
 
LINE Things - LINE IoT平台新技術分享
LINE Things - LINE IoT平台新技術分享LINE Things - LINE IoT平台新技術分享
LINE Things - LINE IoT平台新技術分享
 
LINE Pay - 一卡通支付新體驗
LINE Pay - 一卡通支付新體驗LINE Pay - 一卡通支付新體驗
LINE Pay - 一卡通支付新體驗
 
LINE Platform API Update - 打造一個更好的Chatbot服務
LINE Platform API Update - 打造一個更好的Chatbot服務LINE Platform API Update - 打造一個更好的Chatbot服務
LINE Platform API Update - 打造一個更好的Chatbot服務
 
Keynote - ​LINE 的技術策略佈局與跨國產品開發
Keynote - ​LINE 的技術策略佈局與跨國產品開發Keynote - ​LINE 的技術策略佈局與跨國產品開發
Keynote - ​LINE 的技術策略佈局與跨國產品開發
 

Recently uploaded

QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 

Building Asynchronous Microservices with Armeria

  • 1. 이희승 (@trustin) / 開発1センター / LINE Building Asynchronous Microservices with Armeria Armeriaで始める非同期Microservice開発
  • 3. Asynchrony ● Most web frameworks are blocking and synchronous. – 1000 concurrent requests require 1000 threads. – In modern systems, a service sends requests to another backend. – Threads are busy doing nothing but just waiting for the backend. – Request queue is not consumed fast enough. – Result: ● Fragile system that falls apart even on a tiny backend failure ● Inefficient system that takes more memory and CPU than what it actually does
  • 4. Reactive Streams ● Should we really buffer everything until a response is sent? – Retrieving 100,000 rows from a table ● Why should a client send many requests to reduce the server memory pressure? – Retrieving 1,000 rows 100 times ● What if we want to stream infinitely? – Stock quotes ● Our protocol is not a problem here. – Our ‘blocking’ programming model is blocking ‘us’.
  • 5. Better RPC support ● RPC has been hardly a 1st-class citizen in web frameworks. – Distinction from RPC-level and HTTP-level failure – Access logs with RPC-level details – Debugging console ● What if … – We build a microservice framework with RPC at its core?
  • 6. More reasons back in 2015 ● Leverage Java 8 syntax – Lambda expressions – Default interface methods – Static interface methods ● Provide ‘working’ HTTP/2 implementation – ‘H2C’ support (HTTP/2 over ‘C’leartext) – OpenSSL-based faster TLS connection
  • 7. Better UX for devs ● This is the last yet most important part. ● Nobody wants a framework that’s hard to use. ● Can we design … – a user-friendly asynchronous programming API – … with modest learning curve?
  • 8. Our answer – Armeria ● HTTP/2 – Both ciphertext and cleartext, a.k.a. h2 and h2c ● Reactive – Implements Reactive Streams API ● Ability to mix different types of services in a single server – gRPC, Thrift, REST services – Legacy webapps via embedded Tomcat or Jetty ● High-performance – Netty with /dev/epoll transport and BoringSSL SSLEngine ● Easy to learn and fun to use (hopefully)
  • 11. Hello, world – Parameterized
  • 12. Hello, world – Annotated
  • 15.
  • 16. There are more! ● Query parameters ● Request and response converters ● Exception handlers ● Content type negotiation ● Regular-expression path mapping ● Aims to be on-par or better than <your favorite web framework>
  • 18. gRPC & Thrift basics a. Write an IDL file – .proto or .thrift b. A compiler compiles it into .java files. c. Implement interfaces generated at ‘b’.
  • 19. gRPC
  • 23. Intercepting a RPC request ● Complete access to the RPC call information ● Override the parameters and methods
  • 24. Decorator as core extension mechanism ● Request throttling ● Metric collection ● Distributed tracing (Zipkin) ● HTTP content encoding ● HTTP authn/z ● CORS ● Circuit breakers ● Automatic retries ● …
  • 25. Distributed tracing with Brave·Zipkin
  • 26. Playing better with RPC Armeria documentation service
  • 27. Armeria documentation service ● Enabled by adding DocService to ServerBuilder ● Browse and invoke RPC services in an Armeria server ● Supports both gRPC and Thrift ● We have a plan to add: – Support for plain HTTP, like Swagger – Metric monitoring console – Runtime configuration editor, e.g. logger level
  • 28.
  • 29.
  • 30. ● Share the URL to reproduce a call.
  • 31. All the pieces fit together The ultimate all-in-one micro(?) service
  • 32.
  • 34. Armeria client API ● Similar experience to the server-side API – e.g. Common type, Decorators, RPC-friendliness ● Client-specific stuff – Circuit breakers – Automatic retries – Client-side load balancing – Retrofit integration
  • 35.
  • 37. Let’s build Armeria together! ● Use it. ● Ask questions. ● Request new features. ● Tell us what rocks and sucks. ● Consider joining the effort.
  • 38. Meet us at GitHub and Slack ● https://github.com/line/armeria ● https://line-slacknow.herokuapp.com/line-armeria/