1/10 월
학습한 것들:
We use cloud service so that the server is up 24 hours.
Serverless computing: the server is controlled by the cloud by uploading the code to the cloud
Stateless Container: docker image-based server
Object Storage: can store many types of files
Database: for web/app
Data Warehouse: database for data analysis
CI: automating build and testing
CD: automating deployment
Workflow: the topmost unit that controls GitHub Action
Job: a combination of steps that can run both in parallel and in order and they can have a dependency on each other
Step: operation running on the job, able to run shell command and execute an action, and the data is shared across the job
Action: a collection of step that is reusable
Runner: server that runs workflow, can be hosted by GitHub or own server
Monolithic Architecture: all things are done by one server
Microservice Architecture(MSA): make different servers do different jobs and communicate by request
HTTP(Hyper Text Transfer Protocol): a protocol that needs to be kept in order to exchange information
REST API: work by CRUD(Create, Read, Update, Delete)
- client: a platform that requests action
- resource: unique ID resource(URI)
- URL(Uniform Resource Locator): location of the resource on the internet
- URI(Uniform Resource Indicator): a string that is used to identify resources
- URI contains URL
- method: ways to request the server
- GET: 정보를 요청
- by putting data in the URL and header
- vulnerable because the data is in the URL and head
- able to be cached
- POST: 정보를 입력
- submit data to add or modify
- data is not in the URL
- data is in the body
- safer compared to GET
- Not able to be cached
- need architecture to cache
- PUT: 정보를 업데이트
- PATCH: 정보를 업데이트
- DELETE: 정보를 삭제
- GET: 정보를 요청
HTTP protocol saves the information to a packet when sending or receiving
- packet: header + body
- header: address, receiving address, time
- body: actual content that is to be sent
Status code: how the server reacts to the request
- 1xx: got request, continue process
- 2xx: got request, executing
- 3xx: need more jobs to be completed to complete the request
- 4xx: grammar wrong or cannot process request
- 5xx: the server failed in regard to the request
IP(Internet Protocol): the address of the PC that is connected to the network
- IPv4 consists of 4 blocks of number
- can represent $2^{32}$ addresses
- IPv6 released to increase the number
- 127.0.0.1: localhost
- 0.0.0.0, 255.255.255.255: broadcast address that communicates with all the devices connected to the local network
Port: channel that can access the PC
- cannot have duplicate port
- 0 to 65535
- 0~1024 is set for the communication protocol
- 22: SSH
- 80: HTTP
- 443: HTTPS
FastAPI: python web framework
- fast, easy, and productive
- built-in API documentation
Poetry: dependency management tool
- dependency resolver to prevent dependency version error
- virtualenv for an isolated environment
- able to build and publish
Path Parameter: GET method with value directly on the path
Query Parameter: GET method that gives key-value pair to pass many data
Client to API: Request Body
API to Client: Response Body
- By using response_model in the decorator, output data is modified with that description
- auto-documentation and data validation
There is a field in the Header called Content-Type that tells what type of data is passed
Form: allows to get Form data from the request
File Uploading: need to use python-multipart
Pydantic: data validation/settings management library
- forces type hinting
- validation for normal python types
- faster than other libraries
- config management
Event Handler: a function that is called when some event is happening
API Router: using multiple APIs together
Error Handling: the developer needs to collect a log of errors happening to the client
- use HTTPExceptiojn to tell the client to recognize what is happening
Background Tasks: allows for an immediate response without waiting for full execution
- use the GET method later to the stored task to find out if the task is completed
Types of data:
- database data: data needed for service
- user action log: data obtained from the user's action
- not necessarily needed for the service, but it is for analysis
- infrastructure data: a metric that checks if the web server is working well
- number of requests and response
- DB overloading
Trace: log for development
Method of saving the data:
- saving in the database(RDB): reusable in the service
- rows and columns
- define the relation between data and do data modeling
- important data related to the business
- use SQL to extract data
- saving in the database(NoSQL): using elastic search, logstash or fluent, kibana
- loose schema
- fast read and write speed
- saving in the object storage: saving as a file in S3 or Cloud Storage
- can save any type of data
- needs work to move to a separate database or data warehouse
- saving in data warehouse: used for data analysis instantly
- save RDBMS, NoSQL, and Object Storage at once
DEBUG: logging information to solve a problem
INFO: working well
WARNING: potential problem
ERROR: cannot execute function
CRITICAL: the program does not work
Logger: a method for creating the log
Hander: send the log to a certain location, which could be saved or sent
Formatter: set the style of log
'잡다한 것들 > 부스트캠프 AI Tech 4기' 카테고리의 다른 글
부스트캠프 AI Tech 4기를 마치며... feat. 부캠 참가를 고려하시는 분들을 위해 (0) | 2023.03.01 |
---|---|
부스트캠프 14주차 학습 일지 - Semantic Segmentation (0) | 2022.12.19 |
부스트캠프 12주차 학습 일지 - 데이터 제작 (0) | 2022.12.05 |
부스트캠프 9주차 학습 일지 - Object Detection 1 (0) | 2022.11.14 |
부스트캠프 8주차 학습 일지 - AI 서비스 개발 기초 (0) | 2022.11.07 |