분류 전체보기
-
가상화 기본 개념 정리인프라기본 2023. 3. 2. 15:38
가상화- 클라우드를 구성하는 핵심 기술임- 물리적인 하드웨어 장치를 논리적인 객체로 추상화함- 하나의 자원을 여러개 처럼 동작시키거나 반대로 여러개를 묶어 하나의 장치처럼 쓸 수 있게하여 효율적인 자원 관리를 도움 1세대부터 거슬러 올라가보자 우선 os 개념부터 짚어보면, 시스템 하드웨어 자원과 소프트웨어 자원을 운영 관리하는 프로그램임 os는 특권 명령 때문에 하나의 하드웨어 시스템당 하나밖에 돌아갈 수 없음* 특권 명령 : 시스템 요소들과 소통할 수 있는 명령인데, os만 가능함가상화가 나타나기 전까진 하나의 하드웨어 시스템 - 하나의 os만 실행이 가능했음 1세대- 완전 가상화- 모든 시스템 요소가 에뮬레이터 안에서 돌아감- os가 여러개로 쪼개져서 가상화가 맞긴한데 엄청나게 느림 2세대- Para..
-
[AWS] VPC 구성의 기본 개념클라우드/AWS 2023. 3. 1. 21:21
네트워크 선수 지식 - ip주소는 네트워크 주소 + 호스트 주소 - 각각을 옥탯이라 하고, 각 옥탯별로 0~255개의 범위이다 - a클래스 : 옥탯 1까지가 네트워크 아이디 + 나머지 옥탯은 호스트 아이디 - b클래스 : 옥탯 2까지 네트워크 아이디 - c클래스 : 옥탯 3까지 네트워크 아이디 -> 하지만 이런 클래스 별로 아이피 할당하는 방식은 사라지고 서브넷 마스크를 사용하기 시작함 -> a클래스는 /8, b클래스는 /16, c클래스는 /24 CIDR - ipv4 주소를 보다 효율적으로 사용함 - xxx.xxx.xxx.xxx/yy - 예를 들어 192.168.0.0/24면,앞에 8 * 3 = 24바이트는 고정이고 나머지 8바이트만 0~255의 범위를 가진다 VPC - vpc는 클라우드의 논리적으로 격..
-
[ToyProject] AWS를 이용한 얼굴 인식 시스템 #2클라우드/ToyProject 2023. 2. 26. 16:02
- lambda1. S3uploadLambda -> sns 주제인 request에 publish2. RekogLambda -> rekognition 수행 후 notify에 publish3. SlackLambda -> notify구독하고 있다가 결과를 slack에 전송 - SNS주제 2가지를 생성 1. S3uploadLambda- 람다 생성할 때 블루프린트 이용함 -> 트리거할 s3 등록- s3에 사진이 업로드 되면 트리거가 되어 해당 람다함수를 실행함- 람다함수는 doorlock_request topic에 등록된 사진의 이름을 publish함- 역할 RoleForS3uploadLambda 부여 2. RekogLambda- 블루프린트 이용하여 함수 생성- sns가 트리거가 되어 해당 람다 함수 실행- ..
-
[ToyProject] AWS를 이용한 얼굴 인식 시스템 #1클라우드/ToyProject 2023. 2. 26. 15:59
프로젝트 설명- 웹 브라우저에서 사진을 업로드하면 lambda에서 aws rekognition api를 호출하여 등록된 사진과 비교 후 결과를 slack에 전송- 사용한 aws 서비스: ec2, lambda, sns , iot, s3, rekognition,iam 1. 웹 브라우저 구성2. S3 버킷 생성- 버킷을 생성하고 미리 등록할 사진을 올려둠- 퍼블릭 액세스 허용- 버킷에 사진이 업로드 되면 해당 람다 함수로 이벤트 알림 보내기- 버킷 정책 허용 3. 브라우저에서 S3로 사진 업로드 설정하기 1) cors- 브라우저의 scipt로 s3 버킷에 접근하려면 cors를 설정해줘야함- cors : cross-site http request 가능하게 함 / 다른 도메인에서 어떤 http request..
-
[AWS] Lambda - zip 파일로 코드 올리기클라우드/AWS 2023. 2. 23. 18:47
람다함수에서 코드 조작하는 방법은 총 3가지 방법이 있다. 1. 콘솔창에서 직접 조작 2. zip파일 업로드 3. s3이용 코드를 실행하는데 module import 에러가 나서 zip파일로 node_modules, package.json까지 한꺼번에 묶어서 올렸다. 압축할때는 되도록 명령어를 이용하라고 공식문서에 나와있다. 10MB를 초과하면 s3을 이용해서 업로드 해야한다. 그리고 중요한거 !!!!!!! 핸들러 경로를 수정해줘야함 내가 만든 zip파일명 아래에 저렇게 index.handler를 설정해줘야 경로를 올바르게 잡아준다. + 추가로, 나는 node_modules도 같이 올리려고 zip파일로 올린건데 다른 방법으로 layer를 추가하는 방법도 있다. node_modules자체를 zip으로 묶은..
-
[ToyProject] AWS를 이용한 ParkingSystem클라우드/ToyProject 2023. 1. 23. 21:59
카메라 모듈 : 라즈베리파이 사용 - camera.js : 차량의 번호판이 찍힐 수 있는 최소 거리를 미리 설정, 초음파 센서를 이용하여 차량이 감지되었을 때 카메라 모듈을 이용하여 차량의 번호판을 촬영하고 S3에 이미지 업로드 후 ‘carRecog/request’ 토픽으로 publish - index.js : ‘carRecog/request’ 토픽으로 메시지가 들어오면 람다 함수 호출되어 rekognition 실행 후 ‘carRecog/detect/car’ 토픽으로 publish - manage.js : ‘carRecog/detect/car’ 토픽을 subscribe 하고 있다가 메시지가 들어오면 차량 번호와 데이터베이스 비교 후 입차, 출차 처리 1. node.js ..
-
-
[Android] DataBindingAndroid 2022. 10. 15. 15:11
findViewById - 실시간으로 모든 리소스 트리를 뒤져서 해당 데이터를 찾아가야 함 - 실행도중에 발생하는 일이라 프로그램의 수행이 느리게 됨 -> 미리 바인딩 시켜놓고 직접 참조하면 일일이 찾아갈 필요가 없기 때문에 검색 오버레드가 줄어들음 데이터 바인딩 사용하기 1. build.gradle 파일 수정 dataBinding{ enabled = true } 2. xml 파일 수정 - layout 태그로 전체를 감싸줌 - 데이터 바인딩의 사용설정을 해주면 레이아웃xml 파일과 연결되어 자동으로 설계되는 바인딩 클래스가 만들어짐 3. 요소 - 뷰들과 연결되어 보여줄 데이터를 가진 데이터 클래스 지정후 레이아웃 파일 안에서 사용할 식별명 정해주는 요소 출처: https://kitesoft.tistory..