전체 글
-
[Spring Boot] MVC 패턴 기초(추후 심화로 수정)Spring/Spring Boot 2024. 4. 4. 02:38
MVC 패턴이란? MVC (Model - View - Controller) 패턴은 소프트웨어 설계와 아키텍처를 위한 디자인 패턴중 하나이다. 주로 사용자 인터페이스(UI) 를 가진 응용프로그램에 사용되며 Model, View, Controller로 구성요소를 작업을 처리하는 개발 방법론이다. MVC 패턴 동작 원리 User: 사용자가 웹 사이트에 접속한다. Manipulates: Controller는 사용자가 요청한 웹 페이지를 보여주기 위해 Model을 호출한다. Updates: Model은 비즈니스 로직을 통해 DB 및 파일과 같은 데이터를 제어한 후 결과를 반환한다. 이후 Controller는 Model에게 반환받은 결과를 View에 반영한다. Sees: 데이터를 받아온 View가 사용자에게 웹 페..
-
[Spring Boot] 간편 프로젝트 생성Spring/Spring Boot 2024. 4. 4. 01:01
Spring Boot 웹 프로젝트 생성 start.spring.io 에서 생성 start.spring.io에 접속한다. Category 설정 Project : 사용할 Build Tool을 선택한다 build tool 비교 자료 https://jamcoding.tistory.com/8 Language : 사용할 프로그래밍 언어를 선택한다. Spring Boot : 사용할 Spring Boot의 버전을 선택한다. 개발 중인 버전(SNAPSHOT), 정식 릴리즈되지 않은 버전(M~)이 붙는다. Project Metadata : 프로젝트의 속성정보를 설정한다. Group : 프로젝트를 정의하고 구분하게 해주는 고유한 식별자 정보, (기업 도메인 주소의 역순으로 주로 사용) Artifact : 프로젝트의 이름 N..
-
Blocking/Non-Blocking , Sync/Asyn카테고리 없음 2024. 4. 1. 01:12
Blocking vs Non-Blocking Blocking : 요청한 작업이 끝날 때 까지 기다렸다가 작업이 끝나면 자신의 일을 시작하는것 1. B 함수를 호출하면서 제어권을 B함수에 넘긴다. 2. A 함수는 제어권이 없어 B 함수가 끝날 때까지 기다린다. 3. B 함수가 완료되면서 제어권을 A함수에게 돌려준다. 4. A 함수는 제어권을 얻어 다음 코드를 진행한다. Non-Blocking : 요청한 작업의 상관없이 진행하던 일을 계속 진행하는 것 1. B 함수를 호출하지만 제어권은 넘겨주지 않는다. 2. B 함수는 B대로 실행, A함수도 다음 코드를 실행한다. 즉, 제어권이란 작업의 흐름진행을 누가 제어하고 있는가를 의미하며, 제어권의 소유 여부가 Blocking과 Non-Blocking을 구분짓는 요..
-
[SSE] Server Sent EventsLanguage/Java 2024. 3. 31. 20:39
Sever Sent Events (SSE) 란? 클라이언트가 HTTP 연결을 통하여 서버로부터 데이터를 수신 할 수 있는 서버 푸쉬 기술이다. 일반적으로 클라이언트에 실시간으로 메시지 업데이트 또는 지속적인 데이터 스트림을 보내는 데 사용된다. 서버의 변경된 데이터를 가져오는 방법에는 다음과 같이 여러가지 방법이 있다. 1) 지속적으로 Request를 보내는 Ajax polling 2) websocket 3) server sent events 이 3가지의 방법과 어떤 방법이 달고 장단점을 가지고 있는지 살펴보자 Ajax Polling 그림과 같이 주기를 가지고 Ajax 요청을 보내 변화를 확인 하는 방법이다. 구현이 단순하나 요청간격이 길면 변화를 빠르게 캐치할 수 없고 요청간격이 짧으면 HTTP요청 발..
-
하드디스크 / cluster, blockComputer Science/File System 2023. 8. 28. 23:03
하드디스크 : 컴퓨터를 구성하는 보조기억장치 하드디스크 구성 - 스핀들 (Spindle) : Platter를 회전시키는 회전축 - 플래터 (Platter) : 데이터를 저장하는 자성재료로 코팅되어진 원판 - 액추에이터 (Actuator) : 수직으로 움직이며 Platter에 데이터를 입력하는 장치 Platter - 여러개 겹겹이 쌓여있는 구조 ( 2개이상의 원판으로 이루어짐 -> 용량 부족으로 인해) - Sector : 전체 디스크를 일정하게 나눈 구역 (물리적, 보통 512byte를 1 sector로 구분) - Track : 1 sector안에 데이터를 저장하기 힘들어 같은 반지름의 길이를 가진 Sector의 모임 Spindle이 회전하고 Actuator는 움직이지 않으므로 가장 빠르게 디스크에 데이터..
-
파일시스템Computer Science/File System 2023. 8. 13. 17:51
파일시스템 : 운영체제가 저장매체에 파일을 쓰기 위한 자료구조 또는 알고리즘 파일시스템을 사용하는 이유 ● 0과 1을 비트로 고나리하기에는 오버헤드(시간, 메모리, 자원)이 너무 큼 ● 블록 단위로 관리하기로함(4KB) ● 블록마다 고유번호를 부여해서 관리 -> 사용자가 블록 고유번호를 관리하기 어려움 ● 추상적(논리적)객체가 필요 -> 파일 ● 각 파일을 블록 단위로 관리하기 위함 파일 저장방법 -> 가능한 연속적인 공간에 파일을 저장하는 것이 좋음 But 외부단편화, 파일사이즈 변경 문제로 불연속 적인 공간에 파일 저장기능이 요구됨 -> 해결방안 제시 1) 블록체인 : 블록을 링크드리스트로 연결 (맨 처음 블록부터 주소를 따라가면 연결 ) 2) 인덱스 블록 기법 : 각 블록에 대한 위치정보를 기록해서..