전체 글
-
잡다한 CS 지식 공부CS 2020. 12. 9. 00:06
웹의 동작과정은 어떻게 이루어 지는가 ? 웹 브라우저에 URL을 입력한다. 클라이언트는 서버 호스트 이름을 DNS 서버에 전송하여 해당 웹 서버의 IP주소 값을 얻는다. IP 주소와 Wel-Known 포트 80번을 사용해 웹 서버와 TCP 연결을 시도한다. (이때 3-hand shake way) 방식으로 연결 TCP 연결이 설정되고 클라이언트가 서버에 GET 명령을 전송하면 서버는 요청 받은 웹 문서를 클라이언트의 웹 브라우저의 회신 서버와 클라이언트 둘 사이의 연결을 해제 한다 (4-hand shake way) 웹 브라우저는 해당 파일의 내용을 사용자가 볼 수 있게끔 화면에 표시한다. 데이터 처리 방식의 변화 구분 과거 현재 저장 관계형 데이터베이스, 데이터 웨어하우스 비관계형 데이터베이스, 가상화, ..
-
스프링과 스프링 부트의 차이개발 2020. 12. 8. 12:04
스프링 이란? 자바 생태계에서 가장 대중적인 응용프로그램 개발 프레임 워크이다. 의존성 주입(DI), 제어의 역전(IOC)은 스프링의 가장 중요한 특징으로 결합도를 낮추는 방식으로 애플리케이션을 개발할 수 있으며, 단위테스트가 용이하기 때문에 퀄리티 높은 프로그램을 개발할 수 있다. @Component : 스프링의 BeanFactory라는 팩토리 패턴의 구현체에서 bean이라는 스프링프레임워크가 관리하는 객체가 있는데 해당 클래스를 그러한 bean 객체로 두어 스프링 관리하에 두겠다는 어노테이션. @Autowired : 스프링 프레임워크에서 관리하는 Bean 객체와 같은 타입의 객체를 찾아서 자동으로 주입해주는 것. 해당 객체를 Bean으로 등록하지 않으면 주입해줄 수 없다. 관점 지향 프로그래밍 (AO..
-
알고리즘 복습..Algorithm 2020. 12. 5. 19:43
그래프 알고리즘 노드와 간선으로 이루어져 있음, 간선은 노드와 노드의 연결을 의미. 그래프 방향성 및 무방향성 순환 및 비순환 루트 노드 존재 X 부모와 자식 관계 X 네트워크 모델 트리 방향 그래프 비순환 그래프 루트 노드 존재 부모와 자식 관계 계층 모델 보통 구현은 인접 행렬이나 인접 리스트를 사용하여 구현한다. 각 차이는 메모리와 속도 측면에서 구별해서 사용한다. 서로소 집합 알고리즘 (Disjoint SET) - Union&Find 공통 원소가 없는 두 집합을 의미. 서로소 집합정보가 주어 졌을 시 트리 자료구조를 이용해 집합을 표현하는 서로소 집합 계산 알고리즘 Union (합집합) 연산을 확인하여, 서로 연결된 두 노드를 확인한다. 각 노드의 루트노드를 찾고 보통 앞의 값을 부모노드로 설정한..
-
MSA?개발 2020. 12. 4. 23:35
MSA를 알기전에 기존의 체계에 대해 먼저 알아 보자. Monolithic Architecture? 소프트웨어의 모든 구성요소가 한 프로젝트에 통합되어 있는 형태이다. 웹 개발을 예로 들면 웹 프로그램을 개발하기 위해 모듈별로 개발을 하고, 개발이 완료된 웹 어플리케이션을 하나의 결과물로 패키징하여 배포되는 형태를 말한다.(SSAFY에서 진행한 프로젝트 들?) 이런 어플리케이션을 모놀리식 어플리케이션이라 하며, 웹의 경우 WAR파일로 빌드되어 WAS에 배포하는 형태를 말한다. 주로 소규모 프로젝트에서 사용된다. 하지만 일정 규모 이상의 서비스, 혹은 수백명 이상의 개발자가 투입되는 프로젝트에서 Monolithic Architecture는 한계를 보인다. MSA ? Micro Service Arcitect..
-
Rest API ?개발 2020. 12. 3. 21:49
API ? Application Programming Interface의 약자. 응용 프로그램에서 사용할 수 있도록 운영체제나 프로그래밍 언어가 제공하는 기능을 제어할 수 있게 만든 인터페이스를 뜻한다. REST? Represetational State Transfer의 약자. 인터넷 상 서로 다른 시스템 간의 상호 운용성을 제공하는 방법중 한가지로 시스템 각각의 독립적인 진화를 보장하기 위한 방법. HTTP 통신에서 URI를 통해 자원을 명시하고 HTTP METHOD(GET, POST, DELETE, PUT)을 사용해 해당 자원에 대한 Method Operation을 적용하는 것을 의미한다. 웹상에서 사용되는 여러 리소스를 HTTP URI로 표현하고, 그 리소스에 대한 행위를 HTTP Method로 정..
-
Thread (쓰레드)CS 2020. 12. 1. 15:48
Thread ? 하나의 프로세스 내부에서 독립적으로 실행되는 하나의 작업 단위를 말하며, 세부적으로는 운영체제에 의해 관리되는 하나의 작업 혹은 태스크를 의미한다. JVM에 의해 하나의 프로세스가 발생하며, Java의 Main Method 역시 하나의 흐름으로 메인 쓰레드에 해당한다. 쓰레드를 이용하면 하나의 프로세스에서도 병렬적(동시적)으로 처리가 가능하다. 여러 개의 처리 루틴을 가질 수 있다. 단순하게 반복되는 코드를 실행할 때도 여러 개의 쓰레드를 만들어서 분리 시킨 뒤 결과 데이터를 받아 합치면 그만큼 시간을 절약할 수 있다. 특히 짧은 시간 내에 많은 사용자의 트래픽을 처리해야 하는 대용량 시스템이나 CPU 활용을 극대화 시켜 처리해야 하는 복잡한 연산에서 많이 사용한다. 다중 쓰레드 작업 시..
-
이것저것 공부한거 (Proxy, Transaction)개발 2020. 11. 30. 16:16
Proxy? 대리, 혹은 중계의 의미를 가지는 Agent로 봐도 무방, Proxy Server는 Client의 요청을 받아 중계하는 서버를 뜻한다. Client Server Proxy Server Web Server client가 요청을 보내면 proxy server에서 web server에 접근하여 요청을 보내고 응답을 처리한다. 이후 proxy server가 응답을 client에 전달한다. Proxy Server 특징 익명성으로 보안의 목적으로 사용할 수 있다. 캐시를 사용하여 속도를 개선할 수 있다. 차단되있는 사이트들을 우회적으로 접속할 수 있다. 원치 않는 사이트를 차단할 수 있다. Proxy Server 종류 Forward Proxy Server 일반적인 프록시 서버, Client와 Web S..
-
Spring AOP개발 2020. 11. 30. 15:03
Aspect-Oriented Programming (AOP)는 OOP를 보완하는 수단, 흩어진 Aspect를 모듈화 할 수 있는 프로그래밍 기법. 흩어진 관심사 (Crosscutting Concerns) Concern = 여러 클래스에서 비슷하게 나타나는 코드들을 뜻한다. ex) 트랜잭션. 여러 클래스에서 비슷하게 나타나는 코드나 메소드를 Aspect로 모듈화 시켜 중복을 제거한다. AOP를 적용하면 다음과 같은 모습이다. Aspect는 하나의 모듈, 모듈화 시킨 거임 모듈안에 Adivce(해야할 일들), Pointcut(어디에 적용 되어야 할지 정보), target(적용이 되는 대상) 값이 저장되어 있다. Join Point (메서드 호출, 메서드 실행 시점에 Advice를 끼어들게 할 수 있는 지점에..