0614 - 0620


# 0614 - 0620

# 0615 - ๋ฆฌ๋ˆ…์Šค ๋””๋ ‰ํ† ๋ฆฌ ๊ตฌ์กฐ

# ๋ฆฌ๋ˆ…์Šค ํŒŒ์ผ ์‹œ์Šคํ…œ ๊ตฌ์กฐ

๋ฆฌ๋ˆ…์Šค ์‹œ์Šคํ…œ์˜ ๋””๋ ‰ํ† ๋ฆฌ ๊ตฌ์กฐ๋Š” ์—ญ ํŠธ๋ฆฌ(tree) ๊ตฌ์กฐ
๋ฆฌ๋ˆ…์Šค ๋ฐฐํฌํŒ๋“ค์€ '๋ฆฌ๋ˆ…์Šค ํŒŒ์ผ ์‹œ์Šคํ…œ ๊ตฌ์กฐ'์ธ FSSTND๋ผ๋Š” ํ‘œ์ค€์„ ์ค€์ˆ˜

# /

์ตœ์ƒ์œ„ ๋””๋ ‰ํ† ๋ฆฌ ๋ฃจํŠธ

# /bin

๊ธฐ๋ณธ์ ์ธ ๋ช…๋ น์–ด๊ฐ€ ์ €์žฅ๋œ ๋””๋ ‰ํ† ๋ฆฌ, ๋ช…๋ น์–ด ๋””๋ ‰ํ† ๋ฆฌ

# /boot

๋ฆฌ๋ˆ…์Šค ๋ถ€ํŠธ๋กœ๋”๊ฐ€ ์กด์žฌํ•˜๋Š” ๋””๋ ‰ํ† ๋ฆฌ

# /dev

์‹œ์Šคํ…œ ๋””๋ฐ”์ด์Šค ํŒŒ์ผ์„ ์ €์žฅํ•˜๊ณ  ์žˆ๋Š” ๋””๋ ‰ํ† ๋ฆฌ

# etc

์‹œ์Šคํ…œ์˜ ๊ฑฐ์˜ ๋ชจ๋“  ์„ค์ •ํŒŒ์ผ์ด ์กด์žฌํ•˜๋Š” ๋””๋ ‰ํ† ๋ฆฌ

# /home

์‚ฌ์šฉ์ž์˜ ํ™ˆ๋””๋ ‰ํ† ๋ฆฌ

# lib

์ปค๋„๋ชจ๋“ˆํŒŒ์ผ๊ณผ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌํŒŒ์ผ ์ฆ‰, ์ปค๋„์ด ํ•„์š”๋กœํ•˜๋Š” ์ปค๋„๋ชจ๋“€ํŒŒ์ผ๋“ค๊ณผ ํ”„๋กœ๊ทธ๋žจ์— ํ•„์š”ํ•œ ๊ฐ์ข… ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ํŒŒ์ผ๋“ค์ด ์กด์žฌํ•˜๋Š” ๋””๋ ‰ํ† ๋ฆฌ

# /tmp

๊ณตํ†ต๋””๋ ‰ํ† ๋ฆฌ

# /usr

์‹œ์Šคํ…œ์ด ์•„๋‹Œ ์ผ๋ฐ˜์‚ฌ์šฉ์ž๋“ค์ด ์ฃผ๋กœ ์‚ฌ์šฉํ•˜๋Š” ๋””๋ ‰ํ† ๋ฆฌ

# /var

์‹œ์Šคํ…œ์šด์šฉ์ค‘์— ์ƒ์„ฑ๋˜์—ˆ๋‹ค๊ฐ€ ์‚ญ์ œ๋˜๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ์ผ์‹œ์ ์œผ๋กœ ์ €์žฅํ•˜๊ธฐ ์œ„ํ•œ ๋””๋ ‰ํ† ๋ฆฌ


# 0616 - Spring Webflux๋ž€?

Spring WebFlux๋Š” Spring 5์—์„œ ์ƒˆ๋กญ๊ฒŒ ์ถ”๊ฐ€๋œ ๋ชจ๋“ˆ. WebFlux๋Š” ํด๋ผ์ด์–ธํŠธ, ์„œ๋ฒ„์—์„œ reactive ์Šคํƒ€์ผ์˜ ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜ ๊ฐœ๋ฐœ์„ ๋„์™€์ฃผ๋Š” ๋ชจ๋“ˆ. WebFlux๋Š” reactive-stack web framework์ด๋ฉฐ non-blocking์— reactive stream์„ ์ง€์›.

  • reactive?
    : I/O ์ด๋ฒคํŠธ์— ๋ฐ˜์‘ํ•˜๋Š” ๋„คํŠธ์›Œํฌ ์ปดํฌ๋„ŒํŠธ, ๋งˆ์šฐ์Šค ์ด๋ฒคํŠธ์— ๋ฐ˜์‘ํ•˜๋Š” UI ์ปจํŠธ๋กค๋Ÿฌ ๋“ฑ๊ณผ ๊ฐ™์€ ๋ณ€ํ™”์— ๋Œ€ํ•œ ๋ฐ˜์‘์„ ์ค‘์‹ฌ์œผ๋กœ ๊ตฌ์ถ•๋œ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ๋ชจ๋ธ. non-blocking์€ blocking๊ณผ ๋‹ค๋ฅด๊ฒŒ ์ž‘์—…์ด ์™„๋ฃŒ๋˜๊ฑฐ๋‚˜ ๋ฐ์ดํ„ฐ๋ฅผ ์‚ฌ์šฉ๊ฐ€๋Šฅํ•œ ์ƒํƒœ๊ฐ€ ๋˜๋ฉด ์•Œ๋ฆผ์— ๋ฐ˜์‘ํ•˜๋Š” ๋ฐฉ์‹์ด ์žˆ์œผ๋ฏ€๋กœ reactiveํ•˜๋‹ค๊ณ  ๋ง ํ•  ์ˆ˜ ์žˆ๋‹ค.
  • reactive Streams๋Š” back pressure๊ฐ€ ์žˆ๋Š” ๋น„๋™๊ธฐ ์ปดํฌ๋„ŒํŠธ๊ฐ„์˜ ์ƒํ˜ธ ์ž‘์šฉ์„ ์ •์˜ํ•˜๋Š” ์†Œ๊ทœ๋ชจ ์‚ฌ์–‘
    • Subscriber๊ฐ€ Publisher์˜ ๋ฐ์ดํ„ฐ ์ƒ์„ฑ ์†๋„(๋น ๋ฅด๊ฒŒ/๋Š๋ฆฌ๊ฒŒ)๋ฅผ ์ œ์–ด ํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•˜๋Š”๊ฒƒ

=> Spring์ด ๊ฐ€์ง€์ง€ ๋ชปํ–ˆ๋˜ ๋น„๋™๊ธฐ ํ”„๋กœ๊ทธ๋ž˜๋ฐ์„ ๋ณด์™„ํ•˜๊ธฐ ์œ„ํ•œ Spring5์— webflux ๋ชจ๋“ˆ์„ ์‚ฌ์šฉ

# ์šฉ๋„

  • ๋น„๋™๊ธฐ-๋…ผ๋ธ”๋กํ‚น ๋ฆฌ์—‘ํ‹ฐ๋ธŒ ๊ฐœ๋ฐœ์— ์‚ฌ์šฉ
  • ํšจ์œจ์ ์œผ๋กœ ๋™์ž‘ํ•˜๋Š” ๊ณ ์„ฑ๋Šฅ ์›น ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜ ๊ฐœ๋ฐœ
  • ์„œ๋น„์Šค ๊ฐ„ ํ˜ธ์ถœ์ด ๋งŽ์€ ๋งˆ์ดํฌ๋กœ์„œ๋น„์Šค ์•„ํ‚คํ…์ฒ˜์— ์ ํ•ฉ

# ๋‘๊ฐ€์ง€ ๊ฐœ๋ฐœ๋ฐฉ์‹ ์ง€์›

  • ๊ธฐ์กด์˜ MVC ๋ฐฉ์‹
  • ์ƒˆ๋กœ์šด ํ•จ์ˆ˜ํ˜• ๋ชจ๋ธ (RouterFuction, HandlerFuction)

# ์ƒˆ๋กœ์šด ์š”์ฒญ - ์‘๋‹ต ๋ชจ๋ธ

  • ์„œ๋ธ”๋ฆฟ ์Šคํƒ๊ณผ API์—์„œ ํƒˆํ”ผ (์„œ๋ธ”๋ฆฟ API๋Š” ๋ฆฌ์—‘ํ‹ฐ๋ธŒ ํ•จ์ˆ˜ํ˜• ์Šคํƒ€์ผ์— ์ ํ•ฉํ•˜์ง€ ์•Š์Œ - HttpServletRequest, HttpServletResponse)
  • ServerRequest, ServerResponse

# ๋™์ž‘ํ๋ฆ„

  • MVC : request - Dispatcher Servlet - Handler Mapper - Controller - B/L - Controller - ViewResolver ...
  • WebFlux : request - HttpHandler - WebHandler - Handler Mapper / Handler Adapter - Controller - B/L -Controller - ViewResolver ...

# Mono / Flux

Reactive Streams ์ธํ„ฐํŽ˜์ด์Šค ์ค‘์—์„œ Publisher๋ฅผ ๊ตฌํ˜„ ํ•ด ๋†“์€ ๋ฐœํ–‰์ž.

  • Mono : 0 ~ 1๊ฐœ์˜ ๋ฐ์ดํ„ฐ ์ „๋‹ฌ
  • Flux : 0 ~ N ๊ฐœ์˜ ๋ฐ์ดํ„ฐ ์ „๋‹ฌ

# 0620 - ํด๋ผ์šฐ๋“œ ์„œ๋น„์Šค (IaaS, PaaS, SaaS)

# IaaS

  • ์„œ๋น„์Šค๋กœ์„œ์˜ ์ธํ”„๋ผ์ŠคํŠธ๋Ÿญ์ฒ˜(Infrastructure as a Service)๋Š” ์„œ๋ฒ„, ์Šคํ† ๋ฆฌ์ง€, ๋„คํŠธ์›Œํฌ๋ฅผ ํ•„์š”์— ๋”ฐ๋ผ ์ธํ”„๋ผ ์ž์›์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๊ฒŒ ํด๋ผ์šฐ๋“œ ์„œ๋น„์Šค๋ฅผ ์ œ๊ณตํ•˜๋Š” ํ˜•ํƒœ => ๊ฐ„๋žตํ•˜๊ฒŒ ์ปดํ“จํ„ฐ๋งŒ ํ• ๋‹น ๋ฐ›๋Š”๊ฒƒ
  • ๋Œ€ํ‘œ ์„œ๋น„์Šค
    • AWS EC2, Google Cloud Platform, Azure Virtual Machines, Naver Cloud Platform

# PaaS

  • PaaS(Platform as a Service)๋ผ๊ณ ๋„ํ•˜๋Š” ํด๋ผ์šฐ๋“œ ํ”Œ๋žซํผ ์„œ๋น„์Šค๋Š” ์ฃผ๋กœ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์— ์‚ฌ์šฉ๋˜๋Š” ๋™์•ˆ ํŠน์ • ์†Œํ”„ํŠธ์›จ์–ด์— ํด๋ผ์šฐ๋“œ ๊ตฌ์„ฑ์š”์†Œ๋ฅผ ์ œ๊ณต => ์„œ๋ฒ„, ํ™˜๊ฒฝ๊ตฌ์„ฑ ์ œ๊ณต ๊ฐœ๋ฐœ์ž๋Š” ์†Œ์Šค๋งŒ ์˜ฌ๋ฆฌ๋ฉด ๋œ๋‹ค.
  • ๋Œ€ํ‘œ ์„œ๋น„์Šค
    • AWS Elastic Beanstalk, Windows Azure, Heroku

# SaaS

  • ์„œ๋น„์Šค๋กœ์„œ์˜ ์†Œํ”„ํŠธ์›จ์–ด(Software as a Service)๋Š” ์†Œํ”„ํŠธ์›จ์–ด ๋ฐ ๊ด€๋ จ ๋ฐ์ดํ„ฐ๋Š” ์ค‘์•™์— ํ˜ธ์ŠคํŒ…๋˜๊ณ  ์‚ฌ์šฉ์ž๋Š” ์›น ๋ธŒ๋ผ์šฐ์ € ๋“ฑ์˜ ํด๋ผ์ด์–ธํŠธ๋ฅผ ํ†ตํ•ด ์ ‘์†ํ•˜๋Š” ํ˜•ํƒœ์˜ ์†Œํ”„ํŠธ์›จ์–ด ์ „๋‹ฌ ๋ชจ๋ธ์ด๋‹ค. ์ฃผ๋ฌธํ˜• ์†Œํ”„ํŠธ์›จ์–ด(on-demand software, ์˜จ๋””๋งจ๋“œ)๋ผ๊ณ ๋„ ํ•œ๋‹ค.
Last update: July 22, 2021 19:09
Contributors: jaesungahn91