Atomic Delivery (아토믹 딜리버리)
트랜잭션이 완전히 실행되거나 전혀 실행되지 않는 'All-or-Nothing(전부 아니면 전무)' 실행 모델.
'아토믹'이라는 용어는 쪼갤 수 없다는 뜻의 고대 그리스어에서 유래했습니다. 원자성이 없다면 은행 시스템에서 A계좌의 돈은 빠져나갔으나 B계좌로 입금되지 않는 심각한 오류가 발생할 수 있습니다.
graph LR
Center["Atomic Delivery (아토믹 딜리버리)"]:::main
Pre_distributed_systems["distributed-systems"]:::pre --> Center
click Pre_distributed_systems "/terms/distributed-systems"
Pre_networking["networking"]:::pre --> Center
click Pre_networking "/terms/networking"
Pre_consensus_mechanism["consensus-mechanism"]:::pre --> Center
click Pre_consensus_mechanism "/terms/consensus-mechanism"
Rel_atomic_swap["atomic-swap"]:::related -.-> Center
click Rel_atomic_swap "/terms/atomic-swap"
classDef main fill:#7c3aed,stroke:#8b5cf6,stroke-width:2px,color:white,font-weight:bold,rx:5,ry:5;
classDef pre fill:#0f172a,stroke:#3b82f6,color:#94a3b8,rx:5,ry:5;
classDef child fill:#0f172a,stroke:#10b981,color:#94a3b8,rx:5,ry:5;
classDef related fill:#0f172a,stroke:#8b5cf6,stroke-dasharray: 5 5,color:#94a3b8,rx:5,ry:5;
linkStyle default stroke:#4b5563,stroke-width:2px;
🧒 5살도 이해할 수 있게 설명
가게에서 장난감을 사는 것과 같습니다. 장난감을 실제로 손에 쥐었을 때만 돈을 줍니다. 장난감이 없으면 돈을 주지 않습니다. 두 가지 일이 정확히 동시에 일어나거나 아예 일어나지 않는 것입니다.
🤓 Expert Deep Dive
데이터베이스에서 원자성은 보통 WAL(Write-Ahead Logging)을 통해 구현됩니다. 블록체인(예: EVM)에서는 원자성이 기본적으로 강제됩니다. 스마트 컨트랙트 실행 중 에러가 발생하면 모든 상태 변경이 무효화됩니다. 서로 다른 블록체인 간의 거래에서는 HTLC를 사용한 아토믹 스왑(Atomic Swap)을 통해 이를 구현합니다.
❓ 자주 묻는 질문
What does the 'A' in ACID stand for?
The 'A' in the ACID database model stands for Atomicity, which is the exact same concept as atomic delivery: transactions are indivisible and all-or-nothing.
What is an Atomic Swap in crypto?
An atomic swap allows two people to trade different cryptocurrencies (like Bitcoin for Ethereum) directly from their wallets without using a centralized exchange. It uses atomic delivery to ensure neither party can run away with the funds.
What happens if an atomic transaction fails halfway?
The system initiates a 'rollback'. It undoes any changes made during the partial execution, returning the system to the exact state it was in before the transaction started.