그동안 Relay를 offline db sync 용도로 쓰고있었는데(첨부터 그러려고 했던건 아니고, API 두벌 만드는걸 피하다보니 그 역할도 떠맡음), 그래서 Relay가 킹론상 좋다는건 아는데 실질적으로 장점을 못누리고 살았었다. 근데 지금 추가하는 기능에서는 Relay를 본래 용도에 맞게 쓰고있는데, 설계 고민도 줄여주면서 코드가 쭉쭉 나온다.

5

If you have a fediverse account, you can quote this note from your own instance. Search https://hackers.pub/ap/notes/01968f86-5013-7a9a-b8d7-3a96e0981e40 on your instance and quote it. (Note that quoting is not supported in Mastodon.)

Relay로 offline db sync를 하고 있었을땐, Relay가 Node의 Id나 Edge의 Cursor가 Opaque란 가정을 하고있는게 걸림돌이라고 느껴졌다. SQLite에 저장하려면 어차피 id로 부터 composite key를 구해야하고, 거기엔 또 order도 존재하는데 Relay는 이런데 전혀 무관심하다. 하지만 일반적인 웹사이트 렌더링에는 저런 가정이 전혀 무리가 없다.

3