a 9 line shop powered by armeria

39

Upload: line-corporation

Post on 17-Feb-2017

4.822 views

Category:

Technology


3 download

TRANSCRIPT

1 Introductions LINE Shop & Armeria 2 Benefits of Armeria 3 How to use Armeria

What is LINE Shop?

What is Armeria?

・http://line.github.io/armeria/

・Asynchronous RPC/API client/server library built on top of

・Java 8, Netty 4.1, HTTP/2, and Thrift

Name of Armeria

Shop Architecture

Thr i f t Proxy

Talk-server

Shop-server Search FE Elast icsearch

Thr i f t web

Thr i f t

DB

Thr i f t REST

Shop Architecture

Thr i f t Proxy

Talk-server

Shop-server Search FE Elast icsearch

Thr i f t REST

Thr i f t web

Thr i f t

Armeria Servers & Clients

DB

Shop Architecture

Thr i f t Proxy

Talk-server

Shop-server Search FE Elast icsearch

Thr i f t REST

Thr i f t web

Thr i f t

Armeria Servers & Clients

DB Client in talk-server

Explore the Armeria World

Benefits of Armeria

・Production-Ready RPC layer ・Affinity with concurrent system ・Easy HTTP/2

Examples with code snippets

Production-Ready RPC layer

Concurrent system Fits for the service processing

・many many ・ independent ・user requests ・with low latency!

i.e. most user-facing mobile services

・Like :)

# of requests processed

# of requests processed

Let's go deeper.

# of backend requests

# of backend requests

# of backend requests

# of backend requests

Go Deeper

Many User Requests ・Which requires multiple backend requests ・ concurrently...

⇒ Many server-to-server requests and resource consumption!?

⇒ Yes and No!

HTTP/2 !

Multiplexed requests & responses in 1 connection!

Just one connection

Reduced Listen Drops

Benefits of Armeria

Armeria fits really well for our use case ・Concurrent system ・Connection management with HTTP/2 ・Easy to integrate with monitoring

Some pitfalls too

How to use Armeria

Code snippets

・Thrift ・HTTP

More Practices

・How we log the metrics and implement Zipkin integration.

Server: Thrift

Client: Thrift

Server&Client: HTTP

Metrics Logging & Zipkin Integration

Real Code Examples

Armeria from User point-of-view

Well-abstracted coding patterns

Useful “decorator” support ・Coming with metrics, logging, tracing, …

And More Armeria!

Automated Document generator ・http://line.github.io/armeria/server-basics.html#adding-a-documentation-service

Circuit Breaker ・http://developers.linecorp.com/blog/ja/?p=3684

Client-side Load Balancing ・https://github.com/line/armeria/issues/87

And More Armeria! (2)

gRPC support ・https://github.com/line/armeria/pull/247

Code

Examples are available in

https://github.com/haruki-sugarsun/armeria_test

Special Thanks

Armeria Authors ・Trustin Lee ・http://linedevday.linecorp.com/kr/2015/en/#t1s6 ・https://github.com/line/armeria/graphs/contributors

Teammates :)

Teammates

Summary

1 Armeria in Production

・Benefits of HTTP/2

2 Armeria use cases

& examples

Q&A