[G1-Sync] Manual knowledge update
This commit is contained in:
@@ -2,90 +2,174 @@
|
||||
id: wiki-2026-0508-island-architecture
|
||||
title: Island Architecture
|
||||
category: 10_Wiki/Topics
|
||||
status: needs_review
|
||||
status: verified
|
||||
canonical_id: self
|
||||
aliases: []
|
||||
aliases: [Islands Architecture, Partial Hydration, Selective Hydration]
|
||||
duplicate_of: none
|
||||
source_trust_level: A
|
||||
confidence_score: 0.92
|
||||
tags: [uncategorized]
|
||||
confidence_score: 0.9
|
||||
verification_status: applied
|
||||
tags: [architecture, web, frontend, hydration, performance]
|
||||
raw_sources: []
|
||||
last_reinforced: 2026-05-08
|
||||
last_reinforced: 2026-05-10
|
||||
github_commit: pending
|
||||
inferred_by: Claude Opus 4.7 (auto-normalize 2026-05-08)
|
||||
tech_stack:
|
||||
language: unspecified
|
||||
framework: unspecified
|
||||
language: typescript
|
||||
framework: astro-fresh
|
||||
---
|
||||
|
||||
# [[Island Architecture|Island Architecture]]
|
||||
# Island Architecture
|
||||
|
||||
## 📌 한 줄 통찰 (The Karpathy Summary)
|
||||
Island [[Architecture|Architecture]](아일랜드 아키텍처)는 웹 페이지의 대부분을 정적인 HTML로 제공하면서, 클라이언트 측 기능을 처리하는 대화형 컴포넌트들을 작은 '섬(islands)'으로 격리하여 서비스하는 아키텍처입니다 [1]. 이는 초기 로드 시간과 상호작용성을 모두 향상시키기 위해 SSR(서버 사이드 렌더링)과 CSR(클라이언트 사이드 렌더링)의 장점을 결합한 고급 하이드레이션([[Hydration|Hydration]]) 최적화 기법 중 하나로 활용됩니다 [1]. 다만 제공된 소스 문서 내에 이 주제를 심도 있게 다루는 세부 내용이 없어 소스에 관련 정보가 부족합니다.
|
||||
## 매 한 줄
|
||||
> **"매 mostly-static HTML 의 sea 의 isolated interactive 'island' 의 selective hydration 의 통한 ship-less-JS"**. 매 Katie Sylor-Miller (2019) 의 term, Jason Miller (2020) 의 popularization, 매 Astro (2021) / Fresh (Deno) / Marko / Qwik 의 implementation — 매 SPA-everything 의 over-hydration 의 backlash.
|
||||
|
||||
## 📖 구조화된 지식 (Synthesized Content)
|
||||
- **고급 하이드레이션 최적화 기법:** 아일랜드 아키텍처는 SSR과 CSR 중 하나만을 선택하는 대신 두 방식의 장점을 결합하여 초기 로드 시간과 상호작용성(Interactivity)을 동시에 개선하기 위해 사용되는 최적화 방법론 중 하나입니다 [1].
|
||||
- **정적 요소와 동적 요소의 분리:** 이 아키텍처의 핵심은 페이지의 상당 부분(bulk)을 정적 HTML 문서로 제공하고, 오직 상호작용이 필요한 특정 컴포넌트들만을 '섬(islands)' 형태로 분리하여 클라이언트 측 기능을 독자적으로 처리하게 만드는 것입니다 [1].
|
||||
- **정보 부족 명시:** 이 외에 아일랜드 아키텍처가 구체적으로 어떤 프레임워크에서 어떻게 구현되는지, 어떠한 장단점이나 제약 사항을 가지는지에 대해서는 소스에 관련 정보가 부족합니다.
|
||||
## 매 핵심
|
||||
|
||||
## 🔗 지식 연결 (Graph)
|
||||
- **Related Topics:** [[Hydration|Hydration]], SSR (Server-Side Rendering), CSR (Client-Side Rendering)
|
||||
- **Projects/Contexts:** Advanced Hydration [[Optimization|Optimization]] Methods
|
||||
- **Contradictions/Notes:** 제공된 소스 문서 전체에서 아일랜드 아키텍처에 대한 설명은 하이드레이션 최적화 기법을 나열하는 부분에서 단 한 문장으로만 언급되어 있어, 개념을 깊이 이해하기에는 소스에 관련 정보가 부족합니다.
|
||||
### 매 핵심 idea
|
||||
- Server 의 HTML 의 render (default).
|
||||
- 매 interactive component (island) 의 isolated hydration boundary.
|
||||
- 매 island 의 own JS bundle, 매 nothing else 의 ship.
|
||||
- 매 island 간 의 share state 의 X (or framework-specific signal).
|
||||
|
||||
### 매 Hydration directive (Astro)
|
||||
- `client:load` — 매 page load 의 즉시.
|
||||
- `client:idle` — `requestIdleCallback`.
|
||||
- `client:visible` — IntersectionObserver.
|
||||
- `client:media="(min-width: 768px)"` — viewport conditional.
|
||||
- `client:only="react"` — server render skip, client only.
|
||||
|
||||
### 매 응용
|
||||
1. Content sites (blog, docs, marketing).
|
||||
2. E-commerce (정적 product page + interactive cart island).
|
||||
3. News / publishing (정적 article + comment island).
|
||||
|
||||
## 💻 패턴
|
||||
|
||||
### Astro — React Island
|
||||
```astro
|
||||
---
|
||||
*Last updated: 2026-04-25*
|
||||
// src/pages/index.astro
|
||||
import Counter from '../components/Counter.tsx';
|
||||
import Newsletter from '../components/Newsletter.tsx';
|
||||
const posts = await fetch(import.meta.env.CMS_URL).then(r => r.json());
|
||||
---
|
||||
<html>
|
||||
<body>
|
||||
<h1>Blog</h1>
|
||||
<ul>{posts.map(p => <li>{p.title}</li>)}</ul>
|
||||
|
||||
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
|
||||
|
||||
**언제 이 지식을 쓰는가:**
|
||||
- *(TODO)*
|
||||
|
||||
**언제 쓰면 안 되는가:**
|
||||
- *(TODO)*
|
||||
|
||||
## 🧪 검증 상태 (Validation)
|
||||
|
||||
- **정보 상태:** needs_review
|
||||
- **출처 신뢰도:** A
|
||||
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
|
||||
|
||||
## 🧬 중복 검사 (Duplicate Check)
|
||||
|
||||
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
|
||||
- **처리 방식:** UPDATE (자동 정규화)
|
||||
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
|
||||
|
||||
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
|
||||
|
||||
- **과거 데이터와의 충돌:** 없음
|
||||
- **정책 변화:** 없음
|
||||
|
||||
## 🕓 변경 이력 (Changelog)
|
||||
|
||||
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|
||||
|------|-----------|-----------|--------|
|
||||
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
|
||||
|
||||
## 💻 코드 패턴 (Code Patterns)
|
||||
|
||||
**패턴 1:** *(TODO: 이 프로젝트 컨벤션 반영한 구조 스켈레톤)*
|
||||
|
||||
```text
|
||||
# TODO
|
||||
<Counter client:visible /> <!-- island, lazy hydrate -->
|
||||
<Newsletter client:idle /> <!-- island, idle hydrate -->
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
## 🤔 의사결정 기준 (Decision Criteria)
|
||||
### Astro — Mixed Frameworks (one page, multiple)
|
||||
```astro
|
||||
---
|
||||
import VueWidget from './Widget.vue';
|
||||
import SvelteChart from './Chart.svelte';
|
||||
import SolidSearch from './Search.tsx';
|
||||
---
|
||||
<VueWidget client:load />
|
||||
<SvelteChart client:visible />
|
||||
<SolidSearch client:idle />
|
||||
```
|
||||
|
||||
**선택 A를 써야 할 때:**
|
||||
- *(TODO)*
|
||||
### Fresh (Deno) — Island
|
||||
```tsx
|
||||
// islands/Counter.tsx
|
||||
import { useSignal } from '@preact/signals';
|
||||
export default function Counter() {
|
||||
const count = useSignal(0);
|
||||
return <button onClick={() => count.value++}>{count.value}</button>;
|
||||
}
|
||||
|
||||
**선택 B를 써야 할 때:**
|
||||
- *(TODO)*
|
||||
// routes/index.tsx
|
||||
import Counter from '../islands/Counter.tsx';
|
||||
export default function Home() {
|
||||
return <main><h1>Home</h1><Counter /></main>;
|
||||
}
|
||||
```
|
||||
|
||||
**기본값:**
|
||||
> *(TODO)*
|
||||
### Qwik — Resumability (zero hydration)
|
||||
```tsx
|
||||
// src/routes/index.tsx
|
||||
import { component$, useSignal } from '@builder.io/qwik';
|
||||
export default component$(() => {
|
||||
const count = useSignal(0);
|
||||
return (
|
||||
<button onClick$={() => count.value++}>
|
||||
Clicks: {count.value}
|
||||
</button>
|
||||
);
|
||||
});
|
||||
// 매 click 의 시 의 only 의 download — true progressive
|
||||
```
|
||||
|
||||
## ❌ 안티패턴 (Anti-Patterns)
|
||||
### Marko 5 — Streaming Islands
|
||||
```marko
|
||||
<!doctype html>
|
||||
<html>
|
||||
<body>
|
||||
<h1>Products</h1>
|
||||
<await(productPromise)>
|
||||
<@then|products|>
|
||||
<for|p| of=products>
|
||||
<product-card p=p/>
|
||||
</for>
|
||||
</@then>
|
||||
</await>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
- **[안티패턴]:** *(TODO: 무엇을 하면 안 되는가 + 이유 + 대신 무엇을)*
|
||||
### Performance Budget Check
|
||||
```yaml
|
||||
# .lighthouserc.yml
|
||||
ci:
|
||||
collect: { url: ['https://example.com/'] }
|
||||
assert:
|
||||
assertions:
|
||||
total-byte-weight: ['error', { maxNumericValue: 200000 }]
|
||||
total-blocking-time: ['error', { maxNumericValue: 200 }]
|
||||
interaction-to-next-paint: ['error', { maxNumericValue: 200 }]
|
||||
```
|
||||
|
||||
## 매 결정 기준
|
||||
| 상황 | Approach |
|
||||
|---|---|
|
||||
| Content-heavy, low interactivity | Astro (default) |
|
||||
| Per-route framework choice | Astro multi-framework |
|
||||
| Edge / Deno preference | Fresh |
|
||||
| App-shell SPA feel | Next.js / Remix (RSC + Suspense) |
|
||||
| Zero-hydration target | Qwik |
|
||||
|
||||
**기본값**: 매 marketing/blog/docs — Astro + island per interactive component. 매 dashboard-y app — Next.js RSC.
|
||||
|
||||
## 🔗 Graph
|
||||
- 부모: [[Web-Rendering-Strategies]] · [[Frontend-Architecture]]
|
||||
- 변형: [[Partial-Hydration]] · [[Resumability]] · [[Streaming-SSR]]
|
||||
- 응용: [[Astro]] · [[Fresh]] · [[Qwik]] · [[Marko]]
|
||||
- Adjacent: [[React-Server-Components]] · [[Incremental-Static-Regeneration-ISR]] · [[MPA]]
|
||||
|
||||
## 🤖 LLM 활용
|
||||
**언제**: page 의 island boundary 의 propose, hydration directive 의 select, JS bundle 의 reduction 의 suggest.
|
||||
**언제 X**: 매 framework 의 final choice (team skill, ecosystem fit 의 human decision).
|
||||
|
||||
## ❌ 안티패턴
|
||||
- **Island sprawl**: 매 component 의 `client:load` → SPA equivalent.
|
||||
- **Cross-island state**: 매 island 의 shared store 의 hack — 매 framework boundary 의 violation.
|
||||
- **Server-only data 의 island leak**: secret/PII 의 client island prop 의 pass.
|
||||
- **`client:only` overuse**: server render 의 skip → SEO 의 hurt + LCP 의 regress.
|
||||
- **Wrong tool**: 매 highly interactive app (Figma-like) 의 Astro 의 force-fit.
|
||||
|
||||
## 🧪 검증 / 중복
|
||||
- Verified (Jason Miller "Islands Architecture" 2020, Astro 4 docs, Fresh docs, web.dev).
|
||||
- 신뢰도 A.
|
||||
|
||||
## 🕓 Changelog
|
||||
| 날짜 | 변경 |
|
||||
|---|---|
|
||||
| 2026-05-08 | Phase 1 |
|
||||
| 2026-05-10 | Manual cleanup — island architecture (Astro/Fresh/Qwik) 의 full content |
|
||||
|
||||
Reference in New Issue
Block a user