tag:blogger.com,1999:blog-13951616568374048432024-03-13T20:02:03.385-07:00Blessldk :: 하쿠나마타타은근 은근 잘되리라...Anonymoushttp://www.blogger.com/profile/06127521281557446949noreply@blogger.comBlogger83125tag:blogger.com,1999:blog-1395161656837404843.post-78311512824360311852016-07-24T04:36:00.003-07:002016-09-17T08:07:21.187-07:00[node.js] Express.js 란?Express.js는 Node.js 핵심 모듈인 http 와 connect 컴포넌트를 기반으로 하는 웹 프레임워크다.<br />
<br />
node js 를 이용하여 애플리케이션을 개발할 경우 다음과 같은 유사한 작업들을 동일한 코드를<br />
반복해서 작성할 가능성이 크다.<br />
1. HTTP 요청 바디 파싱<br />
2. 쿠키 파싱<br />
3. 세션 관리<br />
4. URL 경로와 HTTP요청 메소드를 기반으로 한 복잡한 if조건문을 이요한 라우트 구성<br />
5. 데이터 타입을 기반으로 적절한 응답 헤더 결정<br />
<br />
Express.js는 위 사항들 뿐만아니라, 추상화 및 코드 구성과 같은<br />
<br />
별도의 문제들까지 해결한다. 프레임워크는 MVC 와 같은 구조를 제공한다.<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/06127521281557446949noreply@blogger.com0tag:blogger.com,1999:blog-1395161656837404843.post-77616051925772764982016-06-22T12:14:00.003-07:002016-06-22T12:14:43.195-07:00tar.gz 압축/해제 명령어 서버 log 백업시에 많이 사용한다.<div>
<br /></div>
<div>
많이 쓰는 만큼 이참에 정리해 두자.</div>
<div>
<br /></div>
<div>
리눅스에서 대표적으로 사용하는 것으로 tar / tar.gz 이 있다.</div>
<div>
<br /></div>
<div>
보통 gzip 으로 많이 묵는다.</div>
<div>
<br /></div>
<div>
<b>tar.gz 압축 명령어</b></div>
<div>
<b><br /></b></div>
<div>
<b>tar -czvf 압축파일명.tar.gz 압축할 폴더/파일</b></div>
<div>
<b><br /></b></div>
<div>
<b>ex) #tar -czvf log.tar.gz /service/log/*</b></div>
<div>
<b><br /></b></div>
<div>
<b>tar.gz 압축 풀기 명령어</b></div>
<div>
<b><br /></b></div>
<div>
<b>tar -xzvf 압축파일명.tar.gz</b></div>
<div>
<b><br /></b></div>
<div>
<b>ex) #tar -xzvf log.tar.gz</b></div>
<div>
<br /></div>
<div>
위에서 사용하는 옵션에 대해서 간략하게 설명한다.</div>
<div>
<br /></div>
<div>
<b>-v : 압축 또는 해제 시에 과정을 출력 (정확히 확인하기 위해 찍는게 좋음)</b></div>
<div>
<b>-f : 파일 이름을 지정</b></div>
<div>
<b>-c : 파일을 tar로 묶음</b></div>
<div>
<b>-z : gzip 으로 압축하거나 해제함.</b></div>
<div>
<b>-x : tar 압축을 품</b></div>
<div>
<br /></div>
<div>
이정도만 알고 있으면 리눅스에서 tar.gz 으로 묶거나 푸는데는</div>
<div>
<br /></div>
<div>
문제 없을 듯 하다. </div>
Anonymoushttp://www.blogger.com/profile/06127521281557446949noreply@blogger.com0tag:blogger.com,1999:blog-1395161656837404843.post-63589744628842814982016-06-22T11:50:00.001-07:002016-06-22T11:50:54.973-07:00[Git Flow] egit + git bash를 이용한 Eclipse 에서 관리 방법<br />
Git에서 효율적으로 branch 관리를 하기 위해서 Git flow를 활용한다.<br />
<br />
개발 툴로 Eclipse를 쓰고 있고 빌드는 Gradle로 하고 있으므로<br />
<br />
이에 맞춰서 활용할 수 있는 방법을 설명한다.<br />
<br />
먼저 그전에 Git Flow 에 대해서 설명한다.<br />
<br />
1. Git Flow<br />
Git Flow는 프로젝트 개발 시 사용하는 branch 모델 방법이다.<br />
이 모델은 총 5가지의 Branch 전략을 제공한다.<br />
<br />
<ul>
<li> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;">feature – develop – release – hotfixes – master 로 되어 있으며 각각은 역할이 있다.</span></li>
</ul>
<br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> 1) master : master 브런치는 최종 점검을 마치고 릴리즈한 안정화된 브런치다.</span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> 2) develop : 개발 중인 사항의 최종 통합 브런치다. </span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> 3) release : 제품 배포를 준비하는 브런치다. </span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> 4) feature : 조만간 제품을 배포하거나 또는 다음에 배포를 위한 기능 개발을 위한 브런치다.</span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> 5) hotfixes : 버그를 잡기 위한 긴급 수정을 위한 브런치다.</span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;">2. Git Flow 사용법</span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> Git이 설치되어 있고 Eclipse 와 Egit Plugin이 설치되어 있다는 가정하에 진행한다.</span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> 또한 현재 프로젝트는 Git Project일 경우로 한하여 진행한다.</span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> 1) Git Flow를 설정할 프로젝트 폴더로 이동한다.</span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> 2) 마우스 우클릭 후 Git Bash Here을 선택</span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghurilxnI9-vyRF48Z_Ni_LZSr-LT5B9Pf5PsRdD7jyxi_IpLn5_vesG06vc6COAYITIhpkIM80qSIvixefrIeCJ0PrL-2fGpkcA_briuPjJL5sdk8GZyKXwMAjMF_86e2dPUCcEWPb2o/s1600/GitFlow_1.PNG" /><span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> </span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> 3) Git Bash에서 git status 명령어로 현재 이 프로젝트의 commit 상태를 확인한다.</span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> </span><br />
<div class="separator" style="clear: both; text-align: center;">
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMpq13Z_SZeU7OAmraxn6wdZE3GlsCwrM-rkx4P82jo0hpvgW7Z_DQlO0cUdyVFEaOeOUY9jApdCXp0Imvvf1oeK0rsnS9Ll6Y6Q66x_Oji14j05hWQT3gaSOE30b2jM5f9nyAh4o4Lko/s1600/gitflow_2.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMpq13Z_SZeU7OAmraxn6wdZE3GlsCwrM-rkx4P82jo0hpvgW7Z_DQlO0cUdyVFEaOeOUY9jApdCXp0Imvvf1oeK0rsnS9Ll6Y6Q66x_Oji14j05hWQT3gaSOE30b2jM5f9nyAh4o4Lko/s1600/gitflow_2.PNG" /></a></span></div>
<br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> </span><br />
<br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;">4) 커밋할 사항이 아니면 gitignore 파일에 추가하거나 , git stash로 돌린다.</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiomMOmtVCSn2eR-by5Nidt3HnghcifZxJvSkU10eYMiDQTD8yXPK028HGYgvZ0siDn04Idndi4rXjP7lPb0lg-HeN7JXnWUA4UYSzr30VrWUet_Q20h4gWzjOr9P3em3mC0PbUvHil47k/s1600/gitflow_3.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiomMOmtVCSn2eR-by5Nidt3HnghcifZxJvSkU10eYMiDQTD8yXPK028HGYgvZ0siDn04Idndi4rXjP7lPb0lg-HeN7JXnWUA4UYSzr30VrWUet_Q20h4gWzjOr9P3em3mC0PbUvHil47k/s1600/gitflow_3.PNG" /></a></div>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> 5) 그 후 git flow init 명령어로 git flow를 실행한다.</span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgea9PPN_PXd4jCisZ9bLz3FIMld3FpnAbOltMB8W0Bt1wOOe0qpedWXh4X5M1jT4Ehl0W4UXmQ7zTz481OR8A2vzzWZFrmc45ChQZ921ebsf52gtuqvKOxBEnusucWr1cR5k1fjAgbjls/s1600/gitflow_4.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgea9PPN_PXd4jCisZ9bLz3FIMld3FpnAbOltMB8W0Bt1wOOe0qpedWXh4X5M1jT4Ehl0W4UXmQ7zTz481OR8A2vzzWZFrmc45ChQZ921ebsf52gtuqvKOxBEnusucWr1cR5k1fjAgbjls/s1600/gitflow_4.PNG" /></a></div>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> </span><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIi9QGHpMBHdI_GaKbVimZpKb2bpDinNHZR690YtIEvo3-jUbqBaL09comwwUz5Ina6nFCMg_5Kpu-T6Dh7Y5FusEHsmn9QOxmreX6dnfXSYDzItzzWIyaQxBEvjAqLt4FnwC56Xg2wKI/s1600/gitflow_5.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIi9QGHpMBHdI_GaKbVimZpKb2bpDinNHZR690YtIEvo3-jUbqBaL09comwwUz5Ina6nFCMg_5Kpu-T6Dh7Y5FusEHsmn9QOxmreX6dnfXSYDzItzzWIyaQxBEvjAqLt4FnwC56Xg2wKI/s1600/gitflow_5.PNG" /></a><span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> </span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> </span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> 6) branch전략을 어떻게 할지 나오는데 계속 엔터치면서 지나가면 된다.</span><br />
<br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> </span><br />
<div class="separator" style="clear: both; text-align: center;">
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2-MVUtEMPFLA87jEsWNVpsHKCVIROMNMwvjezKJPEwgr_xUy0HPbTKLWD0nlji-DcEp8NSorR81qNVVM5YzOdwo6jmLAxDRZfRjW97aDVZRWp8KXh1Qk9eSWetVsLKaavqfZHlVzuO2w/s1600/gitflow_7.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="177" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2-MVUtEMPFLA87jEsWNVpsHKCVIROMNMwvjezKJPEwgr_xUy0HPbTKLWD0nlji-DcEp8NSorR81qNVVM5YzOdwo6jmLAxDRZfRjW97aDVZRWp8KXh1Qk9eSWetVsLKaavqfZHlVzuO2w/s320/gitflow_7.PNG" width="320" /></a></span></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsmki4_Xg3wPy5TGg61kVeA05_1oMpuykPYbFzQqtX_gJJPmKKSxrQsVVqrbyuxQW3x8KeZz0SNubVWsAs-ywyljqOIkPAfCV6gNN6iLU353yzodqO3Tdpr3txr_X32-cs9StO5s5j420/s1600/gitflow_8.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="171" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsmki4_Xg3wPy5TGg61kVeA05_1oMpuykPYbFzQqtX_gJJPmKKSxrQsVVqrbyuxQW3x8KeZz0SNubVWsAs-ywyljqOIkPAfCV6gNN6iLU353yzodqO3Tdpr3txr_X32-cs9StO5s5j420/s320/gitflow_8.PNG" width="320" /></a></span></div>
<br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> </span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span><span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> </span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> 7) 끝나면 branch가 master에서 develop으로 바뀐 것을 확인할 수 있다.</span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwywXsN05KlgXsXOsza3dVNhMpFiZCwdGo3T_3AgZhkYJW8DNCcMpCn5s6aWia7SWAA2x-sd_-HKxkkFd0oJvG5z6W7XuAnSMADuvledEQfwfJx2M6-o4z0q6D0TrTH7p79_nlPKdgNIw/s1600/gitflow_9.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwywXsN05KlgXsXOsza3dVNhMpFiZCwdGo3T_3AgZhkYJW8DNCcMpCn5s6aWia7SWAA2x-sd_-HKxkkFd0oJvG5z6W7XuAnSMADuvledEQfwfJx2M6-o4z0q6D0TrTH7p79_nlPKdgNIw/s1600/gitflow_9.PNG" /></a></div>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> </span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> </span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> </span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> </span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> </span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> 8) 여기서 기능 개발을 하려고 한다면 feature 브런치를 만들어 주자.</span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> 9) 명령어 git flow feature start '[branch detail name]'</span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhE5inkL6LYmywUDM_yYFFuAbqOdXkO4l_TZ6Y0mED64vTEoPHliBXiO4ZVDdBUWtDeAsCtrOSOUcReMcYM4lzuW9EL7_gCeHB03dX8PnqFjDc8uSidNr61OHxBWmqlBs4RAMWuIPjQ_0o/s1600/gitflow_10.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhE5inkL6LYmywUDM_yYFFuAbqOdXkO4l_TZ6Y0mED64vTEoPHliBXiO4ZVDdBUWtDeAsCtrOSOUcReMcYM4lzuW9EL7_gCeHB03dX8PnqFjDc8uSidNr61OHxBWmqlBs4RAMWuIPjQ_0o/s1600/gitflow_10.PNG" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiEFRqOmiOY7nVLGwgYOqtJdLBv6EtLBESUcIC9S215O8LzvpG317XkfhTKADK5hmSOqkY_WkZ8WhoO84h0NmvazKRWZlpRM7V7XLwKsdgTkCQUiM0nsbXnMeLiLYcGNeEG3aK29EiWJI/s1600/gitflow_11.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="171" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiEFRqOmiOY7nVLGwgYOqtJdLBv6EtLBESUcIC9S215O8LzvpG317XkfhTKADK5hmSOqkY_WkZ8WhoO84h0NmvazKRWZlpRM7V7XLwKsdgTkCQUiM0nsbXnMeLiLYcGNeEG3aK29EiWJI/s320/gitflow_11.PNG" width="320" /></a></div>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> </span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> 10) 작업이 완료되면 branch가 develop -> feature/[branch detail name] 으로 변경된다.</span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMsNUh8gBZqNp-Z9HMT-ec4T7D2WpuOg0VOnlzVf21S5Pwq6Q0CUrcEwfDInnCMEyX-sNUMYl1yMj6GJiwulddwvfwK5170_KvbTa9dczJFTQPAIXidIgUsu6Gczpk_gNLYt9DGdMXDqg/s1600/gitflow_12.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMsNUh8gBZqNp-Z9HMT-ec4T7D2WpuOg0VOnlzVf21S5Pwq6Q0CUrcEwfDInnCMEyX-sNUMYl1yMj6GJiwulddwvfwK5170_KvbTa9dczJFTQPAIXidIgUsu6Gczpk_gNLYt9DGdMXDqg/s1600/gitflow_12.PNG" /></a></div>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> </span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> </span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> </span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> 11) 개발이 끝나면 git flow feature finish '[branch detail name]' 명령어를 입력한다.</span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> 12) 배포 준비를 할 경우 release branch를 만들어 최종 release 점검을 진행한다.</span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvzF8Skwfqp5hpkOeiUtbydgm0rlGAUEPb09VY0AaYRvvuG6ev9aed-b7_7eIKWwILIVQ-qZTL31-KGsU0BxajzY7oCqYYcellYfmviRh78P4oNsLlQASJyCEn8tHZt5_rkAxWXm44Cus/s1600/gitflow_13.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvzF8Skwfqp5hpkOeiUtbydgm0rlGAUEPb09VY0AaYRvvuG6ev9aed-b7_7eIKWwILIVQ-qZTL31-KGsU0BxajzY7oCqYYcellYfmviRh78P4oNsLlQASJyCEn8tHZt5_rkAxWXm44Cus/s1600/gitflow_13.PNG" /></a></div>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> 13) 명령어 git flow release start '[branch detail name]'</span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSj2fg2OiU4HhxHBjmd_Dm-viLqa7k50727P-si_oGTNWzKyzyGHfG6yb_4us1NH1p392AxXfxjI2-CRYzQ9XWPEph7sBFfCUlUWpCDT9yWhjT_JDTJ6WHadQuHzguQvigeFRfBFQVH-s/s1600/gitflow_14.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="170" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSj2fg2OiU4HhxHBjmd_Dm-viLqa7k50727P-si_oGTNWzKyzyGHfG6yb_4us1NH1p392AxXfxjI2-CRYzQ9XWPEph7sBFfCUlUWpCDT9yWhjT_JDTJ6WHadQuHzguQvigeFRfBFQVH-s/s320/gitflow_14.PNG" width="320" /></a></div>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> </span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> 14) branch 가 deveop -> release/[branch detail name] 으로 변경 된다.</span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipAtVn2EC-QA1PNKZFtNAbR5O5DF_BdpdceQdaTKKude5BPZPapRBDfY7quAhbVzm-qrBYpPSHbj1qbJBROYflBh35IvcKsLOs3yrR4m96OWzGvYPKMnhkGg0IoScwcGoCW4DQo2vQ6x0/s1600/gitflow_15.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipAtVn2EC-QA1PNKZFtNAbR5O5DF_BdpdceQdaTKKude5BPZPapRBDfY7quAhbVzm-qrBYpPSHbj1qbJBROYflBh35IvcKsLOs3yrR4m96OWzGvYPKMnhkGg0IoScwcGoCW4DQo2vQ6x0/s1600/gitflow_15.PNG" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqtRAFCcG7IfyixQf1H_Smv8q5raEIN1prFXJwaWiuS5nwJwVY_KjMfqNOZvs1cfWEMG5bQxpF_9xo6mB052BdIDvf32yAug0Xtz600WZnSiEcAL75D7cLH7EKnYC42XCdhQSTbvck1Hk/s1600/gitflow_16.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqtRAFCcG7IfyixQf1H_Smv8q5raEIN1prFXJwaWiuS5nwJwVY_KjMfqNOZvs1cfWEMG5bQxpF_9xo6mB052BdIDvf32yAug0Xtz600WZnSiEcAL75D7cLH7EKnYC42XCdhQSTbvck1Hk/s1600/gitflow_16.PNG" /></a></div>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> </span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> </span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> 15) 그 후 release 준비가 모두 끝나면 git flow release finish '[branch detail name]' 입력</span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> 16) Tag Edit 화면이 뜨면 리눅스 입력창과 똑같이 하면 된다. a키 누르고 tag 넣고</span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> esc-> :wq 입력하면 저장된다.</span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDH5FQdb5mlrcWNT7_wDTNCg7eLQjbURyMMtinECZGCh7-AFHS0uOczSu-POb-6P-DNcPIwqfccBxf8ds7s1-Dj0SVxP7ENwnU3NrO7nrd-yu9luabuPkEv4bc-2OJWzRSgzMr5a5WgLM/s1600/gitflow_18.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="167" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDH5FQdb5mlrcWNT7_wDTNCg7eLQjbURyMMtinECZGCh7-AFHS0uOczSu-POb-6P-DNcPIwqfccBxf8ds7s1-Dj0SVxP7ENwnU3NrO7nrd-yu9luabuPkEv4bc-2OJWzRSgzMr5a5WgLM/s320/gitflow_18.PNG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPIZy5MKjO90ZPLunaaxygM3-eJ6RZiLq9hj3dQuD_2_T4ixtZzOeQ18uMhl67dmlQfze4OkUx-CvIUwPI9LlenIMe9HMmRT0S2x-swtgPZZ6yCGLAYZYj_oSsPDFiZT_hPqmDOknwzc0/s1600/gitflow_17.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPIZy5MKjO90ZPLunaaxygM3-eJ6RZiLq9hj3dQuD_2_T4ixtZzOeQ18uMhl67dmlQfze4OkUx-CvIUwPI9LlenIMe9HMmRT0S2x-swtgPZZ6yCGLAYZYj_oSsPDFiZT_hPqmDOknwzc0/s1600/gitflow_17.PNG" /></a></div>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> </span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br /></span>
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"> 17) 그러면 branch 가 master로 변경되며 최종 release가 왼료 된다. </span><br />
<span style="background-color: white; color: #242424; font-family: "roboto" , "helvetica" , "arial" , "lucida" , sans-serif; font-size: 15.3px; line-height: 30px;"><br />
</span> <br />
<div>
<br /></div>
<div>
<br /></div>
<div>
참고 </div>
<div>
http://huns.me/development/1131</div>
<div>
http://mobicon.tistory.com/280</div>
Anonymoushttp://www.blogger.com/profile/06127521281557446949noreply@blogger.com0tag:blogger.com,1999:blog-1395161656837404843.post-54337462111118746142016-05-16T09:09:00.001-07:002016-05-16T09:09:57.301-07:00MYSQL Date/DateTime/TimeStamp 차이Mysql에서 시간을 나타낼 때 쓰는 Type은 3가지다.<br />
<br />
Date , DateTime , TimeStamp<br />
<br />
항상 쓸 때마다 왜 이거쓰더라 하면서 쓰지만 이번에는<br />
정확히 알고 넘어가고 싶어서<br />
이 3가지 타입에 대해 정리를 블로그에 해두기로 하자.<br />
<br />
<b>1. Date</b><br />
<b> - Date 타입은 날짜 값만을 필요로 할 때 사용된다.</b><br />
<b> - 시간 부분이 없으며 'yyyy-MM-dd' 포맷으로 출력한다.</b><br />
<b> - 지원되는 범위는 '1000-01-01' ~ '9999-12-31' 까지</b><br />
<b><br /></b>
<b>2. DateTime</b><br />
<b> - DateTime 타입은 날짜와 시간 정보를 모두 가진다.</b><br />
<b> - 'yyyy-MM-dd hh:mm:ss' 포맷으로 출력된다.</b><br />
<b> - 지원되는 범위는 '1000-01-01 00:00:00' ~ '9999-12-31 23:59:59'까지.</b><br />
<b><br /></b>
<b>3. TimeStamp</b><br />
<b> - TimeStamp 타입은 날짜와 시간 부분을 포함하는 값임.</b><br />
<b> - 범위는 UTC '1970-01-01 00:00:01' ~ UTC '2038-01-19 03:14:07' </b><br />
<b> - 즉 TimeStamp 타입은 UTC에 따라서 시간이 변경됨.</b><br />
<b> (따라서 클라우드 서비스에서 사용한다면 영향이 있을 수 있음)</b><br />
<b><br /></b>
<b><br /></b>Anonymoushttp://www.blogger.com/profile/06127521281557446949noreply@blogger.com0tag:blogger.com,1999:blog-1395161656837404843.post-78042184944816312252016-05-15T10:24:00.004-07:002016-05-15T10:27:32.730-07:00[ZooKeeper] ZooKeeper 설치<b>ZooKeeper </b>는 분산환경의 상호 조정이 필요한 다양한 서비스를 제공하는<br />
동기화가 보장되는 아파치 오픈소스이다.<br />
<br />
분산 환경에서 락, 네이빙 서비스, 클러스터 멤버십 등을 쉽게 구현할 수 있는<br />
분산 코디네이터 서비스를 쉽게 만들 수 있다.<br />
<br />
일단 이번에는 설치 법을 소개 한다.<br />
<br />
설치하는 환경은 다음과 같다<br />
<br />
- OS : 우분투<br />
- H/W : AWS EC2 t2.micro<br />
<br />
※ Java 6 이상이 설치되어 있어야 한다.<br />
자바 설치법은 다음을 참고<br />
<a href="http://sarghis.com/blog/1050/">http://sarghis.com/blog/1050/</a><br />
<br />
<br />
1. ZooKeeper Download<br />
<br />
ZooKeeper는 <a href="http://apache.mirror.cdnetworks.com/zookeeper/">http://apache.mirror.cdnetworks.com/zookeeper/</a> 에서 stable을 들어가서<br />
다운 받습니다.<br />
<br />
2. 파일 이동<br />
<br />
filezilla 또는 FTP 파일을 이용해서 AWS의 OS로 이동 시켜 줍니다.<br />
<br />
3. 압축 풀기 및 파일 이동<br />
<br />
<span style="font-size: x-small;"> 1) #wget <span style="color: #0000ee;"><u>http://apache.mirror.cdnetworks.com/zookeeper/stable/zookeeper-3.4.8.tar.gz</u></span></span><br />
※ 끝의 파일 release는 바뀔 수 있습니다.<br />
<br />
2) #tar zxvf zookeeper-3.4.8.tar.gz<br />
<br />
3) #mv zookeeper-3.4.8.tar.gz /usr/local/zookeeper<br />
<br />
4) #cd /usr/local/zookeeper/zookeeper-3.4.8<br />
<br />
4. 설정파일 복사 및 수정<br />
<br />
1) #cp conf/zoo_sample.cfg conf/zoo.cfg<br />
<br />
<br />
2) zoo.cfg 수정<br />
<br />
i) #cd conf/<br />
ii) #vi zoo.cfg<br />
<br />
설정파일 수정 내용<br />
=====================<br />
# The number of milliseconds of each tick<br />
tickTime=2000<br />
# The number of ticks that the initial<br />
# synchronization phase can take<br />
initLimit=10<br />
# The number of ticks that can pass between<br />
# sending a request and getting an acknowledgement<br />
syncLimit=5<br />
# the directory where the snapshot is stored.<br />
# do not use /tmp for storage, /tmp here is just<br />
# example sakes.<br />
dataDir=/usr/local/zookeeper/data<br />
# the port at which the clients will connect<br />
clientPort=2181<br />
============================================<br />
dataDir 부분만 본인에 맞게 수정해주세요 스냅샷 데이터가 쌓이는 장소 입니다.<br />
<br />
iii) 저장하고 나오면 됩니다.<br />
<br />
5. 서버 구동 <br />
※ 4번까지 진행하시면 현재 위치는 /usr/local/zookeeper/zookeeper-3.4.8/conf<br />
입니다. <br />
# cd .. <br />
# cd bin/ <br />
# ./zkServer.sh start <br />
--> 서버가 구동 됩니다.<br />
<br />
6. 클라이언트 접속하기<br />
# ./zkCli.sh -server 127.0.0.1:2181Anonymoushttp://www.blogger.com/profile/06127521281557446949noreply@blogger.com0tag:blogger.com,1999:blog-1395161656837404843.post-10640137866644385772016-05-10T21:56:00.000-07:002016-05-12T02:34:47.056-07:00Redis에 대해 현재 개발에 필요한 내역 요약(Java)<h1>
Redis</h1>
<br />
Redis는 메모리 기반의 Key/Value Store 이다.<br />
<br />
기존에 메모리 기반 NoSQL DB 인 MemCached 와 성능면에서 비등하면서<br />
<br />
Data Structure 도 지원됨으로서 다양한 용도로 사용할 수가 있다.<br />
<br />
( Ex) Messsage Queue , Shared Memory Server , Remote Dictionary , Pub/Sub 등.<br />
<br />
여기서는 각각에 사용되는 모델 설명하고<br />
<br />
현재 서버를 자바로 개발하고 있으므로 Java Client 중에 추천할만한 것을 소개하도록 한다.<br />
<br />
<strong>1. Persistence</strong><br />
<br />
Redis 는 Memory 형 DB 이기 때문에 서버가 죽으면 데이터가 유실될 우려가 있겠지만, Redis는 Restart 될 때,<br />
<br />
Disk 에 저장해 놓은 데이터를 다시 읽어서 메모리에 로딩하기 때문에 데이터가 유실되지 않는다.<br />
<br />
Disk 에 데이터를 저장하는 방법은 2가지 인데, 스냅샷 방식과 AOF 2가지가 있다.<br />
<br />
스냅샷 방식을 RDB 방식과 같다.<br />
<br />
AOF는 Redis의 모든 write/update 연산 자체를 모두 log 파일에 기록하는 방식이다.<br />
<br />
서버가 재시작 될 때 순차적으로 재 실행하여 데이터를 복구한다.<br />
<br />
장점이라면, 당연히 어느 시점에 서버가 다운되더라도 데이터 유실이 발생되지 않는다. 다만 단점은, 복구시 서버 리스타트 속도가 무지막지 하게 느리며 파일이 너무 커진다.<br />
<br />
<a href="https://www.blogger.com/blogger.g?blogID=1395161656837404843" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="https://www.blogger.com/blogger.g?blogID=1395161656837404843" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a> AOF 와 스냅샷 방식에 자세한 내용은 이 문서를 참고해주기 바란다.<br />
<a href="http://www.redisgate.com/redis/configuration/persistence.php">http://www.redisgate.com/redis/configuration/persistence.php</a><br />
<br />
<br />
<br />
<strong>2. Pub/Sub Model</strong><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf4065_mMHkH9UNbBTsap83ggZ_DOFSyDoPs4Gd_uJ23FbwbC9O7611_yirrZpBUtRR1zjSh36DyabZtSy9SsoRoOgNwMFjayD0eQNJbZOZoa1G7ElbcbKwW2ZRvoE3ZnaCkis5OU7k5k/s1600/Redispub_sub.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="366" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf4065_mMHkH9UNbBTsap83ggZ_DOFSyDoPs4Gd_uJ23FbwbC9O7611_yirrZpBUtRR1zjSh36DyabZtSy9SsoRoOgNwMFjayD0eQNJbZOZoa1G7ElbcbKwW2ZRvoE3ZnaCkis5OU7k5k/s640/Redispub_sub.png" width="640" /></a></div>
<strong><br /></strong>
<br />
Redis는 Pub/Sub 모델에서도 활용될 수 있다. 하나의 Redis Client 가 메시지를 Publish 하면 Topic에 연결되어 있는 다른 Redis Client 가 메시지를 받을 수 있는 구조다. <br />
<br />
좀 특이한 점은 pattern matching 을 통해서 다수의 Topic에서 Message를 subcribe 할 수 있다.<br />
<br />
<br />
<br />
<strong>3. Redis 에서 지원되는 자료구조</strong><br />
<br />
<strong> 1). String</strong><br />
<br />
문자열만 저장할 수 있는 것이 아니고, 이진 데이터도 저장이 가능하다.<br />
<br />
key 에 넣을 수 있는 Data 최대 크기는 512MB 다.<br />
<br />
<br />
<br />
<strong> 2). List</strong><br />
<br />
Lists (Array 형태로 Key 1개에 n개의 값을 가짐, 중복 값 가능)<br />
<br />
- 배열이라고 생각하면 된다.<br />
<br />
- 한 key에 넣을 수 있는 요소의 최대 개수는 <span style="background-color: rgb(255 , 255 , 255); color: rgb(37 , 37 , 37); font-family: , "dotum" , "helvetica" , sans-serif; font-size: 13px; letter-spacing: -0.5px; line-height: 16.8px;">4,294,967,295 개이다.</span><br />
<br />
<strong> 3). Set</strong><br />
<br />
- 정렬되지 않은 집합 형으로 key에 중복된 데이터는 종재하지 않는다.<br />
<br />
- 추가 , 제거 및 존재 체크 시 소모되는 시간이 , sets에 포함된 요소의 수에 관계없이 일정하다.<br />
<br />
- 한 key에 넣을 수 있는 요소의 최대 개수는 <span style="background-color: rgb(255 , 255 , 255); color: rgb(37 , 37 , 37); font-family: , "dotum" , "helvetica" , sans-serif; font-size: 13px; letter-spacing: -0.5px; line-height: 16.8px;">4,294,967,295 개이다.</span><br />
<br />
<strong> 4). Sorted-Set</strong><br />
<br />
- Sorted-Set 은 Redis 에서 가장 많이 쓰이고, 가장 진보된 데이터 형이라고 한다.<br />
<br />
- 랭킹시스템 등에서 사용되기 좋다.<br />
<br />
- sets의 각 요소마다 score라는 실수 값을 가지고 있는 형태로 score 값으로 오름차순 정렬된다.<br />
<br />
- key에 중복된 데이터는 존재하지 않지만 score 값은 중복 가능하다.<br />
<br />
<strong> 5). Hashes</strong><br />
<br />
- lists와 비슷하지만, '필드명'/ '필드값' 의 연속으로 이루어져 있다.<br />
<br />
- 한 key에 포함될 수 있는 field-value 쌍의 최대 개수는 <span style="background-color: rgb(255 , 255 , 255); color: rgb(37 , 37 , 37); font-family: , "dotum" , "helvetica" , sans-serif; font-size: 13px; letter-spacing: -0.5px; line-height: 16.8px;">4,294,967,295 개이다.</span><br />
<br />
<br />
<br />
4. Redis Client<br />
<br />
1) Java<br />
<br />
Java Client 는 여러가지 종류가 있다. <a href="http://redis.io/clients#java">http://redis.io/clients#java</a><br />
<br />
그 중에 6개월 내에 커밋이 일어나고 있는 것은 Jedis / JRedis / lettuce / RedisClient / Redisson 이렇게 5가지 이며,<br />
<br />
그 중에 Redis 에서 추천하고 있는 Client 는 Jedis / lettuce / Redisson 이렇게 3가지 이다.<br />
<br />
이 중에 추천하고 싶은 Client 는 Jedis 인데 이유는 다음과 같다.<br />
<br />
a) 가장 많은 Contributor 를 보유하고 있는 오픈소스 프로젝트이며 가장 오래된 클라이언트이다.<br />
<br />
- 컨트리뷰터 수가 다른 프로젝트와 많은 차이가 날 만큼 많다.<br />
<br />
Jedis : 108 / lettuce : 12 / redisson : 26<br />
<br />
또한 국내에서 Redis 로 유명하고 책도 많이 쓰신 카카오 강대명씨가 커미터로 활동하고 계신 프로젝트가 바로 Jedis 다.<br />
<br />
<br />
<br />
b) jedis는 이슈와 피드백이 많다.<br />
<br />
다른 클라이언트에 비해서 Jedis는 사용자가 많고, 커밋 시점이 오래되었고 지금도 활발한 편이여서 이슈나 피드백이 많다.<br />
<br />
따라서, 예제소스 찾기가 쉬우며 그만큼 레퍼런스가 많은 편이다.<br />
<br />
<br />
<br />
c) Jedis는 사용이 간편하다.<br />
<br />
처음 접근하기에 사용이 간편하고 버그에 대한 피드백도 빠른편, 그리고 여러가지 기능을 붙이지 않는 것도 장점이다.<br />
<br />
<br />
<br />
jedis Github : <a href="https://github.com/xetorthio/jedis">https://github.com/xetorthio/jedis</a><br />
<br />
참고자료<br />
<br />
http://www.redis.io/documentation<br />
<br />
http://mydb.tistory.com/210<br />
<br />
http://www.joinc.co.kr/w/man/12/REDIS/IntroDataType<br />
<br />Anonymoushttp://www.blogger.com/profile/06127521281557446949noreply@blogger.com0tag:blogger.com,1999:blog-1395161656837404843.post-80533615494927757432015-01-11T21:47:00.002-08:002015-01-11T21:47:20.123-08:00[Spring Framework] IoC에 대해서 그리고 ApplicationContext<b>IoC</b><div>
<b><br /></b></div>
<div>
이름부터 생소한 IoC 한번 알아보도록 하자.</div>
<div>
<br /></div>
<div>
<b>1. IoC 란?</b></div>
<div>
<br /></div>
<div>
IoC(Inversion of COntrol)를 풀이하면 제어의 반전..(뭔소린지..뭔 반전이여..)</div>
<div>
<br /></div>
<div>
누군가가 제어를 대신해준다는 의미 정도로 해석이 가능할 것 같음.</div>
<div>
<br /></div>
<div>
IoC 개념은 스프링에서 처음 등장한 것이 아니라 서블릿 컨테이너와 EJB 컨테이너에서</div>
<div>
이미 사용하고 있는 개념이다. 단지 지금까지 제대로 알지 못했을 뿐...</div>
<div>
<br /></div>
<div>
IoC 컨테이너 개념이 최근에 이슈처럼 등장하고 있는 이유는 그 동안 서블릿과 EJB 컨테이너가 가지고 있던 제약사항을 극복하고 새로운 대안의 IoC 컨테이너를 제공하자는 것이다.</div>
<div>
<br /></div>
<div>
<b>2. 사용하는 목적</b></div>
<div>
<br /></div>
<div>
IoC를 사용하는 목적에 대해서는 지금까지의 클래스 호출 방식의 변화를 살펴볼 필요가</div>
<div>
있을 것 같다. </div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizVViTULusA-b57BJ0ZiBZMQqQZFosl-mg6C3hMK7et5iyuLklaotqrlbf7rpUE16m8wgE0UZZiAb1QiyRzYTAcMu42F4HWFONVrkdgqT9JbuFap-YfGivh00BwCTfczbBLoiDOoR9g9o/s1600/class.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizVViTULusA-b57BJ0ZiBZMQqQZFosl-mg6C3hMK7et5iyuLklaotqrlbf7rpUE16m8wgE0UZZiAb1QiyRzYTAcMu42F4HWFONVrkdgqT9JbuFap-YfGivh00BwCTfczbBLoiDOoR9g9o/s1600/class.PNG" height="498" width="640" /></a></div>
<div>
<br /></div>
<div>
<b>3. Spring 컨테이너의 IoC </b></div>
<div>
<br /></div>
<div>
<b><span style="color: red;">DL(Dependency Lookup) </span><span style="color: blue;">- 의존성 검색</span></b></div>
<div>
</div>
<div>
- 저장소에 저장되어 있는 Bean에 접근하기 위하여 개발자들이 컨테이너에서 제공하는</div>
<div>
API를 이용하여 사용하고자 하는 빈(Bean)을 Look up 하는 것</div>
<div>
<br /></div>
<div>
<b><span style="color: red;">DI (Dependency Injection)</span></b> <b><span style="color: blue;">- 의존성 주입</span></b></div>
<div>
<br /></div>
<div>
- 각 계층 사이, 각 클래스 사이에 필요로 하는 의존 관계를 컨테이너가 자동으로</div>
<div>
연결해주는 것 </div>
<div>
<br /></div>
<div>
- 각 클래스 사이의 의존 관계를 빈 설정(Bean Definition) 정보를 바탕으로 컨테이너가</div>
<div>
자동으로 연결해주는 것</div>
<div>
<br /></div>
<div>
<b>4. ApplicationContext</b></div>
<div>
<br /></div>
<div>
Object 생성을 책임지는 DAOFactory에 대응하는 것이 ApplicationContenxt 이다.</div>
<div>
Spring에선 이 ApplicationContext를 IoC 컨테이너라 하기도 하고, Spring컨테이너라고</div>
<div>
부르기도 한다. 또는 Bean Factory 라고하기도 한다.</div>
<div>
<br /></div>
<div>
ApplicatoinContext에는 DaoFactory 클래스와는 달리 직접 Object를 생성하고 그 관계를</div>
<div>
맺어주는 코드는 없고, 그런 생성정보와 연관관계 정보를 별도의 설정정보를 통해 얻는다.</div>
<div>
<br /></div>
<div>
<b>5. ApplicationContext가 Bean을 가져오는 동작방식</b></div>
<div>
</div>
<div>
1. ApplicationContext는 앞의 @Configure 가 붙은 DaoFactory 클래스를 설정정보로</div>
<div>
등록해두고 @Bean 이 붙은 메소드의 이름을 가져와 Bean 목록을 만든다.</div>
<div>
<br /></div>
<div>
2. 클라이언트가 ApplicationContenxt의 getBean 메소드를 호출하면 Bean 목록에서 요청한 이름이 있는지 찾는다.</div>
<div>
<br /></div>
<div>
3. 있다면 Bean을 생성하는 메소드를 호출해서 오브젝트를 생성시킨 후 클라이언트에게</div>
<div>
리턴해준다. </div>
<div>
<br /></div>
<div>
<br /></div>
Anonymoushttp://www.blogger.com/profile/06127521281557446949noreply@blogger.com0tag:blogger.com,1999:blog-1395161656837404843.post-26872725938945638362015-01-09T01:30:00.002-08:002015-01-09T01:38:34.157-08:00[자료구조] - 트리(1)<h2>
<b>Tree</b></h2>
<br />
<b>Tree 란?</b><br />
<br />
트리는 연결 리스트와 유사한 데이터 구조이다. 하지만 각 노드가 선형적으로 다른 노드를 가리키는 게 아니라 각 노드가 여러 개의 노드를 가리킨다. 트리는 비선형적 데이터 구조의<br />
한 예이다. 트리 구조는 구조의 계층적 속성을 그래프의 형태로 나타내는 방법이다.<br />
<br />
트리 ADT(Abstract Data Type , 추상 데이터형)에서 항목의 순서는 중요하지 않지만,<br />
만일 순서 정보가 필요하다면 연결 리스트나 스택, 큐 등과 같은 선형 데이터 구조를<br />
사용할 수 있다.<br />
<br />
<b>Tree 의 용어 설명</b><br />
<br />
root : 부모가 없는 노드. 트리에는 최대 한 개의 뿌리 노드가 있을 수 있다.<br />
<br />
edge(간선) : 부모로부터 자식에게 이어지는 연결 선을 뜻한다.<br />
<br />
leaf(잎 노드) : 자식이 없는 노드를 잎 노드라고 한다.<br />
<br />
siblings(형제 노드) : 같은 부모를 가진 자식들을 형제 노드라고 한다.<br />
<br />
조상(ancestor) 노드 : 특정 노드 q에 이르는 경로에 노드 p가 있으면 노드 p를 노드q의<br />
조상 노드라고 한다.<br />
<br />
자손(descendant) 노드 : 반대로 노드 q는 노드 p의 자손노드가 된다.<br />
<br />
Level : 주어진 깊이의 모든 노드의 집합을 그 트리의 레벨이라고 한다. (root 는 Level 0)<br />
<br />
노드의 깊이 : root 로부터 그 노드까지의 경로의 길이이다.<br />
<br />
노드의 높이 : 해당 노드로부터 가장 깊은 노드까지의 경로<br />
※ 노드가 단 한개만 존재한다면 트리의 높이는 0이다. 즉 0부터 시작한다.<br />
<br />
노드의 크기 : 자기 자신을 포함하여 그 노드가 가진 자손의 수<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBK1-Prpj_EZ9cmHMbBBn_Oznw7QokRKqzRxjN2zk365MkHmRfCDIN1YBo1hd96pytmLAbJ_tuPUk1oNYeBhFZd3sbjjfqW4BM6ZT9KBX8FvTKJx_LdWo7oBs5Yvty5BUqs1uTQaUP2CI/s1600/%ED%8A%B8%EB%A6%AC%EA%B5%AC%EC%A1%B0_2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBK1-Prpj_EZ9cmHMbBBn_Oznw7QokRKqzRxjN2zk365MkHmRfCDIN1YBo1hd96pytmLAbJ_tuPUk1oNYeBhFZd3sbjjfqW4BM6ZT9KBX8FvTKJx_LdWo7oBs5Yvty5BUqs1uTQaUP2CI/s1600/%ED%8A%B8%EB%A6%AC%EA%B5%AC%EC%A1%B0_2.PNG" height="441" width="640" /></a></div>
<br />
<h4>
<b>이진 트리</b></h4>
<div>
- 각 노드가 자식이 없거나, 한개 혹은 2개의 자식을 가질 때 이진 트리라고 한다.</div>
<div>
빈 트리 역시 유효한 이진 트리이다. 이진 트리는 root와 왼쪽 부속 트리, 오른쪽 부속 트리</div>
<div>
라고 불리는 두 개의 분리된 이진 트리로 구성되어 있다고 볼 수 있다.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8vhEgVp0JIx504MRxmz2QQy0fluZOmqfErMObW6Wk_yGk2edYxdM9AOK2-w0bcDQOgFZX48j9Fk5JPjWKEadVTqUaPBGv99iUhO4BKA2fLV4qoPomiWF-4bVrf-m_TxyQar91TK9qKRg/s1600/%ED%8A%B8%EB%A6%AC%EA%B5%AC%EC%A1%B0.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8vhEgVp0JIx504MRxmz2QQy0fluZOmqfErMObW6Wk_yGk2edYxdM9AOK2-w0bcDQOgFZX48j9Fk5JPjWKEadVTqUaPBGv99iUhO4BKA2fLV4qoPomiWF-4bVrf-m_TxyQar91TK9qKRg/s1600/%ED%8A%B8%EB%A6%AC%EA%B5%AC%EC%A1%B0.PNG" height="308" width="400" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<b>이진 트리의 종류</b></div>
<div>
<b><br />
</b></div>
<div>
<b>1. 엄격한 이진 트리</b></div>
<div>
<b><br />
</b></div>
<div>
<b> </b>- 모든 노드가 두 개의 자식을 가지거나 자식이 없을 때 엄격한 이진트리 라고 한다.</div>
<div>
<b><br />
</b></div>
<div>
<b> </b><br />
<div class="separator" style="clear: both; text-align: center;">
<b></b><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjy9qbAzagUx2NT91nOX7pAD5RYJHu4hstDFPtVyB8wsLHBmXUQfFmyatyqncFVXxld6aepwpUtUWnGck7Yw1A5aMZMuzjwZmS4WrpvrD_-UFbxyRUtodv-0Lnp8us6cWPyZ9lYkyv4V8M/s1600/%EA%B7%B8%EB%A6%BC3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjy9qbAzagUx2NT91nOX7pAD5RYJHu4hstDFPtVyB8wsLHBmXUQfFmyatyqncFVXxld6aepwpUtUWnGck7Yw1A5aMZMuzjwZmS4WrpvrD_-UFbxyRUtodv-0Lnp8us6cWPyZ9lYkyv4V8M/s1600/%EA%B7%B8%EB%A6%BC3.png" height="176" width="640" /></a></div>
<b> </b></div>
<div>
<b><br />
</b></div>
<div>
<b><br />
</b> <b><br />
</b> <b><br />
</b> <b>2. 포화 이진 트리</b></div>
<div>
<b><br />
</b></div>
<div>
- 모든 노드가 2개의 자식을 가지고 잎 노드가 같은 레벨에 있을 경우.</div>
<div>
<br /></div>
<div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgL93C6yAe7UlGaK3jNL_LK8m0l9TT5sDVkUJHSx7EQvP1xMB_Jsv2lzCCRsSNO3hUIIttkiNbL9EC_UAmjCcdz3xhe0uuRBZrnftaGveaQ7_JSKfgbzGhKKUVHH0mpDbwQALYS-wiKHK4/s1600/K-6.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgL93C6yAe7UlGaK3jNL_LK8m0l9TT5sDVkUJHSx7EQvP1xMB_Jsv2lzCCRsSNO3hUIIttkiNbL9EC_UAmjCcdz3xhe0uuRBZrnftaGveaQ7_JSKfgbzGhKKUVHH0mpDbwQALYS-wiKHK4/s1600/K-6.png" height="245" width="400" /></a></div>
</div>
<div>
<b><br />
</b></div>
<div>
<b><br />
</b></div>
<div>
<b><br />
</b></div>
<div>
<b><br />
</b></div>
<div>
<b><br />
</b></div>
<div>
<b><br />
</b></div>
<div>
<b><br />
</b></div>
<div>
<b><br />
</b></div>
<div>
<b><br />
</b></div>
<div>
<b><br />
</b></div>
<div>
<b><br />
</b></div>
<div>
<b><br />
</b></div>
<div>
<b><br />
</b></div>
<div>
<b><br />
</b></div>
<div>
<b><br />
</b></div>
<div>
<b><br />
</b> <b><br />
</b> <b><br />
</b> <b>3. 완전 이진 트리</b></div>
<div>
<b><br />
</b></div>
<div>
<b> </b>- 완전 이진 트리를 정의하기 전에, 이진 트리의 높이가 h라고 할 때, 완전 이진 트리는</div>
<div>
뿌리부터 시작해서 트리 안의 노드 수까지의 완전한 순열을 얻는다.</div>
<div>
탐색할 때 NULL 포인터에게도 숫자를 매겨야 한다. </div>
<div>
모든 잎 노드가 높이 h나 h-1에 있고 순열에서 빠진 숫자가 없을 때 완전 이진 트리</div>
<div>
라고 한다.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiomh1e0bUjCLVE4edJjezLGuE_zRRHz9tpbzb1Oi3T-epfMD5xahWssZiUZzIQzAdB2du5FltE7j6xlnIbzEep9qhm7fwD3wL3oh_9KWVx38oLgfO6ifHH_CrYGQUgZPHPUWyZE5G0eH0/s1600/%EC%99%84%EC%A0%84%EC%9D%B4%EC%A7%84%ED%8A%B8%EB%A6%AC.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiomh1e0bUjCLVE4edJjezLGuE_zRRHz9tpbzb1Oi3T-epfMD5xahWssZiUZzIQzAdB2du5FltE7j6xlnIbzEep9qhm7fwD3wL3oh_9KWVx38oLgfO6ifHH_CrYGQUgZPHPUWyZE5G0eH0/s1600/%EC%99%84%EC%A0%84%EC%9D%B4%EC%A7%84%ED%8A%B8%EB%A6%AC.png" height="418" width="640" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<b><br />
</b> <b>트리의 종류</b><br />
<br />
<b><br />
</b><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4BOusU6jZL3Bsr01uTh9wntJDwH5qw6uQVy84AjQS4LTTAzpGWUySKqm0pdey1UNufFR5p07qkXMJ-SB9nGRm8JEV0nUceyhpPldqnXpVQsT0ItGMUuA4gHBZE4ID6v9bvDFwld4OZZI/s1600/image004.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4BOusU6jZL3Bsr01uTh9wntJDwH5qw6uQVy84AjQS4LTTAzpGWUySKqm0pdey1UNufFR5p07qkXMJ-SB9nGRm8JEV0nUceyhpPldqnXpVQsT0ItGMUuA4gHBZE4ID6v9bvDFwld4OZZI/s1600/image004.gif" height="282" width="640" /></a></div>
<b><br />
</b><br />
<b><br />
</b> <b><br />
</b> <b><br /></b><b><br /></b><br />
<b>그럼 트리를 왜 사용 할까?</b><br />
<b><br />
</b> <b>1. 트리 구조에 저장하면 더 효율적인 자료들이 있기 때문이다.</b><br />
<br />
<b>Ex) 회사나 정부의 조직 구조</b><br />
<b> 계층적인 데이터의 저장</b><br />
<b> 인덱스 파일의 생성 ( Ex) B+ Tree )</b><br />
<b><br />
</b> <b>두번째 포스트에서는 이진 트리의 속성, 이진 탐색 트리에 대해 정리 해보자.</b><br />
<b><br />
</b> <b><br />
</b> <b>자료 출처 : 다양한 예제로 학습하는 데이터 구조와 알고리즘 for Java</b><br />
<b><br />
</b> <b>이미지 출처 : 구글..구글..구글..</b></div>
Anonymoushttp://www.blogger.com/profile/06127521281557446949noreply@blogger.com0tag:blogger.com,1999:blog-1395161656837404843.post-88964336169475478072015-01-05T02:07:00.001-08:002019-02-12T15:55:25.523-08:00[자료구조] 큐(Queue) - 큐의 종류<b>자료구조 -큐(Queue)</b><br />
<br />
큐(Queue)는 컴퓨터의 기본적인 자료 구조의 한가지로, 먼저 집어 넣는 데이터가 먼저<br />
나오는 FIFO(First In First Out)구조로 저장하는 형식을 말한다. 영어 단어 Queue는 표를 사러 이렬ㄹ로 늘어선 사람들로 이루어진 줄을 말하기도 하며, 먼저 줄을 선 사람이 먼저<br />
나갈 수 있는 상황을 연상하면 된다.<br />
<br />
나중에 집어 넣는 데이터가 먼저 나오는 스택과는 반대 개념<br />
<br />
Ex) 프린터의 출력 처리, 은행 처리 등<br />
<br />
- 즉 쉽게 얘기하면 순서 있는 리스트다.<br />
<br />
- 큐는 put(Insert) 와 get(delete)을 이용하여 구현된다.<br />
<br />
- put은 큐에 자료를 넣는 것을 의미하며, get은 자료를 꺼내는 것을 의미한다.<br />
<br />
- front(head)와 rear(tail)는 데이터의 위치를 나타낸다.<br />
<br />
- 큐에 Data를 넣는 동작을 EnQueue(인큐) , 제거하는 동작을 DeQueue(디큐)라 한다.<br />
<br />
- 빈 큐에서 디큐하려고 하는 것을 언더플로우(Underflow)라고 부르고, 큐가 가득찬<br />
상태에서 인큐하려고 하는 것을 오버플로우(Overflow)라고 한다.(예외처리)<br />
<br />
<br />
큐의 종류<br />
<br />
<b>1. 선형 큐</b><br />
<br />
- 기본적인 큐의 형태<br />
<br />
- 막대 모양으로 된 큐이다. 크기가 제한되어 있고 빈 공간을 사용하려면<br />
모든 자료를 꺼내거나 자료를 한칸 씩 옮겨야 한다는 단점이 있다.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtXpNva2LATTYcsFWhS0IZvpf4cWDBQS1huABGPjP-b50vT_sTTpkOy77BYBhjzsQunDVDlXuiG8oA6_zFQdHG1OgA1xAzzvkcV1963YxHAblaqKripUUk9arMievGLvfkp_O9VUY7Fa4/s1600/%EC%84%A0%ED%98%95%ED%81%90.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtXpNva2LATTYcsFWhS0IZvpf4cWDBQS1huABGPjP-b50vT_sTTpkOy77BYBhjzsQunDVDlXuiG8oA6_zFQdHG1OgA1xAzzvkcV1963YxHAblaqKripUUk9arMievGLvfkp_O9VUY7Fa4/s1600/%EC%84%A0%ED%98%95%ED%81%90.PNG" width="520" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
선형 큐의 데이터 삽입 및 삭제</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
선형 큐 예제</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
public class QueueDemo { </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>private static final int capacity = 3; </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>int arr[] = new int[capacity]; </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>int size = 0; </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>int top = -1; </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>int rear = 0; </div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>public void push(int pushedElement) { </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>if (top < capacity - 1) { </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>top++; </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>arr[top] = pushedElement; </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>System.out.println("Element " + pushedElement </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>+ " is pushed to Queue !"); </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>display(); </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>} else { </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>System.out.println("Overflow !"); </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>} </div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>} </div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>public void pop() { </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>if (top >= rear) { </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>rear++; </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>System.out.println("Pop operation done !"); </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>display(); </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>} else { </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>System.out.println("Underflow !"); </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>} </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>} </div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>public void display() { </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>if (top >= rear) { </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>System.out.println("Elements in Queue : "); </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>for (int i = rear; i <= top; i++) { </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>System.out.println(arr[i]); </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>} </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>} </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>} </div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>public static void main(String[] args) { </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>QueueDemo queueDemo = new QueueDemo(); </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>queueDemo.pop(); </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>queueDemo.push(23); </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>queueDemo.push(2); </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>queueDemo.push(73); </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>queueDemo.push(21); </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>queueDemo.pop(); </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>queueDemo.pop(); </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>queueDemo.pop(); </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>queueDemo.pop(); </div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>} </div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
} </div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<b>2. 원형 큐</b></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
선형 큐의 문제점을 보완하고자 나왔다. </div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
작업 큐에서 MAX_QUEUE_SIZE 만큼 원소가 삽입되면 큐가 Full 이 된다.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
따라서 원형 큐는 front가 큐의 끝에 닿으면 큐의 맨 앞으로 자료를 보내어</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
원형으로 연결하는 방식이다.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
원형 큐 Ex)</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
public class CircularQueue {</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
// 큐 배열은 front와 rear 그리고 maxSize를 가진다.</div>
<div class="separator" style="clear: both; text-align: justify;">
private int front;</div>
<div class="separator" style="clear: both; text-align: justify;">
private int rear;</div>
<div class="separator" style="clear: both; text-align: justify;">
private int maxSize;</div>
<div class="separator" style="clear: both; text-align: justify;">
private Object[] queueArray;</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
// 큐 배열 생성</div>
<div class="separator" style="clear: both; text-align: justify;">
public CircularQueue(int maxSize){</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
this.front = 0;</div>
<div class="separator" style="clear: both; text-align: justify;">
this.rear = -1;</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
// 실제 크기보다 하나 크게 지정한다 (공백과 포화를 막기 위함)</div>
<div class="separator" style="clear: both; text-align: justify;">
this.maxSize = maxSize+1; </div>
<div class="separator" style="clear: both; text-align: justify;">
this.queueArray = new Object[this.maxSize];</div>
<div class="separator" style="clear: both; text-align: justify;">
}</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
// 큐가 비어있는지 확인</div>
<div class="separator" style="clear: both; text-align: justify;">
public boolean empty(){</div>
<div class="separator" style="clear: both; text-align: justify;">
return (front == rear+1) || (front+maxSize-1 == rear);</div>
<div class="separator" style="clear: both; text-align: justify;">
}</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
// 큐가 꽉 찼는지 확인</div>
<div class="separator" style="clear: both; text-align: justify;">
public boolean full(){</div>
<div class="separator" style="clear: both; text-align: justify;">
return (rear == maxSize-1) || (front+maxSize-2 == rear);</div>
<div class="separator" style="clear: both; text-align: justify;">
}</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
// 큐 rear에 데이터 등록</div>
<div class="separator" style="clear: both; text-align: justify;">
public void insert(Object item){</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
if(full()) throw new ArrayIndexOutOfBoundsException();</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
// rear 가 배열의 마지막이면 rear 포인터를 앞으로 돌린다.</div>
<div class="separator" style="clear: both; text-align: justify;">
if(rear == maxSize-1){</div>
<div class="separator" style="clear: both; text-align: justify;">
rear = -1;</div>
<div class="separator" style="clear: both; text-align: justify;">
}</div>
<div class="separator" style="clear: both; text-align: justify;">
queueArray[++rear] = item;</div>
<div class="separator" style="clear: both; text-align: justify;">
}</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
// 큐에서 front 데이터 조회</div>
<div class="separator" style="clear: both; text-align: justify;">
public Object peek(){</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
if(empty()) throw new ArrayIndexOutOfBoundsException();</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
return queueArray[front];</div>
<div class="separator" style="clear: both; text-align: justify;">
}</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
// 큐에서 front 데이터 제거</div>
<div class="separator" style="clear: both; text-align: justify;">
public Object remove(){</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
Object item = peek();</div>
<div class="separator" style="clear: both; text-align: justify;">
front++;</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
// front의 다음 index가 배열크기+1 이면 처음으로 돌아간다</div>
<div class="separator" style="clear: both; text-align: justify;">
if(front==maxSize){</div>
<div class="separator" style="clear: both; text-align: justify;">
front = 0;</div>
<div class="separator" style="clear: both; text-align: justify;">
}</div>
<div class="separator" style="clear: both; text-align: justify;">
return item;</div>
<div class="separator" style="clear: both; text-align: justify;">
}</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
}</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<b>3. 우선순위 큐</b></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
우선순위 큐는 데이터의 우선순위에 따라 우선순위가 높은 데이터부터 꺼내도록</div>
<div class="separator" style="clear: both; text-align: justify;">
만들어진 큐.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
데이터를 삽입할 때 우선순위에 따라 정렬하여 삽입한 후 한쪽 방향에서만 데이터를 </div>
<div class="separator" style="clear: both; text-align: justify;">
꺼내어 쓰도록 작성하면 된다.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
우선순위 큐 예제</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
public class PriorityQueue {</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
private int maxSize;</div>
<div class="separator" style="clear: both; text-align: justify;">
private long[] queueArray;</div>
<div class="separator" style="clear: both; text-align: justify;">
private int count;</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
// 큐 배열 생성</div>
<div class="separator" style="clear: both; text-align: justify;">
public PriorityQueue(int maxSize){</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
this.maxSize = maxSize;</div>
<div class="separator" style="clear: both; text-align: justify;">
this.queueArray = new long[maxSize];</div>
<div class="separator" style="clear: both; text-align: justify;">
this.count=0;</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
}</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
// 큐가 비어있는지 확인</div>
<div class="separator" style="clear: both; text-align: justify;">
public boolean empty(){</div>
<div class="separator" style="clear: both; text-align: justify;">
return (count==0);</div>
<div class="separator" style="clear: both; text-align: justify;">
}</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
// 큐가 꽉 찼는지 확인</div>
<div class="separator" style="clear: both; text-align: justify;">
public boolean full(){</div>
<div class="separator" style="clear: both; text-align: justify;">
return (count==maxSize);</div>
<div class="separator" style="clear: both; text-align: justify;">
}</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
// 큐에 데이터 등록</div>
<div class="separator" style="clear: both; text-align: justify;">
// 큐가 데이터가 큰 순서대로 배열의 앞에서부터 정렬되있기에</div>
<div class="separator" style="clear: both; text-align: justify;">
// 배열의 뒤에서부터 탐색하며 item 보다 큰 값이 있는 index 뒤에 삽입한다.</div>
<div class="separator" style="clear: both; text-align: justify;">
public void insert(long item){</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
if(full()) throw new ArrayIndexOutOfBoundsException();</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
if(empty()){</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
queueArray[count++] = item;</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
}else{</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
// 데이터의 뒤에서부터 앞으로 탐색한다.</div>
<div class="separator" style="clear: both; text-align: justify;">
int i=0;</div>
<div class="separator" style="clear: both; text-align: justify;">
for(i=count-1; i>=0; i--){</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
// 현재 index의 데이터가 입력받은 데이터(item)보다 작으면 배열의 뒤로 밀어낸다.</div>
<div class="separator" style="clear: both; text-align: justify;">
if(item > queueArray[i]){</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
queueArray[i+1] = queueArray[i];</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
}else{</div>
<div class="separator" style="clear: both; text-align: justify;">
// item이 현재 index의 값보다 작으면 탐색을 멈춘다.</div>
<div class="separator" style="clear: both; text-align: justify;">
// item 삽입 위치 확인</div>
<div class="separator" style="clear: both; text-align: justify;">
break;</div>
<div class="separator" style="clear: both; text-align: justify;">
}</div>
<div class="separator" style="clear: both; text-align: justify;">
}</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
// item 등록</div>
<div class="separator" style="clear: both; text-align: justify;">
queueArray[i+1] = item;</div>
<div class="separator" style="clear: both; text-align: justify;">
count++;</div>
<div class="separator" style="clear: both; text-align: justify;">
}</div>
<div class="separator" style="clear: both; text-align: justify;">
}</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
// 큐의 마지막 데이터 조회 (가장작은 데이터)</div>
<div class="separator" style="clear: both; text-align: justify;">
public Object peek(){</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
if(empty()) throw new ArrayIndexOutOfBoundsException();</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
return queueArray[count-1];</div>
<div class="separator" style="clear: both; text-align: justify;">
}</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
// 큐에서 마지막 데이터 제거 (가장작은 데이터)</div>
<div class="separator" style="clear: both; text-align: justify;">
public Object remove(){</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
Object item = peek();</div>
<div class="separator" style="clear: both; text-align: justify;">
count--;</div>
<div class="separator" style="clear: both; text-align: justify;">
return item;</div>
<div class="separator" style="clear: both; text-align: justify;">
}</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
}</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
Anonymoushttp://www.blogger.com/profile/06127521281557446949noreply@blogger.com0tag:blogger.com,1999:blog-1395161656837404843.post-18338930063163941722015-01-04T23:47:00.001-08:002015-01-04T23:47:17.224-08:00[Spring Framework] DAO 란?<b>DTO 와 DAO</b><br />
<b><br /></b>
<b>DAO(Data Access Object)</b>는 DB를 사용해 데이터를 조화하거나 조작하는 기능을<br />
전담하도록 만든 오브젝트를 말한다.<br />
<br />
사용자는 자신이 필요한 Interface를 DAO에게 던지고 DAO는 이 인터페이스를<br />
구현한 객체를 사용자에게 편리하게 사용 할 수 있도록 반환해줍니다.<br />
<br />
DB에 대한 접근을 DAO가 담당하도록 하여 데이터베이스 엑세스를 DAO에서만<br />
하게 되면 다수의 원격호출을 통한 오버헤드를 VO나 DTO를 통해 줄일 수 있고<br />
다수의 DB 호출문제를 해결할 수 있습니다. 또한 단순히 읽기만 하는 연산이므로<br />
트랜잭션 간의 오버헤드를 감소할 수 있습니다.<br />
<br />
<br />
<b>DTO(Data Transfer Object)는 VO(Value Object)로 바꿔 말할 수 있는데</b><br />
<b>계층간 데이터 교환을 위한 자바빈즈를 말한다. 여기서 말하는 계층간의</b><br />
<b>컨트롤러, 뷰, 비즈니스 계층, 퍼시스턴스 계층을 말하며 각 계층간 데이터 교환을</b><br />
<b>위한 객체를 DTO 또는 VO라고 부른다.</b><br />
<b><br /></b>
<b>대표적인 DTO로는 폼데이터빈, 데이터베이스 테이블빈 등이 있으며, 각 폼요소나,</b><br />
<b>데이터베이스 레코드의 데이터를 매핑하기 위한 데이터 객체를 말한다. 즉 폼 필드들의 </b><br />
<b>이름을 그대로 가지고 있는 자바빈 객체를 폼 필드와 그대로 매핑하여 비즈니스 계층으로</b><br />
<b>보낼 때 사용하나다. 이런 객체를 DTO라고 부르며 VO(Value Object) 패턴이라고도 한다.</b><br />
<b>VO 패턴은 데이터 전달을 위한 가장 효율적인 방법이지만, 클래스 선언을 위해 많은 </b><br />
<b>코드가 필요하다는 단점이 있다.</b><br />
<b><br /></b>
<b>일반적인 DTO는 로직을 갖고 있지 않다. 순수한 데이터 객체이며 속상과 그 속성에</b><br />
<b>접근하기 위한 getter, setter 메소드만 가진 클래스를 말한다. 여기에 추가적으로 </b><br />
<b>toString(), equals(), 등의 Object 클래스 메소드를 작성할 수 있다.</b><br />
<b><br /></b>
<b>즉, 계층 간의 데이터 전달에 사용하는 데이터 객체들을 말한다.</b><br />
<b><br /></b>
<b>1. DTO 클래스 예제</b><br />
<br />
public class DTOBean {<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>private String name;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>private int value;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>private String data;<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>public String getName() {<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>return name;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>public void setName(String name) {<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>this.name = name;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>public int getValue() {<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>return value;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>public void setValue(int value) {<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>this.value = value;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>public String getData() {<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>return data;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>public void setData(String data) {<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>this.data = data;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
}<br />
<br />
<b>2. DAO 클래스 예제</b><br />
<div>
<br /></div>
<div>
<div>
<br /></div>
<div>
//DB와 연결할 Connection을 가져온다.</div>
<div>
//어떤 DB를 사용할 것이며, 어떤 드라이브와 로그인 정보를 사용할 것인가.</div>
<div>
//작업이 끝나면 사용한 리소스를 시스템에 돌려준다.</div>
<div>
public class TestDao {</div>
<div>
<br /></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span>public void add(DTOBean dto) throws ClassNotFoundException, SQLException{</div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span>Class.forName("com.mysql.jdbc.Driver");</div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span>Connection c= DriverManager.getConnection("jdbc:mysql://localhost/springbook", "spring", "book");</div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span>PreparedStatement ps = c.prepareStatement("insert into users(id,name,password) value(?,?,?)");</div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span>ps.setString(1, dto.getName());</div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span>ps.setInt(2, dto.getValue());</div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span>ps.setString(3, dto.getData());</div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span>ps.executeUpdate();</div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span>ps.close();</div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span>c.close();</div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span>}</div>
<div>
}</div>
</div>
<div>
<br /></div>
Anonymoushttp://www.blogger.com/profile/06127521281557446949noreply@blogger.com2tag:blogger.com,1999:blog-1395161656837404843.post-14746518821563241412014-12-29T22:11:00.000-08:002014-12-29T22:11:02.982-08:00라즈베리파이 Study&Project - 라즈베리파이 시작하기겨울방학을 맞아 지난 1년간 미뤄왔던..<br />
<br />
2013년 중순에 구매하여 현재까지 약 1년반동안 묵혀왔던 라즈베리파이 B 모델과<br />
<br />
새로구매한 라즈베리파이 B+모델을 이용하여 스터디 및 프로젝트를 해보도록 하겠다.<br />
<br />
=================================================================<br />
<b><br /></b>
<b>라즈베리파이- 시작하기</b><br />
<br />
라즈베리파이가 뭐에요? 라고 물어본다면 컴퓨터다.<br />
<br />
영국의 라즈베리파이 재단이 학교에서 기초 컴퓨터 과학 교육을 증진시키기위해 만들었다.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8A-AcLRHe9Acs56t4an1rAc2OMjJWDib4QF5mAsfWNpXbzb_xEtRyvczWX2XeiVAYT5Go_QRtWNmTUp_4NQx4LOm5JXqU6PcVRAFLmKz46YVt3T4K1nxMkU5cX4pcbnx5YDBuQ5lf31E/s1600/raspberry-pi-b-plus1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8A-AcLRHe9Acs56t4an1rAc2OMjJWDib4QF5mAsfWNpXbzb_xEtRyvczWX2XeiVAYT5Go_QRtWNmTUp_4NQx4LOm5JXqU6PcVRAFLmKz46YVt3T4K1nxMkU5cX4pcbnx5YDBuQ5lf31E/s1600/raspberry-pi-b-plus1.jpg" height="262" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
2014년 새로 출시된 라즈베리파이b+</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNyN9LhE8s72oGPUm9RqmzjxqzroIyAVb2Cl73igXkpxE8oJaS2A_2QdbzQqPJGU-mOa7MXHbJQuIueOzejdu3XA-oGll_bl6-WupN0aVNc_WERox_rvmXXVQU9pMI_0-MytMOrd1jT9M/s1600/raspberry-pib.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNyN9LhE8s72oGPUm9RqmzjxqzroIyAVb2Cl73igXkpxE8oJaS2A_2QdbzQqPJGU-mOa7MXHbJQuIueOzejdu3XA-oGll_bl6-WupN0aVNc_WERox_rvmXXVQU9pMI_0-MytMOrd1jT9M/s1600/raspberry-pib.jpg" height="320" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
라즈베리파이b모델</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
라즈베리파이에서 지원되는 OS는 리눅스(데비안 리눅스)이고, 윈도우 기반 환경은 LXDE.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="color: blue;">※ <b style="background-color: white; font-family: sans-serif; font-size: 14px; line-height: 22.3999996185303px;">LXDE</b><span style="background-color: white; font-family: sans-serif; font-size: 14px; line-height: 22.3999996185303px;">(Lightweight X11 Desktop Environment)는 </span><a href="http://ko.wikipedia.org/wiki/%EC%9C%A0%EB%8B%89%EC%8A%A4" style="background: none rgb(255, 255, 255); font-family: sans-serif; font-size: 14px; line-height: 22.3999996185303px; text-decoration: none;" title="유닉스">유닉스</a><span style="background-color: white; font-family: sans-serif; font-size: 14px; line-height: 22.3999996185303px;">와 </span><a href="http://ko.wikipedia.org/wiki/POSIX" style="background: none rgb(255, 255, 255); font-family: sans-serif; font-size: 14px; line-height: 22.3999996185303px; text-decoration: none;" title="POSIX">POSIX</a><span style="background-color: white; font-family: sans-serif; font-size: 14px; line-height: 22.3999996185303px;"> 호환 플랫폼(</span><a href="http://ko.wikipedia.org/wiki/%EB%A6%AC%EB%88%85%EC%8A%A4" style="background: none rgb(255, 255, 255); font-family: sans-serif; font-size: 14px; line-height: 22.3999996185303px; text-decoration: none;" title="리눅스">리눅스</a><span style="background-color: white; font-family: sans-serif; font-size: 14px; line-height: 22.3999996185303px;">나 </span><a href="http://ko.wikipedia.org/wiki/BSD" style="background: none rgb(255, 255, 255); font-family: sans-serif; font-size: 14px; line-height: 22.3999996185303px; text-decoration: none;" title="BSD">BSD</a><span style="background-color: white; font-family: sans-serif; font-size: 14px; line-height: 22.3999996185303px;">)에서 사용할 수 있는 자유 오픈소스 데스크톱 환경이다. LXDE 프로젝트의 목적은 빠르고 에너지 효율적인 데스크톱 환경을 제공하는 것이다. - 위키백과-</span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white; color: #252525; font-family: sans-serif; font-size: 14px; line-height: 22.3999996185303px;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
본체만 제공해주기 때문에 키보드,마우스, 무선랜, 모니터 등은 전부 직접 연결해야 한다.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
B모델은 USB 포트가 2개 뿐이여서 키보드 마우스 연결하고 나면 뭐 다른걸 연결할 수 없었다. (무선랜 어댑터 어디에 연결하리...)</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
그래서 USB 허브를 사서 연결할 수 밖에 없었는데</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
다행히 B+는 USB 포트가 2개가 늘어났다!! </div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
그래서 할 수 있는게 무지하게 많다. 거기다가 SD카드도 micro SD카드로 변경!</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
장점이 많다.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
단, 기존의 B 모델과 GPIO, 케이블등 호환되지 않는 것이 많다.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
B+를 오늘 구매해서 다음 포스트 부터는 실제로 시작부터 프로젝트 하는 과정을</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
적어보도록 한다.</div>
Anonymoushttp://www.blogger.com/profile/06127521281557446949noreply@blogger.com0tag:blogger.com,1999:blog-1395161656837404843.post-62329292815004358792014-05-28T11:25:00.003-07:002014-05-28T11:25:37.373-07:00일기요즘 통 잠을 이룰 수가 없다..<div>
<br /></div>
<div>
맡고있는 과제만 4~5가지.. 전부 총괄책임자로 등록되어 있고..</div>
<div>
<br /></div>
<div>
누구하나 믿고 맡길 사람이 없으니 통탄할 노릇이다..</div>
<div>
<br /></div>
<div>
거기다 개인적으로도 힘든일이 많아 엎친데 덮친격이다..</div>
<div>
<br /></div>
<div>
대학교 3학년.. 학생신분이기 때문에 학업에 열중해야 하겠지만</div>
<div>
<br /></div>
<div>
여유가 없다.. 이일 저일 처리하기에도 벅차고.. </div>
<div>
<br /></div>
<div>
모든 업무가 절차가 복잡하고 처음이다 보니 그것 따라가는것에도 힘이 붙인다..</div>
<div>
<br /></div>
<div>
게다가 개인적인 개발 공부도 소홀히 할 수 없다.</div>
<div>
<br /></div>
<div>
또한 당장 프로젝트들을 8~9월 까지는 완료를 해야하는데</div>
<div>
<br /></div>
<div>
설계내지 기획을 대신해줄 사람조차 없다..</div>
<div>
<br /></div>
<div>
당장 3개월 앞으로 다가온 대회..</div>
<div>
<br /></div>
<div>
6월이 시작함과 동시에 시작해야 하는 정부과제 개발..</div>
<div>
<br /></div>
<div>
디자인 팀과 함께하는 앱개발 등등.. 해야할 것이 너무 많다..</div>
<div>
<br /></div>
<div>
어찌해야 할지..고민이 끝이 없다..</div>
<div>
<br /></div>
<div>
오늘도 일찍 잠들어 보려 했으나.. 잠이 오지 않아 어느덧 새벽 3시 30분...</div>
<div>
<br /></div>
<div>
항상 이모양이니 큰일이다..어찌해야 좋을까..</div>
Anonymoushttp://www.blogger.com/profile/06127521281557446949noreply@blogger.comtag:blogger.com,1999:blog-1395161656837404843.post-19859416738602482032014-05-13T03:04:00.000-07:002014-05-13T03:04:18.587-07:00RDBMS SQL Select 문<h2>
<b><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Select 문</span></b></h2>
SQL 이 각 SQL Server Program 마다 다르나, 여기서는 표준 SQL 위주로 정리하도록 한다.<br />
<br />
Select문은 SQL문의 가장 기본이 되는 구문입니다.<br />
Select문은 순서에 유의해서 작성해야 한다.<br />
Select 컬럼리스트 from 테이블명 까지는 필수적으로 작성해야 한다.<br />
<br />
<b><i><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Select 구문 구조</span></i></b><br />
<b><i><br /></i></b>
<pre class="de1" style="background-color: #f9f9f9; background-image: none; border: 0px none white; font-family: monospace, monospace; font-size: 1em; line-height: 1.2em; padding: 0px; vertical-align: top;"> <span class="kw1" style="color: #993333; font-weight: bold;">SELECT</span> <span class="br0" style="color: #66cc66;">[</span><span class="kw1" style="color: #993333; font-weight: bold;">ALL</span> <span class="sy0" style="color: #66cc66;">|</span> <span class="kw1" style="color: #993333; font-weight: bold;">DISTINCT</span><span class="br0" style="color: #66cc66;">]</span> 컬럼명 <span class="br0" style="color: #66cc66;">[</span><span class="sy0" style="color: #66cc66;">,</span>컬럼명<span class="sy0" style="color: #66cc66;">...</span><span class="br0" style="color: #66cc66;">]</span>
<span class="kw1" style="color: #993333; font-weight: bold;">FROM</span> 테이블명 <span class="br0" style="color: #66cc66;">[</span><span class="sy0" style="color: #66cc66;">,</span>테이블명<span class="sy0" style="color: #66cc66;">...</span><span class="br0" style="color: #66cc66;">]</span>
<span class="br0" style="color: #66cc66;">[</span><span class="kw1" style="color: #993333; font-weight: bold;">WHERE</span> 조건식<span class="br0" style="color: #66cc66;">]</span>
<span class="br0" style="color: #66cc66;">[</span><span class="kw1" style="color: #993333; font-weight: bold;">GROUP</span> <span class="kw1" style="color: #993333; font-weight: bold;">BY</span> 컬럼명 <span class="br0" style="color: #66cc66;">[</span><span class="kw1" style="color: #993333; font-weight: bold;">HAVING</span> 조건식<span class="br0" style="color: #66cc66;">]</span><span class="br0" style="color: #66cc66;">]</span>
<span class="br0" style="color: #66cc66;">[</span><span class="kw1" style="color: #993333; font-weight: bold;">ORDER</span> <span class="kw1" style="color: #993333; font-weight: bold;">BY</span> 컬럼명<span class="br0" style="color: #66cc66;">]</span>
<span class="kw1" style="color: #993333; font-weight: bold;">GROUP</span> <span class="kw1" style="color: #993333; font-weight: bold;">BY</span> 컬럼명<span class="br0" style="color: #66cc66;">[</span><span class="sy0" style="color: #66cc66;">,</span>컬럼명<span class="sy0" style="color: #66cc66;">...</span><span class="br0" style="color: #66cc66;">]</span>
<span class="kw1" style="color: #993333; font-weight: bold;">ORDER</span> <span class="kw1" style="color: #993333; font-weight: bold;">BY</span> 컬럼명<span class="br0" style="color: #66cc66;">[</span><span class="sy0" style="color: #66cc66;">,</span>컬럼명<span class="sy0" style="color: #66cc66;">...</span><span class="br0" style="color: #66cc66;">]</span></pre>
<br />
<b><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Example</span></b><br />
<br />
SELECT 컬럼, 컬럼...<br />
FROM 테이블명<br />
WHERE 조건<br />
GROUP BY 구문<br />
UNION/UNION ALL/INTERSECT/MINUS 구문<br />
ORDER BY 구문<br />
<br />
<br />
<b><u>기본 구문</u> </b><br />
<b><br /></b>
<b>* 성능 테이블의 모든 레코드를 조회하시오</b><br />
<br />
SELECT *<br />
FROM PERF<br />
<br />
or 테이블에 있는 모든 컬럼명을 나열해도 가져올 수 있다.<br />
<br />
<br />
<b><u>WHERE 구문</u></b><br />
<br />
* 성능 테이블에서 성능 인덱스가 10인 성능을 조회하시오<br />
<br />
Select *<br />
FROM PERF<br />
WHERE perfIndex=10;<br />
<br />
* 성능 값이 100 이상 되는 성능을 조회하시오<br />
<br />
Select *<br />
FROM PERF<br />
WHERE VALUE > 100;<br />
<br />
* 성능들 중 온도로 시작하는 성능을 조회하시오<br />
<br />
Select *<br />
From PERF<br />
Where perfName like '온도%';<br />
<br />
* 성능 이름에 설정이 포함된 이름을 모두 조회하시오<br />
<br />
Select *<br />
From PERF<br />
Where perfName like '%설정%';<br />
<br />
<b><u>GROUP BY 구문</u></b><br />
<b><u><br /></u></b>
<b>* 장비별 평균값을 구하는 쿼리</b><br />
<br />
SELECT AVG(VALUE)<br />
FROM PERF<br />
GROUP BY serverIndex;<br />
<br />
<b>* 장비별 성능수를 구하는 쿼리</b><br />
<br />
SELECT COUNT(*)<br />
FROM PERF<br />GROUP BY serverIndex;<br />
<br />
<b>* 장비별로 성능값이 200 이상인 것만 평균을 구하라</b><br />
<br />
Select AVG(VALUE)<br />
FROM PERF<br />
WHERE VALUE > 200<br />
GROUP BY serverindex;<br />
<br />
Group by 구문을 사용하면서 이 결과에 조건을 줄 때 WHERE 조건문을 사용할 수 없다<br />
따라서 위 쿼리는 에러가 발생한다.<br />
<br />
GROUP BY 구문을 사용하면서 조건을 주기 위해서는 대신 HAVING 구문을 사용한다.<br />
HAVING 구문 에서는 그룹화의 기준이 되는 컬럼과 그룹함수만이 사용할 수 있다는 점을 주의해야 한다. 위의 쿼리문에서는 그룹화의 기준이 되는 컬럼이 serverIndex 이므로 serverIndex 는 HAVING 구문에 쓸 수 있다.<br />
<br />
<b>고친 구문</b><br />
<br />
SELECT AVG(VALUE)<br />
FROM PERF<br />GROUP BY serverIndex<br />
HAVING AVG(VALUE) > 200;<br />
<br />
<b>ORDER BY 구문</b><br />
<br />
Select 문장을 사용하여 레코드를 검색할 때 임의의 컬럼을 기준으로 정렬을 해야<br />
할 필요가 발생한다. 이런 경우 사용하는 구문이 ORDER BY다<br />
<br />
ASC : 오름차순의 의미(생략가능)<br />
DESC : 내림차순을 의미<br />
<br />
성능 인덱스가 높은 순으로 조회하시오<br />
<br />
Select *<br />
from PERF<br />
ORDER BY perfIndex DESC;<br />
<br />
<b>서브쿼리</b><br />
<br />
서브 쿼리는 SELECT 문안에서 ()로 둘러싸인 Select 문을 말하며 쿼리문의 결과를 메인 쿼리로 전달하기 위해 사용된다.<br />
<br />
================================================================================<br />
<br />
추가 내용<br />
<br />
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<strong style="background-color: white;">2.칼럼 이름에 별칭 지정하기</strong></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<span style="background-color: white;"> 칼럼 이름으로 의미를 알기 힘들 경우에는 칼럼 이름에 별칭(ALIAS)을 부여할 수 있다.</span></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<br /></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<span style="background-color: white;"> SELECT DEPTNO <strong>AS </strong>DEPARTMENTNO, DNAME <strong>AS </strong>DEPARTMENTNAME</span></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<span style="background-color: white;"> FROM DEPT;</span></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<span style="background-color: white;"> ----------------------------------------------------------------------</span></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<span style="background-color: white;"> 칼럼 이름 대신 별칭을 출력하려면 칼럼을 기술한 바로 뒤에 AS라는 키워드를 쓴후 </span></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<span style="background-color: white;"> 별칭을</span></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<span style="background-color: white;"> 기술한다.</span></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<br /></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<span style="background-color: white;"> SELECT DEPTNO "DEPARTMENT NO", DNAME "DEPARTMENT NAME"</span></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<span style="background-color: white;"> FROM DEPT;</span></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<span style="background-color: white;"> ------------------------------------------------------------------</span></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<span style="background-color: white;"> 위처럼 별칭은 키워드 AS를 생략하고 기술할 수도 있다.</span></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<span style="background-color: white;"> 별칭에 공백이나 특수문자를 표현하고 싶거나 대 소문자를 구별하고싶으면 " " 를 사용한다.</span></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<span style="background-color: white;"> 별칭으로 한글 사용도 가능하다.</span></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<span style="background-color: white;"><br /></span></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<strong style="background-color: white;">4.WHERE 조건과 비교 연산자</strong></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<br /></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<span style="background-color: white;"> SELECT절에 칼럼 이름을 나열하여 원하는 칼럼만 출력하였으나, WHERE절을 추가</span></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<span style="background-color: white;"> 하면 원하는 행을 추출할수 있다.</span></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<br /></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<span style="background-color: white;"> SELECT EMPNO, ENAME, SAL</span></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<span style="background-color: white;"> FROM EMP</span></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<span style="background-color: white;"> WHERE SAL>=3000;</span></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<span style="background-color: white;"> -----------------------------</span></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<span style="background-color: white;"> 급여를 3000이상 받는 사원에 대해서만 출력하라는 조건을 제시했다.</span></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<span style="background-color: white;"> WHERE절로 조건을 제시하게 되면 조건에 맞는 로우만 찾게 된다.</span></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<br /></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<span style="background-color: white;"> <strong>4.1.비교연산자</strong></span></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<span style="background-color: white;"><strong> </strong> [= 같다] [> 보다크다] [< 보다작다] [>= 보다 크거나 같다]</span></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<span style="background-color: white;"> [<= 보다 작거나 같다] [<>,!=,^= 같지않다]</span></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
<span style="background-color: white;"><br /></span></div>
<div style="padding: 0px; text-align: justify;">
<b><span style="background-color: white; font-family: 돋움; line-height: 18px;">참고</span><span style="font-family: 돋움;"><span style="line-height: 18px;">http://blog.naver.com/PostView.nhnblogId=naru2121&logNo=50108458013&categoryNo=15&viewDate=&currentPage=1&listtype=0</span></span></b></div>
<div style="padding: 0px; text-align: justify;">
<span style="font-family: 돋움;"><span style="line-height: 18px;"><br /></span></span></div>
<div style="font-family: 돋움; line-height: 18px; padding: 0px; text-align: justify;">
</div>
<br />
<br />
<div class="autosourcing-stub-extra" style="line-height: 1.5; opacity: 0; position: absolute;">
<div style="font-family: Dotum; font-style: normal; font-weight: normal; line-height: 1.5; margin: 11px 0px 7px; padding: 0px;">
<span style="background-color: white;"><strong style="padding: 0px 7px 0px 0px;">[출처]</strong> <a href="http://blog.naver.com/naru2121/50108458013" style="text-decoration: none;" target="_blank">SQL - SELECT문으로 데이터 추출 1</a><span style="padding: 0px 7px 0px 5px;">|</span><strong style="padding: 0px 7px 0px 0px;">작성자</strong> <a href="http://blog.naver.com/naru2121" style="text-decoration: none;" target="_blank">UYEONG</a></span></div>
</div>
<br />
<br />
<br />
<div class="autosourcing-stub-extra" style="line-height: 1.5; opacity: 0; position: absolute;">
<div style="font-family: Dotum; font-style: normal; font-weight: normal; line-height: 1.5; margin: 11px 0px 7px; padding: 0px;">
<span style="background-color: white;"><strong style="padding: 0px 7px 0px 0px;">[출처]</strong> <a href="http://blog.naver.com/naru2121/50108458013" style="text-decoration: none;" target="_blank">SQL - SELECT문으로 데이터 추출 1</a><span style="padding: 0px 7px 0px 5px;">|</span><strong style="padding: 0px 7px 0px 0px;">작성자</strong> </span><a href="http://blog.naver.com/naru2121" style="text-decoration: none;" target="_blank"><span style="background-color: white;">U<span style="font-size: 12px;">YE</span></span><span style="font-size: 12px;">ONG</span></a></div>
</div>
<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/06127521281557446949noreply@blogger.com0tag:blogger.com,1999:blog-1395161656837404843.post-45632550334673003852014-05-12T02:32:00.001-07:002014-05-13T03:04:32.574-07:00Java Thread<b>1. Thread 란?</b><br />
<br />
- 프로그램의 실행 흐름, 프로그램을 구성하고 있는 실행 단위<br />
- 흔히 하나의 흐름으로 구성되어 있는 프로그램을 Single Thread, 여러 작업을 동시에 수행 가능하게 하는 것이 Multi-Thread 다.<br />
<br />
<b>2. Multi-Thread 를 사용해야 하는 이유</b><br />
<br />
단일 스레드 애플리케이션의 문제는 다른 것들이 시작하기 전에 작업을 완료해야 한다는 것에 있다. 멀티스레드는 동시성을 시뮬레이션하는 단일 프로세서 시스템에서 성능을 증가 시킬수 있다. 하나의 쓰레드가 진행할 수 없을 경우 , 다른 것이 프로세서를 사용할 수 있다.<br />
<br />
<b>3. Thread 의 라이프 싸이클</b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhmlGgpusxZDhKsNhpgskWQYfbNk7zO7NT1vpwva4s7c3NcMJcQZL3Izya-XFO4e_5M-3DKxXqD3UBp2Tgvi1J8V5BgYR_WPeU9laFw9kbV5IewiAYj0iSEIwejk8hc5siJTwgJ-GlN_E/s1600/%255B%EA%B7%B8%EB%A6%BC3%255DJavaThreadLifeCycle_tape.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhmlGgpusxZDhKsNhpgskWQYfbNk7zO7NT1vpwva4s7c3NcMJcQZL3Izya-XFO4e_5M-3DKxXqD3UBp2Tgvi1J8V5BgYR_WPeU9laFw9kbV5IewiAYj0iSEIwejk8hc5siJTwgJ-GlN_E/s1600/%255B%EA%B7%B8%EB%A6%BC3%255DJavaThreadLifeCycle_tape.jpg" height="444" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
새 스레드는 new 상태에서 라이프 사이클을 시작한다. 그것은 스레드를 runnable 상태에</div>
<div class="separator" style="clear: both; text-align: justify;">
놓으며, 프로그램이 스레드를 시작할 때까지 이 상태로 남아 있다. runnable 상태에서 스레드는 자체 태스크 수행하는 것으로 간주된다.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
때로 runnable 스레드는 다른 스레드가 태스크를 수행하길 기다리는 동안 waiting 상태로 전환한다. waiting 스레드는 기다리는 스레드에 통보할 때만 runnable 상태로 다시 전환한다.</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
runnable 스레드는 지정된 대기 시간 동안 timed waiting 상태로 들어갈 수 있다.</div>
<div class="separator" style="clear: both; text-align: justify;">
지정된 대기 시간이 만료하거나 기다리던 이벤트가 발생하면 runnable 상태로 다시 전환한다.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
timed waiting과 waiting 스레드는 프로세서를 사용할 수 없다. 선택적 간격이 제공되는 경우</div>
<div class="separator" style="clear: both; text-align: justify;">
runnable 스레드는 timed waiting 상태로 전화할 수 있다. 이러한 스레드는 다른 스레드에 의해 통보될 때 혹은 초과 간격이 만료할 때 runnable 상태로 다시 돌아간다.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
스레드를 timed waiting 상태에 놓는 또 다른 방법인 sleep 은 runnable 상태로 돌아간 후에 지정된 시간 동안 timed waiting 상태에 머문다. 스레드는 수행해야 할 작업이 없을 때는 수면 상태가 된다.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
즉시 완료될 수 없는 태스크 수행을 시도하고 , 태스크가 완료될 때까지 반드시 기다려야 할 때 runnable 스레드는 blocked 상태로 전환한다. 예를 들어, 스레드가 입력/출력 요청을 할 때 운영체제는 I/O 요청이 완료될 때까지 스레드가 실행되는 것을 차단하며, 완료 시점에서 blocked 스레드가 runnable 상태로 전환함으로써 실행을 재개한다. blocked 스레드는 프로세서를 사용할 수 없다.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
runnable 스레드는 성공적으로 태스크를 완료할 때 terminated 상태 즉, 죽는다. 또는 종료된다. </div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<b>4. 스레드 우선 순위 및 스레드 스케쥴링</b></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
모든 자바 스레드는 운영체제가 스레드가 예약되는 순서를 결정하는데 도움을 주는 </div>
<div class="separator" style="clear: both; text-align: justify;">
스레드 우선 순위를 가지고 있다. </div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
자바 우선 순위는 MIN_PRIORITY(상수1)~MAX_PRIORITY(상수 10) 사이의 범위다. </div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Default 값으로 NORM_PRIORITY(상수5)가 주어진다.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
※ 스레드 스케쥴링은 플랫폼 의존적이다. 다중 스레드 프로그램의 동작은 자바 구현에</div>
<div class="separator" style="clear: both; text-align: justify;">
따라 다를 수 있다.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<b> 5. Runnables 및 Thread 클래스</b></div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
자바에서는 Runnable 인터페이스로 구현하거나 Thread 클래스를 상속받아서</div>
<div class="separator" style="clear: both; text-align: justify;">
스레드 구현이 가능하다. 그러나 멀티 스레드에서 선호하는 방식은 Runnable 인터페이스다</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Runnable 객체는 다른 태스크와 함께 동시에 실행할 수 있는 "태스크" 를 나타낸다.</div>
<div class="separator" style="clear: both; text-align: justify;">
Runnable 인터페이스는 단일 메서드 run 을 선언하여 Runnable 객체가 수행해야 하는</div>
<div class="separator" style="clear: both; text-align: justify;">
태스크를 정의하는 코드를 포함한다. Runnable을 실행하는 스레드가 생성되고 시작될 때</div>
<div class="separator" style="clear: both; text-align: justify;">
스레드는 새 스레드에서 실행되는 Runnable 객체의 run 메서드를 호출한다.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<b> Thread 구현 예제</b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><br /></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><br /></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b>1. PrintTask.Java </b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><br /></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;">import java.util.Random;</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"><br /></span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;">/**</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"> * Thread 로 선언하는것보다 Runnable 로 하는것이 더 좋으며</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"> * 멀티 쓰레드 관리를 편하게 하기 위한 테스트 </span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"> * @author blessldk</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"> *</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"> */</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;">public class PrintTask implements Runnable{</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"><br /></span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>private final int sleepTime;</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"><b><span style="font-size: x-small;"> </span></b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>private final String taskName;</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"><b><span style="font-size: x-small;"> </span></b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>private final static Random generator= new Random();</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"><br /></span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"><b><span style="font-size: x-small;"> </span></b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>/**</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span> * 각각의 task 이름을 받아와서 설정해볼까? 그렇게 하자</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span> */</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>public PrintTask(String name){</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>this.taskName = name;</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"><b><span style="font-size: x-small;"> </span></b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>sleepTime = generator.nextInt(5000);</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>}</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"><b><span style="font-size: x-small;"> </span></b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>@Override</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>public void run() {</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>// TODO Auto-generated method stub</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>try{</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>while(true){</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>System.out.printf("%s going to for %d milli\n" , taskName , sleepTime);</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"><br /></span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Thread.sleep(sleepTime);</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>}</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>}</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>catch(Exception e){</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>e.printStackTrace();</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>}</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"><b><span style="font-size: x-small;"> </span></b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>System.out.printf("%s done sleeping\n" , taskName);</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>}</span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;"><br /></span></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-size: x-small;"><b></b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span style="font-size: x-small;">}</span></b></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b>2. ThreadCreator.Java</b></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<div>
<br /></div>
<div>
<b>public class ThreadCreator {</b></div>
<div>
<b><br /></b></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"><b> </b></span></div>
<div>
<b><span class="Apple-tab-span" style="white-space: pre;"> </span>public static void main(String[] args) {</b></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"><b> </b></span></div>
<div>
<b><span class="Apple-tab-span" style="white-space: pre;"> </span>System.out.println("Create Thread");</b></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"><b> </b></span></div>
<div>
<b><span class="Apple-tab-span" style="white-space: pre;"> </span>Thread thread1 = new Thread(new PrintTask("task1"));</b></div>
<div>
<b><span class="Apple-tab-span" style="white-space: pre;"> </span>Thread thread2 = new Thread(new PrintTask("task2"));</b></div>
<div>
<b><span class="Apple-tab-span" style="white-space: pre;"> </span>Thread thread3 = new Thread(new PrintTask("task3"));</b></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"><b> </b></span></div>
<div>
<b><span class="Apple-tab-span" style="white-space: pre;"> </span>System.out.println("Created Thread Print Task");</b></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"><b> </b></span></div>
<div>
<b><span class="Apple-tab-span" style="white-space: pre;"> </span>thread1.start();</b></div>
<div>
<b><span class="Apple-tab-span" style="white-space: pre;"> </span>thread2.start();</b></div>
<div>
<b><span class="Apple-tab-span" style="white-space: pre;"> </span>thread3.start();</b></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"><b> </b></span></div>
<div>
<b><span class="Apple-tab-span" style="white-space: pre;"> </span>System.out.println("task started. main 끝");</b></div>
<div>
<b><span class="Apple-tab-span" style="white-space: pre;"> </span>}</b></div>
<div>
<b>}</b></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<b>Executor 프레임워크로 스레드 관리</b></div>
<div>
<br /></div>
<div>
위와 같이 명확하게 스레드를 생성하는 것이 가능하지만, Executor 인터페이스를 사용하여 Runnable 객체의 실행을 관리하는 것을 권장한다.</div>
<div>
Executor 객체는 Runnable을 실행하기 위해 스레드 풀(Thread pool)이라고 하는 스레드 그룹을 생성하고 관리한다. Executor를 사용하는 것은 스스로 스레드를 생성하는 것에 비해 장점을 가진다. Executors는 새로운 스레드 생성의 오버헤드를 제거하기 위해 기존의 스레드를 다시 사용할 수 있고 어플리케이션이 리소스를 과도하게 소모하는 너무 많은 스레드를 생성하지 않고, 스레드의 수를 최적화하여 성능을 향상시킬 수 있다.</div>
<div>
<br /></div>
<div>
Executor 인터페이스는 Runnable을 인수로서 받는 execute라는 단일 메서드를 선언한다.</div>
<div>
Executor 는 execute 메서드에 전달된 모든 Runnable을 스레드 풀에 있는 스레드 중 하나로 할당한다. 사용 가능한 스레드가 없는 경우, Executor는 새 스레드를 생성하거나 스레드가 사용 가능해지길 기다린다. </div>
<div>
<br /></div>
<div>
ExecutorService 인터페이스는 Executor를 확장하고 Executor는 execute 메서드에 전달된 모든 Runnable을 스레드 풀에 있는 스레드 중 하나로 할당한다. 사용 가능한 스레드가 없는 경우, Executor는 새 스레드를 생성하거나 스레드가 사용 가능해지길 기다린다.</div>
</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<b>3. TaskExector.java</b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><br /></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b>import java.util.concurrent.ExecutorService;</b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b>import java.util.concurrent.Executors;</b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><br /></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><br /></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b>public class TaskExecutor {</b></div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"><b> </b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"><b> </b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span class="Apple-tab-span" style="white-space: pre;"> </span>public static void main(String[] args) {</b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span class="Apple-tab-span" style="white-space: pre;"> </span>PrintTask task1 = new PrintTask("task1");</b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span class="Apple-tab-span" style="white-space: pre;"> </span>PrintTask task2 = new PrintTask("task2");</b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span class="Apple-tab-span" style="white-space: pre;"> </span>PrintTask task3 = new PrintTask("task3");</b></div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"><b> </b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span class="Apple-tab-span" style="white-space: pre;"> </span>System.out.println("Starting Executor");</b></div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"><b> </b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span class="Apple-tab-span" style="white-space: pre;"> </span>ExecutorService threadExecutor = Executors.newCachedThreadPool();</b></div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"><b> </b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span class="Apple-tab-span" style="white-space: pre;"> </span>threadExecutor.execute(task1);</b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span class="Apple-tab-span" style="white-space: pre;"> </span>threadExecutor.execute(task2);</b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span class="Apple-tab-span" style="white-space: pre;"> </span>threadExecutor.execute(task3);</b></div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"><b> </b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span class="Apple-tab-span" style="white-space: pre;"> </span>threadExecutor.shutdown();</b></div>
<div class="separator" style="clear: both; text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"><b> </b></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span class="Apple-tab-span" style="white-space: pre;"> </span>System.out.println("Tasks started, main ends");</b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><span class="Apple-tab-span" style="white-space: pre;"> </span>}</b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b>}</b></div>
<div style="text-align: justify;">
<br /></div>
Anonymoushttp://www.blogger.com/profile/06127521281557446949noreply@blogger.com2tag:blogger.com,1999:blog-1395161656837404843.post-64074983771279540712014-04-29T02:22:00.000-07:002014-04-29T02:22:00.799-07:00RDBMS- 제 3 강<b>DDL과 DML</b><br />
<br />
<b>1. DDL(Data Definition Language)</b><br />
<br />
데이터 정의 문으로 데이터 구조를 정의하는데 사용되는 언어<br />
<br />
데이터의 구조를 생성, 변경 또는 삭제가 가능<br />
<br />
<b> ALTER문</b><br />
<br />
- alter 명령은 객체에 대한 모든 변경을 위해 사용된다.<br />
<br />
- alter table 명령을 사용하여 새로운 컬럼을 추가하거나 변경 가능<br />
<br />
<b> DROP문</b><br />
<br />
- drop 명령은 테이블과 테이블내의 모든 데이터 관련 index를 삭제한다.<br />
<br />
- drop 을 사용하면 테이블이 사용했던 Storage가 모두 Release 됨<br />
<br />
- DDL 은 항상 Auto Commit 이기 때문에 Rollback 불가능<br />
<br />
<br />
<b> TRUNCATE</b><br />
<br />
- drop과 동일한 테이블 삭제 명령 , 테이블내의 모든 데이터 삭제<br />
<br />
- 기억공간 모두를 반납하는 drop 명령과는 달리 테이블의 구조는 남게된다.<br />
<br />
- delete문은 rollback 이 가능하나, truncate 문은 auto commit 이므로 rollback 불가능<br />
<br />
<br />
<b>2. DML(Data Manipulation Language)</b><br />
<b><br /></b>
데이터를 검색하고 데이터로 작업하는 데 사용하는 언어<br />
<br />
데이터베이스 내에서 데이터를 추가, 수정 , 쿼리 또는 제거 가능<br />
<br />
INSERT<br />
<br />
- Insert 는 테이블에 데이터를 삽입하는 명령어<br />
<br />
UPDATE<br />
<br />
- Update 는 기존에 테이블에 입력되어 있던 값을 변경 할 때 사용<br />
<br />
DELETE<br />
<br />
- Delete 는 테이블의 내용을 삭제<br />
<br />
SELECT<br />
<br />
- Select는 테이블의 내용을 조회<br />
<br />
<br />
Anonymoushttp://www.blogger.com/profile/06127521281557446949noreply@blogger.com0tag:blogger.com,1999:blog-1395161656837404843.post-80867840423616813772014-04-13T10:49:00.001-07:002014-04-13T10:49:12.815-07:00Java 제 3강 - Java를 작업해보자 어떻게? 정말 가볍게(1)자바 제 3강 이다.<br />
<br />
중간에 캡슐화와 권한등 여러가지 설명했으나<br />
<br />
그것에 대해선 넘어가기로 하자..(원래 정상 커리큘럼에서는 휙 넘어가는 부분이였다..)<br />
<br />
그래도 언급은한다.<br />
<br />
자바 캡슐화<br />
<br />
캡슐화..자 어렵게 설명하지 말자..<br />
<br />
결국 객체들의 정보 보호와 소스가 망가지는걸 방지하자는 것이다.<br />
<br />
이러한 보호를 위해서 만든 것이 바로 권한이다.<br />
<br />
캡슐화를 설명하기 앞서 권한을 얘기해보자<br />
<br />
권한은 private , protected , (default) , public 이 있다.<br />
<br />
자 이름에서도 느껴지지 않는가.. 어떤것이 더 개방적일지.<br />
<br />
사전적으로 정리하도록 하겠다.<br />
<br />
private : 같은 클래스 내에서만 접근 가능<br />
<br />
protected : 자신과 상속 관계에 있는 하위 클래스에서 접근 가능<br />
<br />
<strike>default : 같은 패키지에서 접근 가능.. (선언 안하면 이리 되는거니까..쓰지말자)</strike><br />
<strike><br /></strike>
public : 클래스,변수,메소드 생성자 등의 모든 접근을 허용한다.<br />
<br />
단, 이는 객체 생성시 접근 허용인 것이고 객체를 생성하지도 않았는데<br />
<br />
접근을 허용한다는 얘기가 아니다.<br />
<br />
자 그럼 Java 에서 캡슐화는 어떻게 시키는 것일까?<br />
<br />
1. 정보 보호가 필요한 객체를 private 로 선언한다.<br />
<br />
2. 그 객체 정보를 필요로 하는 것은 public으로 선언하다.<br />
<br />
이렇게 했을 때 이로운 점은 다음과 같다<br />
<br />
1. 객체에 포함된 정보의 손상을 막는다. (private 이니까)<br />
<br />
2. 데이터가 바뀌어도 다른 객체에는 영향을 주지 않는다 (기본이 private니까)<br />
<br />
3. 처리된 결과만 사용하므로 객체 이식성이 좋다(객체지향 프로그래밍의 필수)<br />
<br />
이정도다..<br />
<br />
뭐 다른 말 이말 저말 붙은게 많으나.<br />
<br />
결국 유지보수의 편리함. 개발의 편리함이다.<br />
<br />
알아두고 쓰면 좋을 것이다.<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/06127521281557446949noreply@blogger.com0tag:blogger.com,1999:blog-1395161656837404843.post-73126973944137558482014-04-11T00:29:00.001-07:002016-05-12T02:38:49.333-07:00Unite Korea 2014 2 Day와 전체 후기음.... 뭐 여전히 두번째 날도 사람은 많았다.<br />
<br />
전체적으로 총평을 하자면 실망감이 컸다.<br />
<br />
1. 장소<br />
<br />
장소가 너무 불편했다. 동선은 좁은데 사람은 많고. 줄서는 공간 조차 넉넉치 않았다.<br />
작년 NDC 13 같은 경우 동선이 넓어 사람이 치이는 일이 전혀 없었는데..<br />
그에 비해 Unite Korea 2014는 정말 안타까웠다.. 오히려 Unity 2012 컨퍼런스 때보다도<br />
못하는 현상이 보였다.<br />
<br />
또 이벤트 장소도 따로 준비되어 있지 않아 가운데 라운지 비슷한데서 진행하는데.<br />
뒤에는 부스가 있고 앞에는 등록 창구가 있고.. 어수선한 곳에서 사람들 잔뜩 서있는데<br />
거기서 이벤트를 진행하는 것도 무리수였다..(게다가 이건 유료 컨퍼런스다.. 최대 11만원)<br />
<br />
게다가 책 파는 곳은 왜이리도 없는지.. 후원은 많이 받으면서 책파는 곳은 저 구석에<br />
하나 있을 뿐이다.. 다른 여타 컨퍼런스에서 부스 옆에 책파는 곳이 많은 형태와 너무<br />
대조된다. (자바 개발자 컨퍼런스도 이정돈 아니였는데..보고있나 유니티!!)<br />
<br />
그리고 코엑스 인터컨티넨탈 호텔을 컨퍼런스 장소로 지정한건 악수다..이건 분명<br />
최악의 수였다. 대부분 대중교통을 이용한다.. 삼성역에서 쭉쭉 걸어서 도착하는 곳이<br />
컨퍼런스 장소라니..이보다 최악이 어디있으려나... 큰 장소가 필요해서 그랬다면<br />
이해라도 하겠다.. 장소도 무지 좁다!.. 차라리 2012년 잠실 롯데 호텔.<br />
2013년 건국대학교 보다 못하다! 보고있나 유니티!!<br />
<br />
<br />
2. 강의<br />
<br />
일단 오후에 세션을 몰아놔서 5개 룸에서 진행되는 세션이다 보니 선택지에 따라<br />
포기해야 하는 세션이 너무 많았다. 세션 수가 늘어난 것 처럼 보이지만 정작<br />
한사람이 들을 수 있는 세션은 줄어든 셈이다.<br />
<br />
또한 강의 내용도. 모든 세션을 다 듣지 않아 평하긴 어려우나, 좋은 세션도 많았으나<br />
소개,광고 정도에 치중한 세션이 많아 보였고, 얻어가는 세션이 드물었다. 게다가..<br />
제목에서 낚시질 당해서 들어가는 세션도 있어야 하는데.. 구미가 당긴다 라고 할만한<br />
세션 역시.. 별로 없었다는게 문제. 특히 2Day 에서는 그런게 심각하게 보였다.<br />
<br />
3. 진행 방안<br />
<br />
이벤트 진행 시간이 4시부터 였다...세션 들어야 하는 사람들은 어떡하라고<br />
이 복불복 같은 이벤트는 무엇인지.. 게다가 위에서도 말했듯 그 장소도 협소했다.<br />
거기서 무슨 이벤트를 할 수 있는건지 도통 알 수 없을 정도다...<br />
<br />
게다가 1룸을 빌려서 했던 싸인회.(뭐야..강의수가 부족했던거야 뭐야..)<br />
<br />
<br />
총평<br />
<br />
확실히 유니티에 대한 사람들의 관심이 대폭 증가하였고, 이젠 관심을 넘어<br />
모바일 게임 개발을 한다면 한번쯤 다들 사용할 정도로 보편화 된 모습이 보여졌고<br />
후원도 확실히 많이 받고 있고 이제는 우리 돈 좀 벌고 있어요. 라는 모양새가 보였다.<br />
<br />
허나 사업 방향 노선이 달라서 인지 왜인지 모르겠으나, 유니티의 폐쇄적인 정책은<br />
여전해 보였고, 개발자들의 불만은 날이 갈수록 증가하고 있는데 이를 해소해 줄 생각은<br />
특별히 보이지 않았다. 언리얼 엔진 4는 풀소스가 공개 되었다. 그리고 월 단위 라이센스로<br />
정책을 변경, 전면 한글화 , C++과 실시간 연동 까지.. 그 제공 범위를 파격적으로 내놓았다.<br />
<br />
이러한 자극으로 좀 변할지 어떨지.. 좀 지켜봐야 겠지..<br />
<br />
<br />
아쉬움이 남긴 하지만.. 뭐<br />
<br />
그래도 얻은거라면 S Console 과 지원 정보 ,<br />
유니티5 에서의 AssetBundle 과 멀티 씬 Editor 기능 정보<br />
그리고 다양한 사은품 ㅋㅋㅋ<br />
뭐 이정도 얻은거면 27500원(얼리버드 학생 가격) 이 아깝진 않다.<br />
<br />
후~ 그럼 NDC를 기다리며..<br />
Anonymoushttp://www.blogger.com/profile/06127521281557446949noreply@blogger.com0tag:blogger.com,1999:blog-1395161656837404843.post-13995442127721309482014-04-10T18:03:00.001-07:002016-05-12T02:39:41.637-07:00Unite Korea 2014 2Day Session 3 - Unity Test Tools<div class="p1">
유니티 테스트 툴 </div>
<div class="p2">
<br /></div>
<div class="p1">
강연자 : Tomek Paszek </div>
<div class="p2">
<br /></div>
<div class="p1">
: 댄마크에 살고있으며 Toolsmith 에서 일을 하고 있다</div>
<div class="p1">
: 유니티 테스트 툴 만드는 일을 한다.</div>
<div class="p2">
<br /></div>
<div class="p1">
자동화 테스트 이유는 뭘까?</div>
<ul class="ul1">
<li class="li1">낮은 비용 동작, 더 빠르게 사람이 개입하지 않게 하는 것이 목표</li>
<li class="li1">테스트가 가능한 코드가 있으면 다양한 효과 기대 가능</li>
<li class="li1">코드 변경 비용이 뒤로 갈수록 늘어나기 때문</li>
<li class="li1">버그를 코드에서 없애는 시점을 앞당기기 위한 하나의 방안이다.</li>
</ul>
<div class="p2">
<br /></div>
<div class="p1">
Testing Games</div>
<ul class="ul1">
<li class="li1">게임과 여타 프로그램 테스팅이 차이는 크지 않다..</li>
<li class="li1">게임은 여러가지 변화와 그에 대해서 방어를 해야 하는 것이 게임 테스트의 특징이다.</li>
<li class="li1">4개월 전에 유니티 테스트 툴을 릴리즈 했다. 업계의 갭을 줄이기 위해 출시</li>
</ul>
<div class="p2">
<br /></div>
<div class="p1">
Unity Test Tools Goals</div>
<ul class="ul1">
<li class="li1">업계와의 갭을 줄이고</li>
<li class="li1">프로그램의 질을 높이자</li>
</ul>
<div class="p2">
<br /></div>
<div class="p1">
Auto Test 는 유닛 테스트 부터 Itegration -> UI 테스트로 구성되어 있는데</div>
<div class="p1">
피라미드 위 즉 UI 테스트로 올라갈 수록 중요도는 떨어지고 </div>
<div class="p1">
Unit 테스트로 갈 수록 중요도는 올라간다.</div>
<div class="p2">
<br /></div>
<div class="p1">
따라서 유니티 테스트는 UI테스트를 제외하고 Unit + Integration Test만 포함되어 있다.</div>
<div class="p2">
<br /></div>
<div class="p1">
Unit- Unit Test Runnder</div>
<ul class="ul1">
<li class="li1">Editor에서 구현되었다.</li>
<li class="li1">여러가지 옵션들이 있고 Editor안에서 테스트가 진행된다</li>
<li class="li1">따라서 , 다른 툴에서 진행하는것 보다 훨씬 간편하게 테스트 할 수 있다</li>
</ul>
<div class="p2">
<br /></div>
<div class="p1">
Assertion Component </div>
<ul class="ul1">
<li class="li1">attach to GameObject</li>
<li class="li1">set invariant</li>
</ul>
<div class="p2">
<br /></div>
<div class="p1">
Integration Test Runner</div>
<br />
<ul class="ul1">
<li class="li1">Scene을 바탕으로 테스트.</li>
</ul>
Anonymoushttp://www.blogger.com/profile/06127521281557446949noreply@blogger.com0tag:blogger.com,1999:blog-1395161656837404843.post-62207993755923910592014-04-10T18:02:00.002-07:002016-05-12T02:39:47.433-07:00Unite Korea 2014 Session 3 - 요즘 트랜드의 서버와 네트워크 이슈<div class="p1">
넷텐션 - 배현직</div>
<div class="p2">
<br /></div>
<div class="p1">
프라우드넷 - 요즘 트랜드의 서버와 네트워크 이슈</div>
<div class="p2">
<br /></div>
<div class="p1">
hyunjik.bae@nettention.com</div>
<div class="p2">
<br /></div>
<ol class="ol1">
<li class="li1">프라우드넷 소개</li>
<ol class="ol2">
<li class="li1">게임 서버 , P2P 네트워크 솔루션로 시작하여 지금은 전반적인 기능을 커버</li>
<li class="li1">제공 기능 : C/S 통신 S/S 통신 , DB 캐시 기능</li>
</ol>
</ol>
<div class="p2">
<br /></div>
<ol class="ol1">
<li class="li1">요즘 서버 트렌드</li>
<ul>
<li>2008년 PC 온라인 </li>
<li class="li1">2014년 대부분이 모바일 게임 </li>
<li class="li1">2008년 , 윈도우가 대부분 지금도 그렇고</li>
<li class="li1">2008년 물리적 서버 :: 2014년 클라우드 서버 이용</li>
<li class="li1">자체제작 서버툴 :: 오픈소스 서버툴을 현재는 많이 사용</li>
<li class="li1">TCP, UDP 위주의 네트워크 :: HTTP 를 선호</li>
<li class="li1">넷마블,피망,한게임 :: 게임 유통 구조가 많이 달라짐</li>
<li class="li1">DB 는 MSSQL , MySQL :: 현재는 RDBMS + NoSQL</li>
<li class="li1">C++ :: 현재는 C# , UnityScript , Java , PHP 등등….</li>
</ul>
</ol>
<div class="p2">
<br /></div>
<ol class="ol1">
<li class="li1">우리의 대응책</li>
<ul>
<li>개발 로드맵 </li>
</ul>
<ol class="ol2">
<ul>
<li>많은 고객사들로부터 수집된 요구명세의 집합 + Create</li>
<li>리눅스 + 연결유지기능을 넷텐션에서 진행중</li>
</ul>
<ol class="ol3">
</ol>
</ol>
<li class="li1">이슈1 : 모바일</li>
<ul>
<li>모바일 네트워크 게임</li>
</ul>
<ol class="ol2">
<ul>
<li>폰 하드웨어 스펙</li>
</ul>
<ol class="ol3">
<ul>
<li>생각보다 옛날 폰을 쓰는 분들이 많아 성능에 목숨을 건다.</li>
<li>그래서 처리 성능을 높이는데 집중해야 한다.</li>
<li>10년전 PC와 성능이 비슷하다고 볼수 있는데(옛날폰은) 상황은 더 안좋다.</li>
<li>여러개를 띄우기 어렵고 (메모리문제) 베터리 문제도 있어 힘들다..</li>
<li>안드로이드는 따뜻해서 문제다…. 손난로가 따로 필요없다….</li>
<li>그래서 넷텐션은</li>
</ul>
<ol class="ol1">
<ul>
<li class="li1">네트워크 클라이언트 코어는 NDK + pure Java 예정</li>
</ul>
</ol>
<ul>
<li>폰마다 다른 스레딩 퍼포먼스</li>
<li>갤럭시 S4의 클럭 resolution * 그래도 클라보다야 낫지뭐..흐규흐규..</li>
</ul>
<ol class="ol1">
</ol>
</ol>
</ol>
</ol>
<div class="p1">
네트워크 고약한 점 </div>
<ul class="ul1">
<ul class="ul1">
<ul class="ul1">
<li class="li1">긴 하위호환성의 문제</li>
<li class="li1">사람 피를 완전히 바꾸는 것 만큼 어려움</li>
<li class="li1">무선 네트워크의 불안정성</li>
</ul>
<li class="li1">무선 네트워크 </li>
<ul class="ul1">
<li class="li1">3G </li>
<ul class="ul1">
<li class="li1">RTT 50~100ms</li>
<li class="li1">위치 이동 안해도 20%까지 패킷로스 증가</li>
<li class="li1">2013년 말 조사만해도 3G가 80% 가까이 됨</li>
</ul>
<li class="li1">Wifi라고 안심할수 있는가</li>
<ul class="ul1">
<li class="li1">Wifi장비 자체가 패킷을 지연시켜서 보내는 경우가 있다</li>
<li class="li1">패킷의 순서가 역으로 도착할 수가 있다</li>
</ul>
<li class="li1">이러한 문제로 무선네트워크에서 실시간 랜더링 게임이라 하면 할것이 많다</li>
<ul class="ul1">
<li class="li1">송신 대기 데이터 조작 기능(스로틀링)</li>
<li class="li1">Coalesce기능</li>
</ul>
<li class="li1">3G vs Wifi</li>
<ul class="ul1">
<li class="li1">게임 하다가 wifi존에서 나간 경우</li>
<li class="li1">게임 하다가 wifi존에 도착한 경우</li>
<li class="li1">게임 플레이 하다가 중단해야 하는 경우</li>
</ul>
<li class="li1">무선 네트워크 문제 해결 방안 : MPTCP</li>
<ul class="ul1">
<li class="li1">iOS7 에 처음 탑제 , 시리 안에서 임상 실험중</li>
<li class="li1">거의 모든 라우터는 MPTCP 지원하지는 않음</li>
</ul>
<li class="li1">인터넷에 깔려있는 수많은 라우터들이 TCP 이외의 프로토콜을 받아들이지 않고 있다</li>
</ul>
<li class="li1">그럼 프라우드넷에서는?</li>
<ul class="ul1">
<li class="li1">P2P , C/S 모두 연결 유지 기능 프로토타입 구현된 상태</li>
<li class="li1">리눅스 포팅 끝나면 마무리 예정</li>
</ul>
<li class="li1">요즘 이슈 2: 멀티플랫폼</li>
<ul class="ul1">
<li class="li1">각기 다른 OS , 다른 언어 , 다른 I/O API 까지 다 대응하려니 죽겄다…</li>
</ul>
<li class="li1">요즘 이슈 3: 단일서버</li>
<ul class="ul1">
<li class="li1">논리적 단일 서버 -> LAMP (Linux + Apache + Mysql + PHP) </li>
<li class="li1">LAMP로 개발할 경우 : 개발이 빠르고 , 클라우드서버 구성이 쉽고 , 연결 쉽고, 간편하게 scale out 가능</li>
<li class="li1">단점 : 랙랙랙랙랙,,,,, 스토리지 과부하, 계층이 많다보니 속도가 늦어질 수 있다. 그리고 하이젠버그…어휴..</li>
<li class="li1">그치만 개발이 쉽고 연결이 쉽다는 것이 너무 크니까 일단 쓴다</li>
</ul>
<li class="li1">그래서 만들어 본 ! Decision making Tree (자료 참조)</li>
</ul>
</ul>
<div class="p2">
<br /></div>
<ul class="ul1">
<ul class="ul1">
<li class="li1">요즘 이슈 4: 클라우드 서버</li>
<ul class="ul1">
<li class="li1">클라우드 서버가 리얼서버보다 구축비용이 비쌀 수 있으나 유지비용은 싸다</li>
<li class="li1">클라우드 서버는 고정된 DB가 아니기 때문에 매핑 DB가 반드시 필요</li>
</ul>
</ul>
<li class="li1">결론</li>
<ul class="ul1">
<li class="li1">철학과 경험어린 노하우</li>
<ul class="ul1">
<li class="li1">자신이 가장 자신있는 것을 고집하는 것이 정답 (나중에 서비스 때 피본다)</li>
<li class="li1">서버라는 곳에 써먹으려면 충분히!!*100 !! 공부하고 테스트하고 연마하고 안착시키시길..</li>
</ul>
</ul>
</ul>
<div class="p1">
(회사로 테스트하지 마세요..)</div>
<div class="p2">
<br /></div>
<div class="p1">
Q&A</div>
<br />
<ul class="ul1">
<li class="li1">프라우드넷 개인용 버전은 Unity AssetStore에도 올릴 예정 …. 언제될지는 모르겠다</li>
<li class="li1">1인 개발자나 인디개발자가 상용화로 쓰기에는 가격이 부담스러우나, 학생들 비영리 목적으론 사용가능</li>
</ul>
Anonymoushttp://www.blogger.com/profile/06127521281557446949noreply@blogger.com0tag:blogger.com,1999:blog-1395161656837404843.post-4936090583957968212014-04-09T09:15:00.002-07:002016-05-12T02:39:52.841-07:00Unite Korea 2014 1Day 후기오늘 Unite Korea 2014 를 참가했다.<br />
<br />
이걸로 유니티 컨퍼런스 참여 3번째..<br />
<br />
먼저 느낌만 말하자면 규모는 정말 커졌다. 사은품도 다양해진것 같고<br />
<br />
이벤트도 다양하고..<br />
<br />
그리고 삼성전자와 스폰서들이 빵빵해져서 그런지<br />
<br />
" 아 이제 돈좀 벌고 있습니다.." 라고 겉으로 드러나는 느낌이였음<br />
<br />
또한, 이번 컨퍼런스 내 느낌인지 모르겠으나 정말 많은 사람들이 참가했고<br />
<br />
특히, 대학생.고등학생들이 많이 참가한 것을 봐서<br />
<br />
" 유니티가 많이 보급되었고 , 모바일 게임 개발에 있어서 보편화 되었다"<br />
<br />
라고 보여지더이다...<br />
<br />
다만, 작년에는 오전부터 Session 이 있었는데 올해는 이상하게<br />
<br />
오후에만 세션이 몰려 있어서..(뭐지 개발자를 배려한건가..--?)<br />
<br />
뭔가 세션이 쫌 부족하다는 느낌을 지울수 없다능...<br />
<br />
================================================<br />
<br />
각설하고. 전체적으로 유니티4 ~5 넘어가는 시점의 컨퍼런스 였고<br />
<br />
점점 스크립트의 의존도를 낮추고 Simple 하고 그리고 Editor 에 기능을 강화하여<br />
<br />
Editor에서 충분히 할 수 있는 방향성을 띄고 있다..<br />
<br />
아무래도 내년에는 더이상 Unity는 개발자를 위한 엔진과 툴의 범주는<br />
<br />
많이 벗어날 것 같은 느낌이 든다..<br />
<br />
이번 컨퍼런스에서 좋은 점은<br />
<br />
Unity3D와 연동 할 수 있는 많은 Device들이 나왔다는 점.<br />
<br />
특히 삼성의 S Console부터 기술지원 및 다양한 지원을 해주겠다는<br />
<br />
기조연설은 상당히 구미가 당겼다 (여름방학때 심심한데 게임이나 만들자..)<br />
<br />
단, 장소는 정말 잘못선택한듯.. 줄 설만한 공간도 없고..<br />
<br />
인원에 비해 너무 협소했던 느낌을 지울수가 없다..(아니 왜이리 좁은데서해..)<br />
<br />
오히려 작년 건국대학교 에서 했던게 훨씬 좋았었고<br />
<br />
제작년 잠실 롯데호텔이 더 좋았다!!<br />
<br />
장소 선택을 잘해야 할 듯 싶다.<br />
<br />
이상 끝~Anonymoushttp://www.blogger.com/profile/06127521281557446949noreply@blogger.com0tag:blogger.com,1999:blog-1395161656837404843.post-3453121898919161602014-04-09T08:53:00.001-07:002016-05-12T02:39:57.674-07:00Unite Korea 2014 기조연설2 - 삼성 게임 플랫폼<div class="p1">
Samsung Game Platform</div>
<div class="p2">
<br /></div>
<ul class="ul1">
<li class="li1">Group Play SDK 이용하면 멀티스크린 커넥션을 쉽게 할 수 있다.</li>
<li class="li1">삼성전자는 Device Platform 과 SDK 를 제공 할테니까..너네가 만들어줘…</li>
<li class="li1">테블릿이나 PC , TV Device 에 상관없이 연계가 가능하다.</li>
<li class="li1">샘플 게임의 소스 공개도 할 예정</li>
<li class="li1">S Console Concept : Sony 꺼 따라서 하고 있는듯한 느낌…</li>
<li class="li1">삼성전자 제조업체의 특성상 : 무선 컨트롤러 가지고 편의성을 제공해보자</li>
<li class="li1">콘솔 시장이 더딘 이유는 많은 게임들이나 시장이 모바일로 넘어왔다.</li>
<li class="li1">터치류 게임은 문제가 없었으나 아날로그 Key를 활용해야 하는 게임은 문제가 있었다.</li>
<li class="li1">표준이기 때문에 어디서든 작동할 수 있다</li>
<li class="li1">모든 게임이 컨트롤러를 지원해주지는 않는다. </li>
<li class="li1">개발자 고객에게도 지원하고 있다.</li>
<li class="li1">7월 1일에 새로운 버전을 내놓을 예정이며 , 현재 보여준 것들은 안드로이드 마켓에 올라와 있다</li>
</ul>
<div class="p2">
<br /></div>
<div class="p1">
멀티스크린 게임</div>
<ul class="ul1">
<li class="li1">소니나 닌텐도는 전용 콘솔을 갖고 하지만, 삼성은 모든 Device 와 연계헤서 쓸 수 있도록 할 생각이다.</li>
<li class="li1">증강현실 게임 이라던지 그리고 사람들과 연동해서 하는 뷰라던지 이런걸 만드는것을 생각하고 있다</li>
<li class="li1">그래서 삼성 Smart TV랑 연동해서 사용하는 것을 생각하고 있는 것..</li>
<li class="li1">TV가 개입되는 순간 가족친화적이다.</li>
<li class="li1">지원이라는건 : 기술정보 지원 , 기기지원 등</li>
<li class="li1">For Smart TV : HTML5 + JavaScript </li>
<li class="li1">멀티스크린 Unity3D 7월에 포함시킬수 있도록 지원 중</li>
<li class="li1">삼성의 Device 와 유니티의 호환성을 높이기 위해 노력중..</li>
</ul>
<div class="p2">
<br /></div>
<div class="p1">
Group Play Concept</div>
<br />
<ul class="ul1">
<li class="li1">Key Values : 디바이스 간의 커뮤니케이션 , 새로운 게임의 유영 , Multi Connectivity</li>
<li class="li1">Demo Battle Shot : 삼성 앱 스토어에 올라가 있는 게임 : 자이로 이용해서 하는 게임</li>
<li class="li1">SDK 제공중 .. : 기술지원 가능</li>
<li class="li1">http://bit.ly/samsunggames </li>
</ul>
Anonymoushttp://www.blogger.com/profile/06127521281557446949noreply@blogger.com0tag:blogger.com,1999:blog-1395161656837404843.post-61673916540339213362014-04-09T08:51:00.001-07:002016-05-12T02:40:02.859-07:00Unite Korea 2014 2 Session - Unity5 AssetBundle강연자 - Steen Lund<br />
<div>
Unity Core Team Member</div>
<div>
상해지부에서 일하고 있음<br />
<ul class="ul1">
<li class="li1">에셋번들이란?</li>
<li class="li1">에셋번들은 파일 , 여러가지 에셋이 들어가 있는 파일 </li>
<li class="li1">에셋번들을 사용하는 목적 : 설치 용량 줄이기 , 다운로드 가능한 컨텐츠 , 업데이트 콘텐츠</li>
<li class="li1">유니티 4 버전에서 AssetBundle 사용 방법</li>
<ul class="ul1">
<li class="li1">Write editor scripts 스크립트를 통해서만 처리 가능했다</li>
<li class="li1">스크립트로만 할 수 있어서 상당히 복잡했고 , 너무나 쓰기 힘들었다.</li>
<li class="li1">유니티에서도 이거는 알고 있었다.</li>
</ul>
<li class="li1">유니티 4.0 의 경우 하나의 AssetBundle을 바꾸려고 해도 모든것을 다시 빌드해야 했다..</li>
</ul>
<div class="p2">
<br /></div>
<div class="p1">
5.0에서는 어떻게 할 것인가..?</div>
<ul class="ul1">
<li class="li1">Simple to Use : 그래 AssetBundle 사용하기 쉽게 하자</li>
<li class="li1">No Scripting : 스크립트도 필요 없게 할 것이오.. (오…)</li>
<li class="li1">Editor 안에서 가능하게 할 것입니다.</li>
<li class="li1">Handle dependencies : 의존성을 쉽게 핸들링 하게 해줄게요</li>
<ul class="ul1">
<ul class="ul1">
<li class="li1">에셋번들 또는 에셋들 사이에서 의존성을 쉽게 헨들링하도록</li>
</ul>
</ul>
<li class="li1">빌드 타임 개선!!! (Improved Build Times) : 빌드 타임을 빠르게 해드리겠습다</li>
<ul class="ul1">
<ul class="ul1">
<li class="li1">에셋번들 1개만 번경되면 그 번들만 빌드하도록 하겠슴다..오 ..기적이 일어났다!</li>
</ul>
</ul>
</ul>
<div class="p2">
<br /></div>
<div class="p1">
유니티 5.0 의 목표</div>
<ul class="ul1">
<ul class="ul1">
<li class="li1">UI 단순 </li>
<li class="li1">에셋의 의존성은 자동으로 처리 할 것임</li>
<li class="li1">Mainfest File : </li>
<li class="li1">뭐야..낚았어.. 낚았어.. 완벽하지 않데 이런 젠장..</li>
</ul>
</ul>
<div class="p2">
<br /></div>
<div class="p2">
<br /></div>
<div class="p1">
앞으로 개선될 사항</div>
<ul class="ul1">
<li class="li1">Asset Bundle Build Settings Window</li>
</ul>
<div class="p2">
<br /></div>
<div class="p1">
유니티 5 에서 제공될 멀티 씬 Editing </div>
<ul class="ul1">
<li class="li1">게임 세계가 너무 커서 이걸 하나의 씬으로 처리하기 힘들경우.. </li>
<li class="li1">한번에 하나의 씬만 Editing 할 수 있어서 멀티씬 처리가 쉽지는 않았다(협업문제)</li>
</ul>
<div class="p2">
<br /></div>
<ul class="ul1">
<li class="li1">이런걸 해결해주고자 멀티 씬 Editing 기능을 제공</li>
<ul class="ul1">
<li class="li1">RunTime Scene Manager : 런타임 중에 씬 컨트롤 할 수 있는 Manager 제공</li>
<li class="li1">멀티 씬 에디터는 씬들을 트리형태로 관리해주며 Active 씬과 그렇지 않은 씬으로 구분하여 관리 개발한다</li>
<li class="li1">또한 Object 를 만들었을때 관리 중인 모든 씬에 자유롭게 추가가 가능하다</li>
<li class="li1">실행 중에 씬 매니저는 처리 한 것에 대해 저장을 해주기 때문에. 정지하고 다시 확인할 필요가 없다</li>
</ul>
</ul>
</div>
Anonymoushttp://www.blogger.com/profile/06127521281557446949noreply@blogger.com0tag:blogger.com,1999:blog-1395161656837404843.post-29315398368447880702014-04-09T08:46:00.000-07:002016-05-12T02:40:08.237-07:00Unite Korea 2014 1 Session - 코루틴 깊이 알고 재미있게 쓰기- 스킬트리랩 :: 이득우<br />
<br />
코루틴 깊이 알고 재미있게 쓰기<br />
<br />
프롤로그<br />
- 예전에 한건 안할 겁니다...<br />
- 그래서 선택한게 스크립팅 시스템 중에 고른 것이 코루틴<br />
- 코루틴에 대해서 정리해보자<br />
<br />
1. 유니티가 스크립트를 관리하는 방법<br />
<br />
- 모노디밸롭에서 스크립트 파일을 변경<br />
- 에디터에서 스크립트 파일 변경을 감지한 후 컴파일<br />
<br />
- 유니티의 컴파일 하면 bin 폴더 밑에 위치한 mono.exe 컴파일러 실행<br />
- 단지 파일이름으로 컴포넌트를 저장하는 용도로 프로젝트 뷰를 사용<br />
- 컴파일이 수행되면 각기 다른 dll이 생성된다.<br />
- firstPass 폴더에 놓으면 공용 라이브러리 용도로 활용<br />
- Editor 는 필드시 제외<br />
<br />
유니티는 컴파일 이외에도 스크립트 분석 , 컴포넌트별 정보 기록<br />
룩업 테이블에 정보를 저장함. Key Value 형태로 저장<br />
<br />
예약 함수들은 특별 관리 한다. ( Ex) Awake , Start , Update.. etc)<br />
<br />
- 예약 함수중 몇몇은 컴파일 과정에서 추가 검사를 한다. (혹시 예약함수를 쓴건지..)<br />
<br />
즉, 유니티는 2단계로 나누어져서 (컴파일 + 관리단계) 로 진행하는 것 확인 가능<br />
<br />
내부 관리 방법 :: MonoScriptCache<br />
<br />
Key 를 String 으로 저장하고 그 Key를 찾아서 함수를 호출한다.<br />
<br />
SendMessage 그.....렇,....게 느..리..지는 않아요..<br />
<br />
<br />
2. 코루틴이란?<br />
<br />
일반적인 의미<br />
-진입 지점이 여러개인 함수<br />
<br />
코루틴 = 협동 루틴<br />
- 나를 호출하는 애와 데이터 주고받는 협동하는 메카니즘<br />
<br />
유니티에서 코루틴<br />
<br />
- IEnumerator 인터페이스를 반환하는 함수<br />
<br />
유니티에서의 코루틴이란 스크립트와 엔진의 협동 관계<br />
<br />
주는 사람 (프로그래머) --> 받는 사람 (유니티 엔진)<br />
<br />
코루틴이 실행하는 과정<br />
스크립트에서 코루틴 시작 -> 엔진은 yeild 구문 하나 달라고 한다(최소 1개 필요)<br />
-> 검사 후 다음 꺼 호출 -> 그다음 꺼 전달 -> 전달 대기<br />
<br />
코루틴의 분류<br />
- 플래그 설정 류<br />
: 랜더링 루프에서 플래그를 체크하고 실행<br />
- 콜백 호출 류<br />
: 코루틴을 저장해두었다가 작업이 끝나면 호출<br />
<br />
코루틴 수납함<br />
- 코루틴 매니저가 관리하는 일을 표현<br />
- 각종 코루틴들로부터 받은 것들이 모여 있음<br />
<br />
유니티 엔진의 역할은 ?<br />
- 매 프레임마다 매니저에게 물어 봄<br />
- 조건이 만족했는지에 따라 MoveNext 를 호출하기 때문에<br />
Script Execution Order와는 무관하게 동작한다.<br />
<br />
결론<br />
- 쓰레드는 아니고... 신종 기법도 아니고...<br />
- 특정 물체들의 목록을 받기 위한 용도보다 더 많은 기능을 갖고 있다.<br />
- 뭐 그렇게 특별하지는 않다..<br />
<br />
<br />
3. 코루틴의 활용<br />
<br />
- 보는 사람들을 생각하자<br />
- C# 의 객체지향 기능들은 적당히..람다나..린큐 이런건 쫌..<br />
- C# 의 제너릭, Reflection 은 코드를 줄이는 데 큰 도움이 된다.<br />
- 너무 많은 고급 문법의 남발은 보는 사람들의 머리를 아프게 함<br />
- AOT방식의 iOS에서는 고급기능들의 무분별한 사용은 위험할 수 있음(Reflection..)<br />
<br />
- 유니티의 기능을 최대한 활용하자<br />
* 유니티 안에 다른 유니티를 만들지는 맙시다...<br />
<br />
비극은.. 실행 순서를 제대로 몰라서 시작된다....<br />
<br />
4. 유니티 코루틴의 특징<br />
- 문자열 호출 가능<br />
- C# 의 모든 데이터는 String으로 변환<br />
- 내부에 while문을 사용하여 무한 유지 가능<br />
- 게임 오브젝트가 비활성화되면 자동으로 소멸<br />
- 프레임 별로 호출 가능 (yield return null)<br />
- 함수 중간에 대기 가능 (return StartCoroutine)<br />
<br />
<br />
5. 장점<br />
- 코드가 매우 간편<br />
- 초기 플로우가 생소하지만 익숙해지면 생산력 급증<br />
<br />
단점<br />
- 디버깅이 힘듬<br />
<br />
세션 결론<br />
- C# 깊이 안파도 유니티에 좋은 기능이 많습니다.<br />
- 유니티 엔진이 당신을 이끌어줄 리더로 생각하고 맞추세요..편해요<br />
- 정보 공유 활성화 합시다.Anonymoushttp://www.blogger.com/profile/06127521281557446949noreply@blogger.com0tag:blogger.com,1999:blog-1395161656837404843.post-38571473716179431262014-04-04T02:04:00.002-07:002014-04-07T06:43:08.284-07:00하둡 에코시스템<div class="separator" style="clear: both; text-align: center;">
</div>
- 하둡의 비즈니스에 효율적으로 적용할 수 있게 다양한 서브 프로젝트가 제공<br />
- 서브 프로젝트가 상용화 되면서 하둡 에코시스템이 구성<br />
<br />
<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijs5b3XPkhAbWvcxE0W0mtB2Ozn7qWqf7d60W5CYi6c7ObCOxAcK5FfUkI-yb5Tla3AaoV5NO4Y-iA5CFjV9PRe0gL2VZPZN_zhD5IMEfcxE-wDgArzleXWr9zhfk7wCQ3hWR5UNQ2s6c/s1600/%EA%B7%B8%EB%A6%BC1.2_NEW.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijs5b3XPkhAbWvcxE0W0mtB2Ozn7qWqf7d60W5CYi6c7ObCOxAcK5FfUkI-yb5Tla3AaoV5NO4Y-iA5CFjV9PRe0gL2VZPZN_zhD5IMEfcxE-wDgArzleXWr9zhfk7wCQ3hWR5UNQ2s6c/s1600/%EA%B7%B8%EB%A6%BC1.2_NEW.jpg" height="476" width="640" /></a><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
분산 코디네이터 (Zookeeper)<br />
- 분산 환경에서 서버 간의 상호 조정이 필요한 다양한 서비스를 제공하는 시스템<br />
- 하나의 서버에만 서비스가 집중되지 않게 서비스를 알맞게 분산해 동시에 처리<br />
- 하나의 서버에서 처리한 결과를 다른 서버와도 동기화해서 데이터 안정성 보장<br />
- 분산 환경을 구성하는 서버들의 환경설정을 통합적 관리 지원<br />
<br />
워크 플로우 관리(Oozie)<br />
- 하둡 작업을 관리하는 워크플로우 및 코디네이터 시스템<br />
- 자바 서블릿 컨테이너에서 실행되는 자바 웹 어플리케이션 서버<br />
- 맵리듀스 작업이나 피그 작업 같은 특화된 액션으로 구성된 워크 플로우 제어<br />
<br />
분산 데이터 베이스(HBase)<br />
- HDFS 기반의 칼럼 기반 데이터베이스<br />
- 구글의 BigTable 논문을 기반으로 개발됨<br />
- 실시간 랜덤 조회 및 업데이트가 가능<br />
- 각 프로세스는 개인의 데이터를 비동기적으로 업데이트할 수 있음<br />
<br />
데이터 분석 (Pig)<br />
- 야후 에서 개발됐으나 현재는 아파치 프로젝트에 속한 프로젝트<br />
- 복잡한 맵리듀스 프로그래밍을 대체할 pig Latin 이라는 자체 언어 제공<br />
- 맵리듀스 API를 크게 단순화 , SQL과 유사한 형태로 설계<br />
- SQL 과 유사하기만 하다! 기존 SQL지식 활용 어려움<br />
<br />
데이터 분석 (Hive)<br />
- 하둡 기반의 데이터웨어하우징용 솔루션<br />
- 페이스북에서 개발됨<br />
- 오픈소스로 공개되어 있음<br />
- SQL과 매우 유사한 HiveQL 쿼리 제공<br />
<br />
Sqoop<br />
- 대용량 데이터 전송 솔루션<br />
<br />
Impala<br />
- 클라우데라에서 개발한 하둡 기반의 실시간 SQL 질의 시스템<br />
- 맵리듀스를 사용하지 않음<br />
- 자체 개발 엔진 사용하여 빠른 성능을 보여줌<br />
- 데이터 조회를 위한 인터페이스로 HiveQL 사용<br />
- HBase 와도 연동 가능<br />
<br />
Tajo<br />
- 고려대학교 박사 과정 학생들이 주도해서 개발한 하둡 기반의 DW시스템<br />
- 2013년 아파치 재단의 인큐베이터 프로젝트로 선정 (현재 최상위 프로젝트로 승격)<br />
관련 기사 : http://www.ddaily.co.kr/news/article.html?no=116975<br />
- 임팔라가 클라우데라의 하둡을 써야하는 제약이 있는 반면 타조는 종속이 없음<br />
- Hive 보다는 2~3배 빠르며 임팔라와 속도가 비슷함<br />
<br />Anonymoushttp://www.blogger.com/profile/06127521281557446949noreply@blogger.com0tag:blogger.com,1999:blog-1395161656837404843.post-91659475301271387952014-04-04T01:18:00.000-07:002014-04-07T06:42:13.306-07:00NoSQL 제 2 강 NoSQL 제 2 강<br />
<br />
<h3>
<b>- 빅 데이터 란?</b></h3>
빅데이터에 대한 정의가 명확하지는 않으나. 정리를 해보겠습니다.<br />
<br />
빅데이터는 기존의 데이터베이스 로 수집, 분석 , 관리 할 수 있는 역량을 넘어서는<br />
<br />
대량의 정형 또는 비정형 데이터를 분석하여 가치를 창출해 내는 기술이라고 보여집니다.<br />
<br />
즉, 쉽게 설명하여 "어질러져 있는 Data 더미 속에서 보석을 찾아낸다" 라는 의미로<br />
<br />
이해를 하면 좀 더 쉬울까요?<br />
<br />
그럼 BigData 의 3요소를 보도록 하겠습니다.<br />
<br />
빅데이터의 3요소는 Volume , Velocity , Variety 이렇게 3가지가 있는데요<br />
<br />
이 3가지 요소는 각각의 특징을 가지고 있습니다.<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioiQFKWPy5C2Qa4fRsdn8aLYoQ6pyXOZ53hMbtz4DSrdKCm8dtdPasDliitMMZqKadAFzr9E37CY-2YktjCOqMEhaeGW5wO7jgTVUmj0eIkR2-K8AqGU3Sya6RAP3RAaqkucxVsF9VaMA/s1600/BIgData_3ways.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioiQFKWPy5C2Qa4fRsdn8aLYoQ6pyXOZ53hMbtz4DSrdKCm8dtdPasDliitMMZqKadAFzr9E37CY-2YktjCOqMEhaeGW5wO7jgTVUmj0eIkR2-K8AqGU3Sya6RAP3RAaqkucxVsF9VaMA/s1600/BIgData_3ways.jpg" height="303" width="400" /></a><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
1. Volume(크기)<br />
<br />
- 수십 테라바이트(terabyte) , 수십 페타바이트(petabyte) 이상이 해당함.<br />
- 기존 파일 시스템에 이러한 Data를 저장하기는 어려움<br />
- 기존 분석 솔루션에서 소화하기 어려울 정도로 데이터 양이 급증<br />
- 이러한 문제 해결을 위해서는 분산 컴퓨팅 기법으로 접근해야 함<br />
- 현재 존재하는 분산 컴퓨팅 솔루션은 GFS(Google File System) , 하둡 등이 있음<br />
<br />
2. Velocity(속도)<br />
<br />
- 빅 데이터 속도의 특징은 실시간 처리와 장기적 접근 2가지로 존재<br />
- 오늘날 빠른 속도로 생성되는 SNS와 같은 Data들은 실시간 처리가 필요<br />
- 스마트폰 기기의 보급으로 Data에 대한 저장,분석 등이 실시간으로 처리되야함.<br />
- 수집된 대량의 Data를 분석하는 기술들도 필요함.<br />
- 데이터마이닝, 기계학습, 자연어처리 , 패턴인식 등이 분석 기법에 해당함<br />
<br />
3. Variety(다양성)<br />
<br />
- 빅 데이터를 이루는 Data의 종류는 다양함<br />
- 빅 데이터는 비정형 데이터도 처리할 수 있는 능력을 갖춰야 함.<br />
<br />
이 3대 요소를 모두 갖추었을 때 BigData 기술이라 할 수 있음<br />
<br />
<h3>
하둡이란?</h3>
<div>
<br /></div>
<div>
그럼 빅 데이터를 소개 할 때 함께 소개되는 하둡에 대해서 한 번 살펴보자.</div>
<div>
<br /></div>
<div>
<b>하둡의 시작..</b></div>
<div>
<br /></div>
<div>
- 하둡은 2005년에 더그 커팅과 마이크 케퍼렐라가 개발함</div>
<div>
- 하둡은 오픈소스 웹 검색 엔진인 너치(Apache Nutch)에 적용하기 위해 시작</div>
<div>
- 이후 독립적인 프로젝트로 만들어 짐</div>
<div>
- 2008년에 아파치 최상위 프로젝트로 승격 됨</div>
<div>
- 하둡은 분산 파일 시스템인 HDFS(Hadoop Distributed File System)에 데이터를 저장</div>
<div>
- 분산 처리 시스템인 맵리듀스를 이용해 Data를 처리</div>
<div>
<br /></div>
<div>
<b>하둡..하둡?</b></div>
<div>
<br /></div>
<div>
- 하둡의 공식 사이트 : http://hadoop.apache.org/</div>
<div>
- 하둡의 로고 : 노란 코끼리(별 의미 없다.. 지 아들이 갖고놀던 장난감 코끼리 이름이여..)</div>
<div>
- 코끼리가 빅데이터를 상징하는 동물이 됨</div>
<div>
- 2011년 야후에서 하둡을 지원하기 위해 기업의 이름을 지을 때도 동화에 나오는</div>
<div>
코끼리 이름을 따서 회사 이름을 지음.. 그것이 바로 호튼웍스(Hortonworks)!!!!</div>
<div>
<br /></div>
<div>
<b>그럼 왜 하둡을 쓸까?</b></div>
<div>
<br /></div>
<div>
1. 오픈소스라 부담이 없다..(오픈소스 만세)</div>
<div>
<br /></div>
<div>
2. 분산 컴퓨팅 방식을 통해서 효율성을 높일 수 있다.</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<b>하둡의 발전 과정..</b></div>
<div>
<br /></div>
<div>
- 이 얘기를 하려면 구글 얘기를 안할 수가 없다..</div>
<div>
- 구글은 2003년에 인터넷 서비스 기술을 강화하기 위해 개발한 GFS(Google File System)을</div>
<div>
발표</div>
<div>
- 2004년에 맵리듀스를 발표한다.</div>
<div>
- 오픈소스 검색 엔진 너치(Nutch)를 개발 중이던 더그 커팅과 마이크 캐퍼렐라는 </div>
<div>
구글 논문을 접한 이후 2005년에 이를 자바로 구현하기 시작.</div>
<div>
- 이렇게 개발된 것이 하둡이며 , 너치의 하위 프로젝트 였다가 최상위로 올라간 것임</div>
<div>
<br /></div>
<div>
- 하둡은 보안 기능 강화와 서비스의 안정성 확보를 주요 발전 방향으로 삼아 왔음</div>
<div>
<br /></div>
<div>
<h4>
<b>하둡 정식 1.0 버전의 기능</b></h4>
</div>
<div>
<br /></div>
<div>
<b>1. 보안 기능 제공 </b></div>
<div>
- 하둡은 커베로스(Kerberos) 인증을 통해 네트워크 전체에 걸쳐 보안 확보가 가능</div>
<div>
<br /></div>
<div>
※ 커베로스 란?</div>
<div>
<span style="font-size: x-small;">- <b style="background-color: white; color: #252525; font-family: Arimo, 'Liberation Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 21px;">커베로스</b><span style="background-color: white; color: #252525; font-family: Arimo, 'Liberation Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 21px;">(Kerberos)는 "티켓"(ticket)을 기반으로 동작하는 </span>컴퓨터 네트워크<span style="background-color: white; color: #252525; font-family: Arimo, 'Liberation Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 21px;"> </span>인증<span style="background-color: white; color: #252525; font-family: Arimo, 'Liberation Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 21px;"> </span>암호화 프로토콜<span style="background-color: white; color: #252525; font-family: Arimo, 'Liberation Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 21px;">로서 </span></span><br />
<span style="font-size: x-small;"><span style="background-color: white; color: #252525; font-family: Arimo, 'Liberation Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 21px;"> 비보안 네트워크에서 통신하는 </span><a href="http://ko.wikipedia.org/wiki/%EB%85%B8%EB%93%9C" style="background-color: white; background-image: none; color: #0b0080; font-family: Arimo, 'Liberation Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 21px; text-decoration: none;" title="노드">노드</a><span style="background-color: white; color: #252525; font-family: Arimo, 'Liberation Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 21px;">가 보안 방식으로 다른 노드에 대해 식별할 수 있게 허용한다. </span></span></div>
<div>
<span style="font-size: x-small;"> 클라이언트 서버 모델<span style="background-color: white; color: #252525; font-family: Arimo, 'Liberation Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 21px;">을 목적으로 개발되었으며 사용자와 서버가 서로 식별할 수 있는 </span><span style="background-color: white; color: #252525; font-family: Arimo, 'Liberation Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 21px;">양방향 인증을</span></span></div>
<div>
<span style="font-size: x-small;"><span style="background-color: white; color: #252525; font-family: Arimo, 'Liberation Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 21px;"> 제공한다. </span></span></div>
<div>
<span style="font-size: x-small;"><span style="background-color: white; color: #252525; font-family: Arimo, 'Liberation Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 21px;"><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2sCy3pTD-L5KFyq3amcr5t18r6Nn9uvTM8bP175V1kz6W50z0qDiGELbaP3J9L1zMPXEIFauQJ1MSII4WsQmLcXEoj2XcEXkos9v2t0IR_2h28Xx9_y2DPJtkKyBnZoPpLQJWMfiHCCk/s1600/kerberos.gif" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2sCy3pTD-L5KFyq3amcr5t18r6Nn9uvTM8bP175V1kz6W50z0qDiGELbaP3J9L1zMPXEIFauQJ1MSII4WsQmLcXEoj2XcEXkos9v2t0IR_2h28Xx9_y2DPJtkKyBnZoPpLQJWMfiHCCk/s1600/kerberos.gif" height="236" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">커베로스의 데이터 전송 방법</td></tr>
</tbody></table>
</span></span></div>
<div>
<span style="font-size: x-small;"><span style="background-color: white; color: #252525; font-family: Arimo, 'Liberation Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 21px;"><b>2. WebHDFS REST API 제공</b></span></span></div>
<div>
<span style="font-size: x-small;"><span style="background-color: white; color: #252525; font-family: Arimo, 'Liberation Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 21px;"> - 웹 기술을 이용해 하둡을 잘 모르는 관리자와 개발자들이 하둡을 더 쉽게 사용하도록 함</span></span></div>
<div>
<span style="font-size: x-small;"><span style="background-color: white; color: #252525; font-family: Arimo, 'Liberation Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 21px;"><br /></span></span></div>
<div>
<span style="font-size: x-small;"><span style="background-color: white; color: #252525; font-family: Arimo, 'Liberation Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 21px;"> ※ REST API 참조 : </span></span><span style="color: #252525; font-family: Arimo, Liberation Sans, Helvetica Neue, Helvetica, Arial, sans-serif; font-size: x-small;"><span style="line-height: 21px;">http://bcho.tistory.com/321 (조대협의 블로그)</span></span></div>
<div>
<span style="color: #252525; font-family: Arimo, Liberation Sans, Helvetica Neue, Helvetica, Arial, sans-serif; font-size: x-small;"><span style="line-height: 21px;"><br /></span></span></div>
<div>
<br /></div>
<div>
<span style="color: #252525; font-family: Arimo, Liberation Sans, Helvetica Neue, Helvetica, Arial, sans-serif; font-size: x-small;"><span style="line-height: 21px;">하둡은 2.0 올해 초 2014년 2월 27일에 공식 출시했다고 밝혔으며</span></span></div>
<div>
<span style="color: #252525; font-family: Arimo, Liberation Sans, Helvetica Neue, Helvetica, Arial, sans-serif; font-size: x-small;"><span style="line-height: 21px;"><br /></span></span></div>
<div>
<span style="color: #252525; font-family: Arimo, Liberation Sans, Helvetica Neue, Helvetica, Arial, sans-serif; font-size: x-small;"><span style="line-height: 21px;">현재 2.3 버전까지 릴리즈 버전이 나와 있다.</span></span></div>
<div>
<span style="color: #252525; font-family: Arimo, Liberation Sans, Helvetica Neue, Helvetica, Arial, sans-serif; font-size: x-small;"><span style="line-height: 21px;"><br /></span></span></div>
<div>
<span style="color: #252525; font-family: Arimo, Liberation Sans, Helvetica Neue, Helvetica, Arial, sans-serif; font-size: x-small;"><span style="line-height: 21px;">2.0에 대해서는 나중에 자세히 언급하도록 하자</span></span></div>
<div>
<span style="color: #252525; font-family: Arimo, Liberation Sans, Helvetica Neue, Helvetica, Arial, sans-serif; font-size: x-small;"><span style="line-height: 21px;"><br /></span></span></div>
<div>
<h3>
<span style="color: #252525; font-family: Arimo, Liberation Sans, Helvetica Neue, Helvetica, Arial, sans-serif;"><span style="font-size: large; line-height: 21px;"><b>하둡 배포판 살펴보기</b></span></span></h3>
<span style="color: #252525; font-family: Arimo, Liberation Sans, Helvetica Neue, Helvetica, Arial, sans-serif; font-size: x-small;"><span style="line-height: 21px;"><br /></span></span>
<span style="color: #252525; font-family: Arimo, Liberation Sans, Helvetica Neue, Helvetica, Arial, sans-serif; font-size: x-small;"><span style="line-height: 21px;">1. 클라우데라 - CDH</span></span><br />
<span style="color: #252525; font-family: Arimo, Liberation Sans, Helvetica Neue, Helvetica, Arial, sans-serif; font-size: x-small;"><span style="line-height: 21px;"> - 거의 모든 하둡 에코시스템이 포함되어 있음</span></span><br />
<span style="color: #252525; font-family: Arimo, Liberation Sans, Helvetica Neue, Helvetica, Arial, sans-serif; font-size: x-small;"><span style="line-height: 21px;"> - 아파치 하둡 배포판을 사용하지 않을 경우 , 대부분의 업체가 CDH를 고려할 정도로 신뢰도가 높음</span></span><br />
<span style="color: #252525; font-family: Arimo, Liberation Sans, Helvetica Neue, Helvetica, Arial, sans-serif; font-size: x-small;"><span style="line-height: 21px;"><br /></span></span>
<span style="color: #252525; font-family: Arimo, Liberation Sans, Helvetica Neue, Helvetica, Arial, sans-serif; font-size: x-small;"><span style="line-height: 21px;">2. 호튼웍스(Hortonworks) - HDP</span></span><br />
<span style="color: #252525; font-family: Arimo, Liberation Sans, Helvetica Neue, Helvetica, Arial, sans-serif; font-size: x-small;"><span style="line-height: 21px;"> - 다양한 에코시스템이 포함됨 (전부는 아님)</span></span><br />
<span style="color: #252525; font-family: Arimo, Liberation Sans, Helvetica Neue, Helvetica, Arial, sans-serif; font-size: x-small;"><span style="line-height: 21px;"> - 다양한 개발형 REST API가 제공</span></span><br />
<span style="color: #252525; font-family: Arimo, Liberation Sans, Helvetica Neue, Helvetica, Arial, sans-serif; font-size: x-small;"><span style="line-height: 21px;"> - 설치, 관리 작업 시스템도 함께 제공됨</span></span><br />
<span style="color: #252525; font-family: Arimo, Liberation Sans, Helvetica Neue, Helvetica, Arial, sans-serif; font-size: x-small;"><span style="line-height: 21px;"><br /></span></span>
<span style="color: #252525; font-family: Arimo, Liberation Sans, Helvetica Neue, Helvetica, Arial, sans-serif; font-size: x-small;"><span style="line-height: 21px;">3. MapR 테크놀로지스 - MapR EDITIONS</span></span><br />
<span style="color: #252525; font-family: Arimo, Liberation Sans, Helvetica Neue, Helvetica, Arial, sans-serif; font-size: x-small;"><span style="line-height: 21px;"> - MapR 은 성능 개선을 위해 자바에 C를 더한 것이 특징</span></span><br />
<span style="color: #252525; font-family: Arimo, Liberation Sans, Helvetica Neue, Helvetica, Arial, sans-serif; font-size: x-small;"><span style="line-height: 21px;"><br /></span></span>
<span style="color: #252525; font-family: Arimo, Liberation Sans, Helvetica Neue, Helvetica, Arial, sans-serif; font-size: x-small;"><span style="line-height: 21px;">4. 아마존 - EMR</span></span><br />
<span style="color: #252525; font-family: Arimo, Liberation Sans, Helvetica Neue, Helvetica, Arial, sans-serif; font-size: x-small;"><span style="line-height: 21px;"> - 아마존의 클라우드 컴퓨팅 서비스</span></span><br />
<span style="color: #252525; font-family: Arimo, Liberation Sans, Helvetica Neue, Helvetica, Arial, sans-serif; font-size: x-small;"><span style="line-height: 21px;"><br /></span></span>
<span style="color: #252525; font-family: Arimo, Liberation Sans, Helvetica Neue, Helvetica, Arial, sans-serif; font-size: x-small;"><span style="line-height: 21px;">5. HStreaming - HStreaming</span></span><br />
<span style="color: #252525; font-family: Arimo, Liberation Sans, Helvetica Neue, Helvetica, Arial, sans-serif; font-size: x-small;"><span style="line-height: 21px;"> - 하둡 기반의 실시간 데이터 분석 플랫폼 </span></span></div>
Anonymoushttp://www.blogger.com/profile/06127521281557446949noreply@blogger.com0