๐Ÿ‘จ‍๐Ÿ’ป kimtongting
article thumbnail
[MSA] CQRS ์ด๋Ÿฐ๊ฑฐ์˜€์–ด?

QUOTE THE DAY “ ์—๋Ÿฌ ์—†๋Š” ํ”„๋กœ๊ทธ๋žจ์„ ๋งŒ๋“œ๋Š” ๋ฐ๋Š” ๋‘๊ฐ€์ง€ ๋ฐฉ๋ฒ•์ด ์žˆ๋‹ค. ๊ทธ๋Ÿฐ๋ฐ ์„ธ๋ฒˆ์งธ ๊ฒƒ๋งŒ ์ž‘๋™ํ•œ๋‹ค. ” - Alan J. Perlis (์•จ๋Ÿฐ J. ํŽ„๋ฆฌ์Šค) CQRS (Command Query Responsibility Segregation) * CQRS ๋ž€? ๐Ÿ“์ง์—ญํ•˜์ž๋ฉด ๋ช…๋ น๊ณผ ์ฟผ๋ฆฌ์˜ ์—ญํ• ์„ ๊ตฌ๋ถ„ํ•œ๋‹ค๋Š” ๊ฒƒ์ด๋‹ค. Create-Insert, Update, Delete ์™€ ๊ฐ™์ด ๋ฐ์ดํ„ฐ๋ฅผ ๋ณ€๊ฒฝํ•˜๋Š” ๊ฒƒ๊ณผ Select-Read ์™€ ๊ฐ™์ด ๋ฐ์ดํ„ฐ๋ฅผ ์กฐํšŒํ•˜๋Š” ๊ฒƒ ๋‘ ๊ฐ€์ง€์˜ ์ฑ…์ž„์„ ๋ถ„๋ฆฌํ•œ๋‹ค๋Š” ๊ฒƒ์ด๋‹ค. * ์™œ ์‚ฌ์šฉํ• ๊นŒ? ์šฐ๋ฆฌ๊ฐ€ ์‚ฌ์šฉํ•˜๋Š”(ํ˜น์€ ์‚ฌ์šฉํ–ˆ๋˜) ์ „ํ†ต์ ์ธ CRUD ์•„ํ‚คํ…์ณ ๊ธฐ๋ฐ˜์—์„œ ์‹œ์Šคํ…œ์„ ์œ ์ง€๋ณด์ˆ˜ํ•˜๋‹ค ๋ณด๋ฉด, ์ถ”๊ฐ€์ ์ธ ์š”๊ตฌ์‚ฌํ•ญ๊ณผ ์ •์ฑ…์˜ ๋ณ€ํ™”๋“ค๋กœ ์ž์—ฐ์Šค๋Ÿฝ๊ฒŒ ๋กœ์ง์ƒ์˜ Domain Model ๋ณต์žก๋„๊ฐ€ ์ฆ๊ฐ€ํ•˜๊ฒŒ..