Upgrade to Pro — share decks privately, control downloads, hide ads and more …

TECHPULSE 2019 - LINE SPOT and How We Build It

TECHPULSE 2019 - LINE SPOT and How We Build It

By Julian Shen @LINE TECHPULSE 2019 https://techpulse.line.me/


LINE Developers Taiwan

December 04, 2019

More Decks by LINE Developers Taiwan

Other Decks in Programming


  1. None

    / LINE SPOT Development
  3. What is LINE SPOT? Let’s start from a simple scenario

  4. Imagine This Julian

  5. What Would You Do?

  6. Find On Map and paste it back to chatroom Texts

    With a Very Small Image Julian
  7. You May Also Want To Know what other people says

    on the Internet Julian Search Julian Texts With a Very Small Image
  8. You May Also Want To Know Any discount? Any promotion?

    Julian Julian LINEꃏⵚ FunNow LINE翝㣔㹔
  9. Make a Reservation How you make a reservation? Via phone?

    Online? Julian
  10. Need a Ride? Julian Call LINE Taxi!!

  11. It’s a Long Journey and many tools involved LINE Map

    Search LINE TODAY LINE 蠐ڭ FunNow Phone Call 肾肾 LINE Taxi Discover Reserve Transport Discuss
  12. Put It All Together Stores Articles Comments & Ratings Promotions

    Reservation Transportation
  13. 蝫娄䄓ݪ੻ Life On LINE SPOT Making it easier Julian Julian

  14. LINE SPOT Is LINE Near by O2O Services

  15. Challenges with building LINE SPOT Shipping Features More Frequently Need

    To Be Able To Support High Traffic Many Different Services Needed To Be Integrated
  16. We Decide To Build With Microservices GraphQL Vue.Js LINE Flex

    Message Event Sourcing Messaging API Kafka Kubernetes
  17. Microservices Architecture Suite of small and loosely coupled services (Loose

    Coupling) Each service encapsulates all related logic and data (High Cohesion) Each service serve single purpose (Single Purpose)
  18. Monolithic Microservices DB Data Access Layer Business Logic User Interface

    DB DB DB User Interface Order Service Customer Service Product Interface Cart Service
  19. Why We Adopted Microservices Advantage of Microservices Flexibility of Development

    > Easy to add new components > Easy to replace with new implementation > Right technology for the job > Deploy independently > Scale independently > Easy to isolate and find problems Easy To Maintain
  20. Challenges Come With Microservices Disadvantage of Microservices More complexity in

    connectivity More complexity in operation More complexity in data integration
  21. Frontend and Microservices User Interface Too Many Interfaces To Communicate

    Service 1 Service 2 Service 3 Service 4 Thrift Thrift Thrift
  22. Frontend and Microservices User Interface Service 1 Service 2 Service

    3 Service 4 API Gateway Thrift Thrift Thrift Thrift Thrift Thrift Thrift GraphQL Ask What You Need, Get Exactly That Get Many Resources in a Single Request
  23. Example of GraphQL { hero { name # Queries can

    have comments! friends { name } } } { "data": { "hero": { "name": "R2-D2", "friends": [ { "name": "Luke Skywalker" }, { "name": "Han Solo" }, { "name": "Leia Organa" } ] } }\
  24. Challenges of Data Integration Schema might need to be changed

    when add new services Data might be in several databases Data aggregation at runtime is inefficient Various data sources from partners
  25. Data Integration Coupon List POI Search POI Detail Recommendation Store

    Management Data Presentation POI LINE OA OA Coupon Partner (Reservation) Partner (Vocher) Partner (Ticket)
  26. Traditional CRUD POI Coupon Voucher Store Detail Join Tables At

    Runtime POI Coupon Voucher Store Service Coupon Service Voucher Service Store Detail
  27. Event Sourcing Handler 1 Handler 2 View 1 View 2

    View 3 View 4 Service 1 Service 2 Service 3 Service 4 View Service Event Handler Events POI Create POI Delete POI Create POI Update Add New Product Update Product Delete Product Add New Product Add New Service Service
 Change Add New Service Service
  28. Challenges in Operations > Different configurations for different env (beta,

    staging, production) > Kafka connector configurations Configurations Resources > How to use resources efficiently Lot of Services & Containers > More complexity in deployment > Service discovery could be complicated
  29. Deployment With Kubernetes Kustomize Configuration Changes GitHub Drone CI Docker

    Registry Kubectl Kubernetes Commit Build Kustomize
  30. Beta Deployment With Kubernetes GitHub Drone CI Docker Registry Kubectl

    Kubernetes Code Changes Commit Build Publish Deploy
  31. Deploy Kafka Connector Configurations GitHub Drone CI Kafka Connect Config

    Changes Commit Build REST API > Deployment is apart from Deployment to Kubernetes cluster > Hard to manage dependencies
  32. Kafka Connector as K8S Resource GitHub Drone CI Kubectl Kustomize

    Configuration Changes Commit Build Kustomize Kafka Connect Operator Kubernetes Kafka Connect REST API
  33. LINE SPOT Architecture MySQL ElasticSearch Kafka Streams Kafka Connect Locator

    Suggester Partners Ticket Registration {Rest Api} GraphQL Used by CMS Material View Kubernetes Cluster API Gateway Partner API Browser
  34. Tech Stacks We Used To Build LINE SPOT

  35. Thank You