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

Headless CMS in LINE

Headless CMS in LINE

Kwangyong Park (LINE Plus / LandPress Dev 2 / Senior Server Engineer)

https://tech-verse.me/ja/sessions/31
https://tech-verse.me/en/sessions/31
https://tech-verse.me/ko/sessions/31

Tech-Verse2022

November 18, 2022
Tweet

More Decks by Tech-Verse2022

Other Decks in Technology

Transcript

  1. About me Server Engineer No-Code Paradigm Projects - GUI Mobile

    App Maker - Analyph 3D Auto Converter Player
  2. Database Design create table notice ( title varchar(100) not null,

    content text not null, author varchar(20) not null, created_at datetime not null, updated_at datetime not null ); What is Headless CMS
  3. const express = require("express"); const router = express.Router(); router.get("/notices", (req,

    res) => { connection.query("SELECT * FROM notice", function (err, rows, fields) { res.send(rows); }); }); module.exports = router; What is Headless CMS API Development
  4. Move model structures to database Headless CMS Database Article Model

    Tag Model .. Model Frontend Solution I - Stable
  5. Skip restart Developer Headless CMS Database Edit collection model Edit

    model data Update database structure Edit completed collection model Restart Solution I - Stable
  6. Skip restart Developer Headless CMS Database Edit collection model Edit

    model data Update database structure Edit completed collection model Solution I - Stable
  7. 0 100 200 300 400 0s 6s 18s 24s 30s

    36s 42s 48s 60s 55.5 53 57 55 60 47 42.5 39.5 32 309 299 288 303 299 301 313 235 180 Solution I V1 Transactions per second Solution I - Stable 400%
  8. Complex model structures Notice Release Headless CMS 2022. 10. 14.

    2022. 9. 28. 2022. 8. 22. Solution II - High performance
  9. Complex model structures Notice Release Headless CMS 2022. 10. 14.

    2022. 9. 28. 2022. 8. 22. Solution II - High performance
  10. Complex model structures Notice Release Headless CMS 2022. 10. 14.

    2022. 9. 28. 2022. 8. 22. Solution II - High performance
  11. Complex model structures Notice Release Headless CMS 2022. 10. 14.

    2022. 9. 28. 2022. 8. 22. Solution II - High performance
  12. Complex model structures Notice Release Headless CMS 2022. 10. 14.

    2022. 9. 28. 2022. 8. 22. Solution II - High performance
  13. Notice Title Content Author CreatedAt UpdatedAt Type VideoURL ImageURL Add

    Fields Complex model structures Solution II - High performance
  14. Notice Title Content Author CreatedAt UpdatedAt Type VideoURL ImageURL Type

    Content VideoURL ImageURL TEXT Release Headless CMS NULL NULL VIDEO NULL https://.. NULL IMAGE NULL NULL https://.. Complex model structures Solution II - High performance
  15. Notice Title Content Author CreatedAt UpdatedAt URL Video URL Image

    Content Text Complex model structures Solution II - High performance
  16. Notice Title Content Author CreatedAt UpdatedAt GET /notices “content”: {

    "_type": “image”, "imageURL": “https://.." } Complex model structures Solution II - High performance
  17. Too slow modeling time Solution II - High performance Notice

    Title Content Author Image Type Video Type Text Type KeyVisual Comment Message Author Session Track Title … Category Name … Member Reaction Component Collection
  18. Too slow modeling time Solution II - High performance Notice

    Title Content Author Image Type Video Type Text Type KeyVisual Comment Message Author Session Track Title … Category Name … Member Reaction Component Collection
  19. Too slow modeling time Solution II - High performance Notice

    Title Content Author Image Type Video Type Text Type KeyVisual Comment Message Author Session Track Title … Category Name … Member Reaction Component Collection
  20. Time Collection Relation Count 1 3 5 8 10 Before

    Processing time Solution II - High performance
  21. Frontend Headless CMS Database Get API /notices Response Select Database

    Get model structure Define Notice Model Flow of generating model structure using Database Solution II - High performance
  22. Headless CMS Database Get API /notices Response Select Database Define

    Notice Model Get model structure Frontend Flow of generating model structure using Database Solution II - High performance
  23. Headless CMS Database Response Select Database Define Notice Model Get

    model structure Frontend Get API /notices Flow of generating model structure using Database Solution II - High performance
  24. Headless CMS Database Response Select Database Get model structure Frontend

    Relation Models Define Notice Model Get API /notices Flow of generating model structure using Database Solution II - High performance Recursion
  25. Headless CMS Database Get model structure Response Select Database Define

    Notice Model Frontend Get API /notices Flow of generating model structure using Database Solution II - High performance
  26. Headless CMS Database Response Select Database Get model structure Frontend

    Define Notice Model Get API /notices Flow of generating model structure using Database Solution II - High performance
  27. Get API /notices Response Get model structure Frontend Headless CMS

    Model Cache Storage Database Select Database Define Notice Model Flow of generating model structure using Model Cache Storage Solution II - High performance
  28. Get API /notices Response Get model structure Headless CMS Model

    Cache Storage Database Select Database Frontend Define Notice Model Flow of generating model structure using Model Cache Storage Solution II - High performance
  29. Response Get model structure Headless CMS Model Cache Storage Database

    Select Database Frontend Define Notice Model Get API /notices Flow of generating model structure using Model Cache Storage Solution II - High performance
  30. Response Get model structure Headless CMS Model Cache Storage Database

    Select Database Frontend Define Notice Model Get API /notices Flow of generating model structure using Model Cache Storage Solution II - High performance
  31. Response Get model structure Headless CMS Model Cache Storage Database

    Select Database Frontend Define Notice Model Get API /notices Flow of generating model structure using Model Cache Storage Solution II - High performance
  32. Time Collection Relation Count 1 3 5 8 10 After

    Before Processing time Solution II - High performance
  33. Too slow reading time Notice Title Content Author Image Type

    Video Type Text Type KeyVisual Comment Message Author Session Track Title … Category Name … Member Solution II - High performance Clients Headless CMS GET /notices
  34. Too slow reading time Notice Title Content Author Comment Message

    Author Category Name … Member Image Type Video Type Text Type KeyVisual Solution II - High performance Reaction Notice Title Content Author Image Type Video Type Text Type KeyVisual Comment Message Author Category Name … Member Component Collection
  35. Improve data optimization title relation_data Home Renewal Open {“category”: [..],

    “comment”: [..], “member”: [..]} Solution II - High performance
  36. Too slow reading time Notice Title Content Author Comment Message

    Author Category Name … Member Image Type Video Type Text Type KeyVisual Solution II - High performance Reaction Notice Title Content Author Image Type Video Type Text Type KeyVisual Comment Message Author Category Name … Member Component Collection
  37. Improve data optimization title relation_data Home Renewal Open {“category”: [..],

    “comment”: [..], “member”: [..]} [{“content": “cool”}, {“content": “Awesome”}] [{“content": “cool”, “reaction”, “Very Good”}, {“content": “Awesome”, “reaction”, “Good”}] Solution II - High performance
  38. Improve architecture Solution III - Friendly Project Clone Webhook Item

    scheduling Audit Logging Item Normalization Item API …. Headless CMS
  39. Webhook Headless CMS Push Server Deploy Server … Server Clients

    Webhook PUT /notices Solution III - Friendly
  40. Improve architecture Solution III - Friendly Project Clone Webhook Item

    scheduling Audit Logging Item Normalization Change Data Capture Stream