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

Background of Development of Next-Generation Marketing Data Utilization Infrastructure "Business Manager"

LINE DEVDAY 2021
November 11, 2021
110

Background of Development of Next-Generation Marketing Data Utilization Infrastructure "Business Manager"

LINE DEVDAY 2021

November 11, 2021
Tweet

More Decks by LINE DEVDAY 2021

Transcript

  1. Agenda
    - What is Business Manager?
    - About the system
    - Findings from development
    - Summary

    View full-size slide

  2. What is Business Manager?

    View full-size slide

  3. LINE Ads
    Account
    LINE Official
    Account
    Business
    Manager
    Delivery
    LINE Ads LINE Official
    Account
    Other Service
    Account1
    Other Service
    Account2
    Business Manager
    etc

    View full-size slide

  4. LINE B2B Products

    View full-size slide

  5. LINE B2B Products
    LINE Official
    Account
    LINE Ads LINE POINT
    etc.

    View full-size slide

  6. LINE Ads
    Account
    LINE Official
    Account
    Business
    Manager
    Other Service
    Account1
    Other Service
    Account2
    Business Manager

    View full-size slide

  7. LINE Ads
    Account
    LINE Official
    Account
    Business
    Manager
    Other Service
    Account1
    Other Service
    Account2
    Business Manager
    Delivery
    LINE Ads LINE Official
    Account etc

    View full-size slide

  8. LINE Ads
    Account
    LINE Official
    Account
    Business
    Manager
    Delivery
    Other Service
    Account1
    Other Service
    Account2
    Analytics
    Business Manager
    LINE Ads LINE Official
    Account etc

    View full-size slide

  9. What makes Business Manager
    “Next-Generation”

    View full-size slide

  10. Cross targeting (As Is)
    LINE Ads
    LINE Official
    Account
    Brand A
    Company
    LINE Ads
    LINE Official
    Account
    Brand B

    View full-size slide

  11. Business Manager (To Be)
    LINE Ads
    LINE Official
    Account
    Brand A
    Company
    LINE Ads
    LINE Official
    Account
    Brand B

    View full-size slide

  12. Business Manager
    features

    View full-size slide

  13. Manage an organization
    Organization A
    Data
    Data
    Data
    Data
    Data
    Data
    Data
    Data
    LINE Official
    Account 2
    LINE Ads 2
    LINE Official
    Account 1
    LINE Ads 1

    View full-size slide

  14. Manage an organization
    Organization A
    LINE Tag 1
    Data
    LINE Tag 2
    Data
    LINE Tag 3
    Data
    LINE Tag 4
    Data
    LINE Official
    Account 2
    LINE Ads 2
    LINE Official
    Account 1
    LINE Ads 1

    View full-size slide

  15. Manage an organization
    Organization A
    LINE Tag 1
    Audience 1
    LINE Tag 2
    Audience 2
    LINE Tag 3
    Audience 3
    LINE Tag 4
    Audience 4
    LINE Official
    Account 2
    LINE Ads 2
    LINE Official
    Account 1
    LINE Ads 1

    View full-size slide

  16. Verification
    LINE Ads 2
    LINE Ads 1 LINE Official
    Account 2
    LINE Official
    Account 1
    Organization A
    Audience 1 Audience 2 Audience 3 Audience 4

    View full-size slide

  17. Verification
    LINE Ads 2
    LINE Ads 1 LINE Official
    Account 2
    LINE Official
    Account 1
    Organization A
    Audience 1 Audience 2 Audience 3 Audience 4
    WFSJGJFE WFSJGJFE WFSJGJFE
    WFSJGJFE

    View full-size slide

  18. Change permissions
    LINE Ads 1 LINE Official
    Account 1
    Organization A
    Audience 1 Audience 2

    View full-size slide

  19. Create LINE tags and audience data
    LINE Official
    Account 1
    LINE Ads 1 LINE Ads 2
    Organization A
    LINE Tag 1
    Audience 1
    LINE Tag 2
    Audience 2
    LINE Tag 3
    Audience 3

    View full-size slide

  20. Create LINE tags and custom audiences
    LINE Official
    Account 1
    LINE Ads 1 LINE Ads 2
    Organization A
    LINE Tag 1
    Audience 1
    LINE Tag 2
    Audience 2
    LINE Tag 3
    Audience 3
    Audience 4
    LINE Tag 4

    View full-size slide

  21. About the system

    View full-size slide

  22. LINE DMP
    “LINE DMP: Connect the All B2B Products with Over 100M Users”
    https://linedevday.linecorp.com/2020/ja/sessions/6695
    LINE Services
    LINE DMP
    LINE
    Platform
    Client
    Data
    LINE Ads
    LINE
    Official
    Account
    ・・・

    View full-size slide

  23. Cross Targeting (As Is)
    API
    LINE DMP
    API
    Other services
    LINE Ads
    LINE Official Account
    etc
    Audience data

    View full-size slide

  24. Business Manager (To Be)
    Management
    System
    Business Manager
    API API
    Kafka
    Batch
    Permissions
    Consumer
    LINE DMP
    API
    Other services
    LINE Ads
    LINE Official Account
    etc
    Audience data

    View full-size slide

  25. System collaboration patterns
    Management
    System
    Business Manager
    API API
    Kafka
    Batch
    Permissions
    Consumer
    LINE DMP
    API
    Other services
    LINE Ads
    LINE Official Account
    etc
    Audience data

    View full-size slide

  26. REST API
    Management
    System
    Business Manager
    API API
    Kafka
    Batch
    Permissions
    Consumer
    LINE DMP
    API
    Other services
    LINE Ads
    LINE Official Account
    etc
    Audience data

    View full-size slide

  27. Messaging
    Management
    System
    Business Manager
    API API
    Kafka
    Consumer
    LINE DMP
    API
    Other services
    LINE Ads
    LINE Official Account
    etc
    Audience data
    Batch
    Permissions

    View full-size slide

  28. Messaging
    Management
    System
    Business Manager
    API API
    Kafka
    Consumer
    LINE DMP
    API
    Other services
    LINE Ads
    LINE Official Account
    etc
    Audience data
    Batch
    Permissions

    View full-size slide

  29. Messaging
    Management
    System
    Business Manager
    API API
    Kafka
    Consumer
    LINE DMP
    API
    Other services
    LINE Ads
    LINE Official Account
    etc
    Audience data
    Batch
    Permissions

    View full-size slide

  30. Technology stack
    - MySQL, Redis, Kafka
    - Verda (LINE private cloud)
    - Kotlin, Spring Boot

    View full-size slide

  31. Technology stack
    - MySQL, Redis, Kafka
    - Verda (LINE private cloud)
    - Kotlin, Spring Boot

    View full-size slide

  32. Technology stack
    - MySQL, Redis, Kafka
    - Verda (LINE private cloud)
    - Kotlin, Spring Boot

    View full-size slide

  33. Technology stack
    - MySQL, Redis, Kafka
    - Verda (LINE private cloud)
    - Kotlin, Spring Boot

    View full-size slide

  34. Findings from development

    View full-size slide

  35. System collaboration

    View full-size slide

  36. System overview
    Management
    System
    Business Manager
    API API
    Kafka
    Batch
    Permissions
    Consumer
    LINE DMP
    API
    Other services
    LINE Ads
    LINE Official Account
    etc
    Audience data

    View full-size slide

  37. Synchronize transactions
    between DB and Kafka
    “Twemoji” ©Twitter, Inc and other contributors (Licensed under CC-BY 4.0) https://twemoji.twitter.com/

    View full-size slide

  38. Sync Business Manager
    changes to LINE DMP
    - Synchronize transactions between DB and Kafka
    - Users can change data permissions on Business Manager
    - Changes need to sync to LINE DMP at least once and in the correct order

    View full-size slide

  39. Three ideas
    “Twemoji” ©Twitter, Inc and other contributors (Licensed under CC-BY 4.0) https://twemoji.twitter.com/

    View full-size slide

  40. 1. API Callback
    API
    Kafka
    Permissions
    Consumer
    transaction
    1. insert/update/delete
    2. publish
    Business Manager
    3. check

    View full-size slide

  41. 1. API Callback
    Pros
    - Simple
    - Proven method in other teams
    Cons
    - API performance issue

    View full-size slide

  42. 1. API Callback
    Pros
    - Simple
    - Proven method in other teams
    Cons
    - API performance issue

    View full-size slide

  43. 2. CDC(Change Data Capture)
    Permissions
    MySQL
    insert/update/
    delete
    binlog Processor
    (with Debezium) Kafka
    publish

    View full-size slide

  44. 2. CDC(Change Data Capture)
    Pros
    - Real-time
    - Proven method in other teams
    Cons
    - Consumer design is difficult
    - Needed to build a dedicated infrastructure
    - API Callbacks are also needed

    View full-size slide

  45. 2. CDC(Change Data Capture)
    Pros
    - Real-time
    - Proven method in other teams
    Cons
    - Consumer design is difficult
    - Needed to build a dedicated infrastructure
    - API Callbacks are also needed

    View full-size slide

  46. 3. Polling publisher
    Permissions
    MySQL
    Event queue Batch Kafka
    transaction
    insert/update/
    delete
    insert publish
    polling

    View full-size slide

  47. 3. Polling publisher
    Pros
    - Simple
    - Ensure correct order
    Cons
    - Not in real-time
    - It does not scale if many changes occurred

    View full-size slide

  48. 3. Polling publisher
    Pros
    - Simple
    - Ensure correct order
    Cons
    - Not in real-time
    - It does not scale if many changes occurred

    View full-size slide

  49. Final architecture
    Permissions
    MySQL
    Event queue
    Batch 1
    (polling)
    Kafka
    transaction
    update
    Permissions
    (resolved)
    MySQL
    Batch 2
    (polling)

    View full-size slide

  50. Development by
    multiple teams

    View full-size slide

  51. REST APIs
    Management
    System
    Business Manager
    API API
    Kafka
    Batch
    Permissions
    Consumer
    LINE DMP
    API
    Other services
    LINE Ads
    LINE Official Account
    etc
    Audience data

    View full-size slide

  52. Management System API
    API
    Business Manager
    Management System
    Frontend
    (SPA)
    backend
    me
    frontend

    View full-size slide

  53. Internal API
    Business Manager
    Internal
    API
    API
    LINE DMP
    backend
    me
    API
    LINE Ads
    API
    LINE Official
    Account
    LINE DMP
    LINE Ads
    LINE Official
    Account

    View full-size slide

  54. Development teams
    Business Manager
    frontend
    LINE DMP
    backend
    LINE Ads
    LINE Official Account
    me

    View full-size slide

  55. Cost of maintaining
    API docs
    “Twemoji” ©Twitter, Inc and other contributors (Licensed under CC-BY 4.0) https://twemoji.twitter.com/

    View full-size slide

  56. Cost of maintaining API docs
    - Every time change code, modify API docs as well
    - Complicated specifications, tight schedule
    - API docs in internal-wiki

    View full-size slide

  57. springdoc-openapi
    “Twemoji” ©Twitter, Inc and other contributors (Licensed under CC-BY 4.0) https://twemoji.twitter.com/

    View full-size slide

  58. springdoc-openapi
    - Swagger UI, Kotlin support
    - Can customize programmatically
    - Helps automating the generation of API docs using Spring Boot projects
    https://github.com/springdoc/springdoc-openapi

    View full-size slide

  59. Controller(Spring Web MVC)

    View full-size slide

  60. Generate OpenAPI v3 YAML

    View full-size slide

  61. API doc review
    - Can review on GitHub Pull-Request
    - API docs are auto-generated by Jenkins
    - ReDoc
    (https://github.com/Redocly/redoc)

    View full-size slide

  62. Frontend integration
    > npx openapi-typescript api-spec.yml --version 3 --output generated.ts
    - Convert OpenAPI v3 YAML to TypeScript
    interface
    - openapi-typescript
    (https://github.com/drwpow/openapi-
    typescript)

    View full-size slide

  63. Customization

    View full-size slide

  64. Customization

    View full-size slide

  65. Customization

    View full-size slide

  66. Programming approach

    View full-size slide

  67. Many IDs
    “Twemoji” ©Twitter, Inc and other contributors (Licensed under CC-BY 4.0) https://twemoji.twitter.com/

    View full-size slide

  68. Many IDs
    - More account types will be added
    - More data types will be added
    - There are more than 20 types of IDs in Business Manager

    View full-size slide

  69. ID as a Value Object
    “Twemoji” ©Twitter, Inc and other contributors (Licensed under CC-BY 4.0) https://twemoji.twitter.com/

    View full-size slide

  70. Value Object
    DDD(Domain Drive Design)
    - Just a data class as a simple wrapper for primitive values
    - Value Equality, Immutability

    View full-size slide

  71. Use Value Object ID
    from Controller to DAO
    - Avoid mistakes

    View full-size slide

  72. Value Object with springdoc-openapi

    View full-size slide

  73. Kotlin
    “Twemoji” ©Twitter, Inc and other contributors (Licensed under CC-BY 4.0) https://twemoji.twitter.com/

    View full-size slide

  74. Sealed classes/interfaces, Enum + when

    View full-size slide

  75. Inline classes(not used yet)

    View full-size slide

  76. New team, Covid-19, etc.

    View full-size slide

  77. Mob programming
    - Pair programming with all team members
    - Screen sharing via Zoom
    - Working on the same git branch
    - Infrastructure task is also done by “mob”

    View full-size slide

  78. Always on Zoom
    - Always stay connected to Zoom
    - Turn off the mic and camera
    - Talk to team members at any time

    View full-size slide

  79. Daily huddle
    - A 15-30 minutes daily team meeting
    - Start at 11:00 a.m.
    - Discuss system design
    - Share even the most trivial things
    - Manage tasks

    View full-size slide

  80. Stream all changes to Slack
    - Trello, GitHub pull-request, CI Results,
    etc.
    - Releases are done by bot (ChatOps)

    View full-size slide

  81. Summary
    - There are many challenges in the development of Business Manager
    - We are hiring
    - Business Manager is a next-generation data utilization platform

    View full-size slide