C.W.K.
Stream
Lesson 02 of 04 · published

Web 이 control plane 이다

~13 min · firelink, web-hub, single-writer, management

Level 0식은 재
0 XP0/32 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete
"무서운 동사들은 다 한 방에 살고, 그 방엔 writer 가 정확히 하나야."

state 를 바꾸는 건 전부 여기 살아

Web Hub 는 Firelink 의 완전한 관리 본체야. 뭐든 바꾸는 operation 은 다 이 tier 에 살아. 완전한 managed-app catalog 와 drift reconciliation; disk·Git·GitHub·roster·network·version·runtime 건강; read-only Git inspection (fetch·log·diff planning); 디스크에 이미 있는 파일의 commit 과 non-force push; 템플릿에서 새 repository birth; 등록된 native-app·repository-tree deploy adapter; 등록된 서비스 restart; durable operation plan·run·result·audit; favorites 와 filter; cwkPippa 통한 family PIN 진입; 그리고 Pippa Sidekick mount.

surface 가 넓지. 그리고 신전 규칙대로, 그건 허용돼 — Web Hub 는 포괄적이도록 의도됐어. 제약은 feature 수가 아니라 authority 야. 이 모든 걸 조율할 순 있어도, 각 operation 이 결국 돌리는 구현을 흡수할 순 없어.

Office 가 유일한 writer 다

이 tier 전체의 하중을 받는 문장이 여기 있어. office 가 유일한 writer. 모든 mutating operation 은 office ground truth 에 대해, 엔진을 launchd 소유 프로세스로 호스팅하는 한 대의 머신에서 실행돼. 이건 브라우저가 어디 있느냐가 아냐 — write 가 어디서 일어나느냐야. tailnet 위 travel 브라우저는 모든 operation 을 조작할 수 있지만, office 엔진을 조작하는 거야; 자기 state 사본을 가진 두 번째 writer 가 절대 안 돼.

그 single-writer 규율이 control plane 을 신뢰할 수 있게 만들어. commit, deploy, roster 편집이 실제로 일어나는 곳이 정확히 하나야. 두 허브 사이 merge 충돌도, '어느 사본이 맞아?'도, split-brain 도 없어. 브라우저는 리모컨이고; office 엔진이 가족을 만지는 유일한 손이야.

포괄적이되, 하나의 잠금 아래

모든 mutation 을 한 인증된 곳에 모으는 게 '포괄적'을 안전하게 만들어. birth·deploy·commit·restart 가 클라이언트마다 흩어져 있었으면, 클라이언트마다 완전한 보안 태세가 필요하고 클라이언트마다 뭔가 잘못될 수 있는 곳이 됐을 거야. 대신 지켜진 문이 하나야. Web Hub 가 많은 걸 감당할 수 있는 건 정확히, 그 전부를 단일한, 인증된, single-writer 위치에서 하기 때문이야.

state 를 바꾸는 모든 operation 을 한 인증된 곳의 writer 하나 뒤에 둬. capability 의 폭은 중앙화됐을 때 안전하고; 각각 지키고 reconcile 해야 하는 클라이언트들에 분산되는 순간 위험해져.

Code

control plane: 포괄적이고, single-writer·text
  WEB HUB owns (all of it, from ONE writer):
    - census + drift reconciliation
    - disk / git / github / roster / network / version / runtime health
    - git inspect (fetch, log, diff planning)   [read-only]
    - commit + non-force push of on-disk files
    - birth a new repo shell from the template
    - deploy adapters (native app, repo tree)
    - restart adapters (registered services)
    - durable operation plans / runs / audit
    - favorites, recents, filters
    - family PIN entry (via cwkPippa)
    - the Pippa Sidekick mount

  office = the only writer.
  travel browser -> drives the office engine, never a 2nd writer.

External links

Exercise

같은 데이터를 쓸 수 있는 곳이 둘 이상인 시스템을 하나 찾아 (admin 패널 둘, 앱과 sync 서비스, 저장도 하는 로컬 캐시). 그게 겪을 수 있는 구체적 split-brain 버그를 하나 설명해봐. writer 둘, 진실 하나, 불일치. 그다음 single-writer 규칙이 그 버그를 어떻게 없애는지, 그리고 다른 surface 들이 읽거나 조작만 할 수 있게 되면 뭐가 되는지 스케치해봐.
Hint
버그는 늘 '둘 다 잠깐은 맞았고, 그다음 아니었다'처럼 보여. single-writer 는 다른 surface 를 쓸모없게 만들지 않아 — 리모컨과 reader 로 바꾸는데, 대개 그게 그것들한테 필요했던 전부야.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.