CodeSoom / codesoom.github.io

코드숨 기술블로그
MIT License
0 stars 7 forks source link

REST 아키텍처 스타일로 변경하라 #3

Closed hannut91 closed 1 year ago

hannut91 commented 1 year ago

REST는 REST 아키텍처 스타일입니다. 잘못 표기된 것을 수정합니다. 라스님이 코드숨 정보공유방 채널에 피드백 주신것을 참조했습니다.

라스: 여기에서 다음과 같은 표현이 있는데, 조금 잘못된 것 같아요.

Representational State Transfer(REST)는 API 작동 방식에 대한 조건을 부과하는 소프트웨어 아키텍처입니다. 로이 필딩의 원 논문의 제목은 Architectural Styles and the Design of Network-based Software Architectures입니다. 그리고 초록에서는 rest를 설명하면서 REST architecture style이라는 표현을 사용합니다.

I then introduce the Representational State Transfer (REST) architectural style and describe how REST 로이 필딩 논문 초록에서 발췌

여기에서 Architecture Style은 이렇게 정의하고 있습니다. 요약하자면 coordinated set of architectural constraints(제약의 집합)입니다.

An architectural style is a coordinated set of architectural constraints that restricts the roles/features of architectural elements and the allowed relationships among those elements within any architecture that conforms to that style. 로이 필딩 논문 1.5장에서 발췌

그렇다면 REST(REST architecture style)이 정말 architecture style인지 살펴보겠습니다. 로이 필딩은 REST를 소개하면서 다음과 같은 표현을 합니다.

This section provides a general overview of REST by walking through the process of deriving it as an architectural style. Later sections will describe in more detail the specific constraints that compose the REST style. 로이 필딩 논문 5장 REST중, 5-1 마지막 문장

논문에서는 REST style을 compose하는 specific constraints들에 대하여 소개하고 있습니다. 그 constraint들은 Client-Server, Stateless, Cache, Layered System등이 있습니다.

로이 필딩은 Architectire에 대하여도 논문에서 정의하고 있는데, 일단 여기에서는 생략할게용...

정리하자면 REST는 Architectire Style이며, Architecture가 아닙니다. 그러나 특정 서비스의 Architecture는 REST Architecture Style을 준수함으로서 여러가지 이점을 얻을 수 있습니다.