Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

A 9 line shop powered by armeria

8,866 views

Published on

TBD

Published in: Technology
  • Be the first to comment

A 9 line shop powered by armeria

  1. 1. 1 Introductions LINE Shop & Armeria 2 Benefits of Armeria 3 How to use Armeria
  2. 2. What is LINE Shop?
  3. 3. 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
  4. 4. Name of Armeria
  5. 5. Shop Architecture Thrift Proxy Talk-server Shop-server Search FE Elasticsearch Thriftweb Thrift DB Thrift REST
  6. 6. Shop Architecture Thrift Proxy Talk-server Shop-server Search FE Elasticsearch Thrift REST Thriftweb Thrift Armeria Servers & Clients DB
  7. 7. Shop Architecture Thrift Proxy Talk-server Shop-server Search FE Elasticsearch Thrift REST Thriftweb Thrift Armeria Servers & Clients DB Client in talk-server
  8. 8. Explore the Armeria World Benefits of Armeria ・Production-Ready RPC layer ・Affinity with concurrent system ・Easy HTTP/2 Examples with code snippets
  9. 9. 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 :)
  10. 10. # of requests processed
  11. 11. # of requests processed Let's go deeper.
  12. 12. # of backend requests
  13. 13. # of backend requests
  14. 14. # of backend requests
  15. 15. # of backend requests
  16. 16. Go Deeper Many User Requests ・Which requires multiple backend requests ・ concurrently... ⇒ Many server-to-server requests and resource consumption!? ⇒ Yes and No!
  17. 17. HTTP/2 ! Multiplexed requests & responses in 1 connection!
  18. 18. Just one connection
  19. 19. Reduced Listen Drops
  20. 20. Benefits of Armeria Armeria fits really well for our use case ・Concurrent system ・Connection management with HTTP/2 ・Easy to integrate with monitoring
  21. 21. Some pitfalls too
  22. 22. How to use Armeria Code snippets ・Thrift ・HTTP More Practices ・How we log the metrics and implement Zipkin integration.
  23. 23. Server: Thrift
  24. 24. Client: Thrift
  25. 25. Server&Client: HTTP
  26. 26. Metrics Logging & Zipkin Integration
  27. 27. Real Code Examples
  28. 28. Armeria from User point-of-view Well-abstracted coding patterns Useful “decorator” support ・Coming with metrics, logging, tracing, …
  29. 29. 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
  30. 30. And More Armeria! (2) gRPC support ・https://github.com/line/armeria/pull/247
  31. 31. Code Examples are available in https://github.com/haruki-sugarsun/armeria_test
  32. 32. Special Thanks Armeria Authors ・Trustin Lee ・http://linedevday.linecorp.com/kr/2015/en/#t1s6 ・https://github.com/line/armeria/graphs/contributors Teammates :)
  33. 33. Teammates
  34. 34. Summary 1 Armeria in Production ・Benefits of HTTP/2 2 Armeria use cases & examples
  35. 35. Q&A

×