data-system-wiki / designing-data-intensive-applications Goto Github PK
View Code? Open in Web Editor NEW[데이터 중심 애플리케이션 설계 ] 북 스터디의 Summary Note와 자료 모음집입니다.
[데이터 중심 애플리케이션 설계 ] 북 스터디의 Summary Note와 자료 모음집입니다.
stateful과 stateless는 process(application)의 설계 패턴을 구분하는 말로서, 아래 두 그림을 비교해서 보자.
오른쪽 그림부터 보면, 오른쪽 그림은 내부에 8이라는 값(state)이 저장되어 있고, add를 수행하면 해당 값을 불러와서 해당값에 더하는 연산을 수행한다. 이렇게 내부에 값을 따로 보관해서 매 연산마다 해당 값에 따라 결과값이 결정되는 함수를 stateful하다고 말한다. 왼쪽 그림같은 경우, 내부에 보관하는 값이 없고, 오로지 입력값에 의해서만 결과값이 결정되기 때문에 이러한 함수를 stateless하다고 말한다.
위와 같이 UI 프로그램을 설계할 때나, REST API를 설계할 때, Stateful하냐, Stateless하냐에 따라 달라진다. 장단점을 나누어 본다면, 아래와 같다
링크드인 이력서가 아래와 같이 구성되어 있다고 생각해보자.
{
"user_id": 251,
"first_name": "Bill",
"last_name": "Gates",
"summary": "Co-chair of the Bill & Melinda Gates... Active blogger.", "region_id": "us:91",
"industry_id": 131,
"photo_url": "/p/7/000/253/05b/308dd6e.jpg",
"organization": "Microsoft"
}
현재 organization
은 문자열로 저장되어 있다. 이 정보도 문자열 대신 엔티티로 참조하면 어떨까? 엔티티로 참조한다는 것은, 각 organization
와 school_name
에 대한 여러 정보들(조직의 로고, 조직원의 수 등)과 관련을 맺을 수 있음을 의미한다. 예를 들어 organization
에 대한 엔티티가 아래와 같이 구성되어 있다고 생각해보자.
{
"Name": "Microsoft",
"ISIN" : "US5949181045",
"Founded": "April 4, 1975",
"Founders": "Bill Gates"
}
이력서 json에서 organization 엔티티를 참조한다면, 아래와 같이 될 것이다.
{
"user_id": 251,
"first_name": "Bill",
"last_name": "Gates",
"summary": "Co-chair of the Bill & Melinda Gates... Active blogger.", "region_id": "us:91",
"industry_id": 131,
"photo_url": "/p/7/000/253/05b/308dd6e.jpg",
"organization": {
"Name": "Microsoft",
"ISIN" : "US5949181045",
"Founded": "April 4, 1975",
"Founders": "Bill Gates"
}}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.