NHN NEXT 게임 서버 프로그래밍 강의 자료입니다. 최소한의 필요한 이론 내용은 질문 위주로 구성되어 있고 (답은 학생들 개별로 고민해와서 피드백 받는 방식) 해당 내용에 맞는 실습(구현) 과제가 포함되어 있습니다.
참고로, 서버 아키텍처에 관한 과목은 따로 있어서 본 강의에는 포함되어 있지 않습니다.
NHN NEXT 게임 서버 프로그래밍 강의 자료입니다. 최소한의 필요한 이론 내용은 질문 위주로 구성되어 있고 (답은 학생들 개별로 고민해와서 피드백 받는 방식) 해당 내용에 맞는 실습(구현) 과제가 포함되어 있습니다.
참고로, 서버 아키텍처에 관한 과목은 따로 있어서 본 강의에는 포함되어 있지 않습니다.
Spark Streaming allows for scalable, high-throughput, fault-tolerant stream processing of live data streams. It works by chopping data streams into batches, treating each batch as an RDD, and processing them using RDD transformations and operations. This provides a simple abstraction called a DStream that represents a continuous stream of data as a series of RDDs. Transformations applied to DStreams are similarly applied to the underlying RDDs. Spark Streaming also supports window operations, output operations, and integrating streaming with Spark's ML and graph processing capabilities.
This document discusses the results of a NoSQL database benchmark test conducted by NHN on Cassandra, HBase and MongoDB. It describes the test environment and four test cases performed: data insertion, random reads and updates on existing data, reads only on existing data, and random reads and inserts with additional data added. The test measured average transactions per second for each database and test case. Cassandra and HBase performance varied depending on compaction levels while MongoDB update and insert performance lagged the others.
This document provides an overview of NoSQL databases. It begins by defining NoSQL as non-relational databases that are distributed, open source, and horizontally scalable. It then discusses some of the limitations of relational databases that led to the rise of NoSQL, such as issues with scalability and the need for flexible schemas. The document also summarizes some key NoSQL concepts, including the CAP theorem, ACID versus BASE, and eventual consistency. It provides examples of use cases for NoSQL databases and discusses some common NoSQL database types and how they address scalability.
Spark Streaming allows for scalable, high-throughput, fault-tolerant stream processing of live data streams. It works by chopping data streams into batches, treating each batch as an RDD, and processing them using RDD transformations and operations. This provides a simple abstraction called a DStream that represents a continuous stream of data as a series of RDDs. Transformations applied to DStreams are similarly applied to the underlying RDDs. Spark Streaming also supports window operations, output operations, and integrating streaming with Spark's ML and graph processing capabilities.
This document discusses the results of a NoSQL database benchmark test conducted by NHN on Cassandra, HBase and MongoDB. It describes the test environment and four test cases performed: data insertion, random reads and updates on existing data, reads only on existing data, and random reads and inserts with additional data added. The test measured average transactions per second for each database and test case. Cassandra and HBase performance varied depending on compaction levels while MongoDB update and insert performance lagged the others.
This document provides an overview of NoSQL databases. It begins by defining NoSQL as non-relational databases that are distributed, open source, and horizontally scalable. It then discusses some of the limitations of relational databases that led to the rise of NoSQL, such as issues with scalability and the need for flexible schemas. The document also summarizes some key NoSQL concepts, including the CAP theorem, ACID versus BASE, and eventual consistency. It provides examples of use cases for NoSQL databases and discusses some common NoSQL database types and how they address scalability.
Spark 의 핵심은 무엇인가? RDD! (RDD paper review)Yongho Ha
요즘 Hadoop 보다 더 뜨고 있는 Spark.
그 Spark의 핵심을 이해하기 위해서는 핵심 자료구조인 Resilient Distributed Datasets (RDD)를 이해하는 것이 필요합니다.
RDD가 어떻게 동작하는지, 원 논문을 리뷰하며 살펴보도록 합시다.
http://www.cs.berkeley.edu/~matei/papers/2012/sigmod_shark_demo.pdf
2. 데이터 분산 방법
• 복제(replication)
– 같은 데이터를 복사해 여러 노드에 분산.
– 복제 방식은 master-slave와 peer to peer
방식.
• 샤딩
– 다른 데이터를 각 노드에 넣는것.
3. 단일 서버
• 가장 단순한 방법
• 데이터 저장소에 대한 읽기 와 쓰기를 하
나의 장비에서 처리.
• 복잡성이 사라지고 운영이 쉬움
• 그래프 DB는 단일 서버 환경에서 잘돌아감.
4. 샤딩
A B
ABCD
C D
• 데이터의 다른 부분을 다른 부분에 다른 서버에
두어 수평확장을 지원.
• 과거에는 샤딩을 애플리케이션 레벨에서 제
어,NoSQL은 자동 샤딩 제공.
5. 이상적인 샤딩
• 특정 집합의 대한 접근을 물리적 위치(요
청자 위치)에 기반.
• 서버의 부하를 노드간 균등하게 분배.
• 복제(cache)를 사용하면 읽기 성능 업.
6. 샤딩의 단점
• 샤딩만 단독으로 사용하는 경우 복원력
zero.
• 단일 서버에서 시작해서 샤딩으로 이동 할
경우 까다로움.
7. master-slave 복제
ABCD ABCD
ABCD 복제
ABCD ABCD
• 여러 노드에 데이터를 복제.
• 노드 하나가 master(primary) 노드로 선정.
• 쓰기는 master, 읽기는 master/slave
• master는 수동 자동으로 지정 가능.
8. master-slave 복제 장점
• 읽기가 많이 발생하는 데이터 집합을 가진 경우
큰 도움.
– 쓰기는 master, 읽기는 slave에서만 처리.
• 읽기 복원력
– master가 읽기 실패 하더라도, slave에서 읽기 처리.
• 노드의 확장이 필요하지 않은 경우도 유용하게
사용가능.
– 모든 읽기/쓰기는 master에서 처리, slave는 핫백업
용으로 사용.
9. master-slave 복제 단점
• 모든 slave에 복제가 되기전에 이전 값을
읽어 올 수 있음.
• 핫 백업 용도로만 사용시 문제점.
– master가 실패 하면 백업으로 전달되지 않은
데이터 손실.
10. peer-to-peer 복제
ABCD ABCD
ABCD ABCD
• master를 두지 않는 구조.
• 모든 복제본의 가중치는 똑같다.
• 모든 노드에서 쓰기/읽기 처리.
• 노드중 어느것이 실패 하더라도 다른 노드
에 접근 가능.
11. peer-to-peer 복제 문제점
• 서로 다른 사람이 동일한 레코드(노드는
다르지만)를 수정 시 쓰기 충돌 위험.(영
구적)
• 읽기에서 비 일관성도 문제(일시적).
12. 요점
• 데이터를 분산하는 형식은 두가지
– 샤딩
• 여러서버에 데이터를 나누어 분산.
• 각 서버는 전체 데이터의 부분집합을 저장하며 같은 데이터는 한
서버에서만 찾을 수 있다.
– 복제
• 여러서버에 데이터를 복사, 같은 데이터를 여러곳에서 찾을 수
있다.
• 복제는 두가지 형태.
– master-slave 복제
• master는 데이터의 원본 출처가 되어 쓰기를 처리 slave는
master와 데이터를 동기화 하고 읽기를 처리한다.
– peer-to-peer 복제
• 모든 노드에 쓰기를 허용.
• 노드는 데이터를 복사를 동기화 하기 위해 조율.