전체 글
-
Servlet - request & responseSpring/MVC1-서블릿(Servlet) 2023. 6. 7. 07:39
● 서블릿 간단 개요 https://hongs429-blog.tistory.com/39 서블릿(Servlet) 우리가 흔히 알고 있듯이 HTML에서 Form 데이터의 전송이 서버로 일어나게 되면, 다음의 과정이 필요하다 1. Form 데이터 전송(POST) 2. 웹 브라우저가 생성한 요청 HTTP 메세지 이렇게 전달이 되면, 서 hongs429-blog.tistory.com Servlet이란 client와 서버와의 소통에서, 비지니스 로직에 대한 처리 코드를 제외한 모든 부분을 도와주는 것으로, Client으로 부터 들어온 요청에 대한 처리(HttpServletRequest 담당)와 이를 응답(HttpServletResponse 담당)을 개발자로 하여금 수많은 편의기능을 제공해주는 역할을 수행한다고 생각..
-
멀티 쓰레드Spring/MVC1-웹 어플리케이션 이해 2023. 6. 7. 00:06
쓰레드란, 프로세스(process) 내에서 실제로 작업을 수행하는 주체를 말한다. 이러한 쓰레드의 특징으로는, 코드를 순차적으로 실행한다 자바는 기본적으로 main(main 메소드) 이라는 이름의 쓰레드가 실행 코드를 한줄 한줄 읽어 나가기 때문에, 동시에 처리해야하는 상황이 생긴다면, 별도의 쓰레드를 추가로 생성해야함 위의 그림처럼, 하나의 쓰레드는 하나의 요청을 받아서 처리할 수 있다. 하지만, 1. 여러 요청이 들어오고, 2. 앞의 요청의 처리가 지연되고 있다면, 서버에서는 TIMEOUT이 발생하여 쓰레드가 다운되어 버린다. 위에서 다중 요청이 들어왔을 때, 2가지 방법이 존재한다. 방법1. 요청 마다 쓰레드 생성하기 장단점 장점 요청마다 쓰레드를 생성하기 때문에 동시요청 처리 가능! CPU, 메모..
-
서블릿(Servlet)Spring/MVC1-웹 어플리케이션 이해 2023. 6. 6. 23:39
우리가 흔히 알고 있듯이 HTML에서 Form 데이터의 전송이 서버로 일어나게 되면, 다음의 과정이 필요하다 1. Form 데이터 전송(POST) 2. 웹 브라우저가 생성한 요청 HTTP 메세지 이렇게 전달이 되면, 서버에서는 다양한 일들이 일어난다. 서버 연결 대기 및 소켓 연결 HTTP 요청 메세지에 대한 파싱 작업 메소드에 따른 HEADER 정보 파악 전달받은 Form 데이터 파싱 . . . HTTP 응답에 대한 메세지 생성 시작 TCP/IP에 응답 전달, 소켓 종료 이때, 서블릿을 지원하는 WAS에서는, 비지니스 로직을 실행하고, 데이터베이스에 POST(저장 일 경우) 요청에 대한 처리를 하는 것을 제외한 모든 일들을 Servlet이 담당해준다. 서블릿의 특징 특정 url 요청이 들어오면 해당 S..
-
웹서버 vs 웹 어플리케이션 서버Spring/MVC1-웹 어플리케이션 이해 2023. 6. 6. 22:48
모든 웹어플리케이션은 HTTP 프로토콜을 기반으로 이뤄진다. 이유는 , 대부부은의 형태의 데이터가 HTTP를 기반으로 전송이 가능하기 때문이다. 여기서 우리는 Wab Server 와 Web Application Server(WAS)를 구분할 필요가 있다. Web Server란 HTTP를 기반으로 동작하며, 보통 정적인 리소스를 제공하는 것을 말한다. 여기서 정적 리소스란, 이미 만들어진 HTML파일, CSS, JS, 영상, 이미지 등을 말한다. 이러한 리소스는 단순히 클라이언트의 요청이 들어왔을 때, 가지고 있는 데이터를 보내주기만 하면 끝인 경우이다. 정확하게 Web Server와 Web Application Server를 나누는 기준은 아니지만, 대개 이 둘을 나눌 때는 정적인 리소스를 내보내는 것이..
-
git - branch 생성 및 workflowgit 2023. 6. 5. 13:48
Branch 를 사용하는 이유 공동 작업을 위해서 프로잭트의 여러 기능 중 자신이 만든 기능을 확인하기 위해서 branch 만들기 명령어 : git branch [branch 이름] 이렇게 git branch를 만들면 나의 main에서 작업했던 내용까지 전부 가지고 오게 된다. 즉, 브랜치를 생성하면 생성 직 전의 master의 상태를 그대로 복사한다. 때문에 이전에 master에서 찍히던 log까지 다 반영이 되어 있다. branch들 확인하기 명령어 : git branch branch 이동하기 명령어 : git checkout [ branch 이름 ] branch에서 작업한 내용과 main의 상태를 같이 보고 싶다면? 명령어 : git log [option : --branches] 보기 좋게 log ..
-
배포하기웹개발/5주차 2023. 6. 5. 12:51
절차 aws 가입하기 권한을 나누기 위한 IAM(Identity and Access Management) 사용자 설정하기 배포과정 밟기 1. aws 가입하기 https://portal.aws.amazon.com/billing/signup#/start AWS Console - Signup portal.aws.amazon.com 가입단계에서 알아두어야할 사항! ◎ 해외결제가 가증한 카드를 준비(해당 과정에서는 무료서비스인 기본사양서버(EC2)를 사용할 것임..) 2. IAM 사용자 설정하기 해당 설정을 하는 이유는, 가입에 성공한 계정으로 작업을 한다는 것은 Root 계정을 사용하는 것 즉, AWS측에서 제공하는 모든 권한을 사용할 수 있는 상태이다. 그래서 우리가 AWS의 다양한 권한들을 Root 계정 안..
-
01 - git 명령어 모음(내컴퓨터 위에서 작동 시키기)git 2023. 6. 3. 19:01
내가 작업을 할 디렉토리를 알려주어야 한다. git 저장소 생성 명령어 : git init 결과> Initialized empty Git repository in [새로운 저장소 root]/.git/ 위의 작업을 하게 되면, 앞으로 버전을 관리하는 사람의 정보를 알아놔야 한다. user의 정보를 세팅하기 명령어 : git config --global user.name "[user이름 기]" git config --global user.email "[email 기입]" 최초 버전을 만들고 나면, 내가 작업한 내용들을 tracking 하기 시작하게 만들어야 한다. (버전을 관리하게 만든다는 것) "stage Area에 올라간다고 표현한다!~" 명령어 : git add [file1] [file2] ... ※ ..
-
MySQL - SELECT(4주차)DB 2023. 6. 2. 15:46
◎수업내용 Subquery with 절 SQL 문법 - 문자열 SQL 문법 - CASE Subquery 1. 특정값을 활용하기 2. 특정 범위를 활용하기 3. 새로운 테이블 처럼 활용하기 ◎ 특정값 활용하기 SELECT avg(likes) FROM checkins WHERE user_id = '4b8a10e6'; 이 값을 활용해서 sql 문을 활용해보자. SELECT checkin_id , user_id , likes, (SELECT avg(likes) FROM checkins WHERE user_id = '4b8a10e6') AS avg_likes_user FROM checkins; 지금처럼 특정값을 하나의 컬럼으로 활용해서 사용할 수도 있다. 다음은 WHERE 절에서의 특정값 활용을 해보자 SELEC..