"매 module 매 흩어지는 functionality (logging, auth, tx) 의 횡단". AOP (Aspect-Oriented Programming, Kiczales 1997) 의 motivation. 2026 현재 NestJS interceptors, Spring AOP, OpenTelemetry auto-instrumentation, Sidecar (Istio) 매 modern realization.
매 핵심
매 정의
단일 module 의 boundary 를 넘어 매 application 매 widely-scattered concern.
Tangled with business logic → SoC (Separation of Concerns) 위반.
Solution: 매 aspect, decorator, middleware, sidecar, interceptor 로 추출.
매 typical concerns
Logging / tracing — 매 method entry/exit log.
Authentication / authorization — 매 endpoint 매 token check.
Transaction management — DB tx begin/commit/rollback.
Caching — function result memoization.
Validation — input schema check.
Rate limiting — request throttling.
Metrics / observability — counter, histogram.
Error handling — global exception mapper.
i18n — locale-aware response.
Audit — who/when/what.
매 응용
Web framework middleware (Express, NestJS).
Spring @Transactional / @Cacheable.
Service mesh (Istio) — mTLS, retry, circuit-break 매 sidecar.
OpenTelemetry auto-instrumentation 매 tracing 매 zero code change.