ํŠน์ • ๋ฐ์ดํ„ฐ๋ฅผ ์„œ๋ฒ„๋กœ๋ถ€ํ„ฐ ๋ฐ›๊ณ  ์‹ถ๋‹ค๊ณ  ํ•˜์ž. ์ผ๋ฐ˜์ ์ธ REST API๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค๋ฉด ์„œ๋ฒ„์— GET ์š”์ฒญ์„ ํ•˜๊ณ , ๊ทธ ๊ฒฐ๊ณผ๋กœ json ๋ฐ์ดํ„ฐ๋ฅผ ๋ฐ›์„ ๊ฒƒ์ด๋‹ค. ์ด๋ ‡๊ฒŒ ์ผ๋ฐ˜์ ์œผ๋กœ ๊ฐ€์žฅ ๋งŽ์ด ์‚ฌ์šฉํ•˜๋Š” Server ํ†ต์‹  ๋ฐฉ์‹์ด Request-Driven ๋ฐฉ์‹์ด๋ผ ์ƒ๊ฐํ•˜๋ฉด ๋œ๋‹ค. ๊ทธ๋Ÿฐ๋ฐ ์ด๋Ÿฐ Request-Driven ๋ฐฉ์‹๋„ ๋งž์ง€ ์•Š๋Š” ๊ธฐ์ˆ  ์„ ํƒ์ผ ์ˆ˜ ์žˆ๋‹ค.

๋งŒ์•ฝ ์š”์ฒญ์˜ ๊ฒฐ๊ณผ๊ฐ€ ์‹œ๊ฐ„์ด ํ•„์š”ํ•œ ์ž‘์—…์ด๋ผ๋ฉด, ๊ทธ ์ž‘์—…์ด ๋๋‚˜๋Š” ์‹œ๊ธฐ์— Client๋Š” Server์— ์ฃผ๊ธฐ์ ์œผ๋กœ ์งˆ์˜ํ•ด์•ผ ํ•œ๋‹ค. ์ด๋Š” Block-NonBlock ๋ฐฉ์‹์„ ์–˜๊ธฐํ•  ๋•Œ, ๋น„๋™๊ธฐ๋กœ ์ฒ˜๋ฆฌ๋˜๋‚˜ ์ž‘์—…์˜ ์™„๋ฃŒ์‹œ์ ์„ ์•Œ๊ธฐ ์œ„ํ•ด ์ž‘์—…์„ ์š”์ฒญํ•œ thread์—์„œ ์ž‘์—…์„ ํ•˜๊ณ  ์žˆ๋Š” thread์— ๊ณ„์†ํ•ด์„œ ์™„๋ฃŒ ์‹œ์ ์„ ์ ๊ฒ€ํ•˜๋Š” ๊ฒƒ๊ณผ ์œ ์‚ฌํ•˜๋‹ค.

์ง๊ด€์ ์œผ๋กœ ๋ณด์•˜์„ ๋•Œ, ์ด๋Ÿฌํ•œ ์ฒ˜๋ฆฌ๊ฐ€ ํ•„์š”ํ•œ task์—์„œ ์œ„์™€ ๊ฐ™์€ Request-Driven ๋ฐฉ์‹์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์€ ์ข‹์ง€ ์•Š๋‹ค.

Request-Driven ๋ฐฉ์‹์€ ํ•„์š”ํ•œ ์‹œ์ ์— ์ •๋ณด๋ฅผ ์š”์ฒญํ•˜๊ณ , ๊ทธ์— ๋งž๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ๋ฐ›์•„ ์ฒ˜๋ฆฌํ•˜๋Š” ๋ฐฉ์‹์ด๋‹ค. ์„œ๋ฒ„์—์„œ ๋ฐ์ดํ„ฐ๋ฅผ ์ด๋ฏธ ๊ฐ€์ง€๊ณ  ์žˆ์–ด ์ œ๊ณต๋งŒ ํ•˜๋ฉด ๋˜๋Š” ๊ฒฝ์šฐ ์ด ๋ฐฉ์‹์ด Resource๋ฅผ ์ ๊ฒŒ ๋จน๊ธฐ ๋•Œ๋ฌธ์— ์ข‹์€ ๋ฐฉ์‹์ด๋ผ ํ•  ์ˆ˜ ์žˆ๊ฒ ๋‹ค.

Reference