ef2011 sf

Post on 16-May-2015

289 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Erlang Factory

2011 SF

기술전략팀����������� ������������������  김대현dante@daumcorp.com

발표내용‣컨퍼런스 소개‣ Erlang 소개 & 예제‣ OTP 소개 ‣기타 관련 기술 소개

EF2011SF 컨퍼런스 소개‣ 170명 규모‣ 교육코스 4가지 (각반 10~15명 규모)‣ Erlang 기초‣ OTP 속성 ‣ XMPP‣ Test Driven Development

‣컨퍼런스 Days

Erlang 소개

Erlang의 세계관‣ The world is concurrent‣ Things in the world don’t share data‣ Things communicate with messages‣ Things fail

이제와서...‣멀티코어 시스템‣ 쓰레드 모델의 한계‣ 개발하기 어려움‣ 확장성 저하

예제 #1

예제 #2

OTP

OTP‣ Open Telecom Platform‣탄탄한 시스템을 만들기 위한 ‣애플리케이션‣라이브러리‣ 도구

Design Principles: Behaviours‣ The idea is to split the code in two parts‣ The generic part is called the generic behaviour‣ They are provided by OTP as library modules

‣ The specific part is called the callback module‣ They are implemented by the programmer

Behaviours: client-server

Generic Specific

‣Spawning����������� ������������������  the����������� ������������������  server‣Storing����������� ������������������  the����������� ������������������  loop����������� ������������������  data‣Sending����������� ������������������  requests����������� ������������������  to����������� ������������������  the����������� ������������������  server‣Sending����������� ������������������  replies����������� ������������������  to����������� ������������������  the����������� ������������������  client‣Receiving����������� ������������������  server����������� ������������������  replies‣Stopping����������� ������������������  the����������� ������������������  server

‣Initializing����������� ������������������  the����������� ������������������  server����������� ������������������  state‣The����������� ������������������  loop����������� ������������������  data‣The����������� ������������������  client����������� ������������������  requests‣Handling����������� ������������������  client����������� ������������������  requests‣Contents����������� ������������������  of����������� ������������������  server����������� ������������������  reply‣Cleaning����������� ������������������  up

Behaviours 장단점

장점 단점

‣Less����������� ������������������  code����������� ������������������  to����������� ������������������  develop‣Less����������� ������������������  bugs‣Solid����������� ������������������  well����������� ������������������  tested����������� ������������������  base‣Free����������� ������������������  built-in����������� ������������������  functionality‣Log,����������� ������������������  Trace,����������� ������������������  Statistics,����������� ������������������  Extensible‣Common����������� ������������������  Programming����������� ������������������  Style‣Component-based����������� ������������������  Terminology

‣Steep����������� ������������������  learning����������� ������������������  curve‣Affects����������� ������������������  performance

Behaviours‣ Generic Servers‣ Generic Finite-State Machines‣ Generic Event Handler/Manager‣ Supervisors‣ Application

Behaviour: Generic Server‣ client-server model

‣ a central server‣ an arbitrary number of clients

‣ generally used for resource management operations‣ where several different clients want to share a common resource

‣ The Server is responsible for managing this resource.

query

reply

Supervision Trees‣ Basic concept in Erlang/OTP‣ Process structuring model based on the idea of workers and supervisors

Supervision Trees

1

1 a

a 1

Supervisor‣ responsible for starting, stopping, monitoring its child processes

‣ it should keep its child processes alive by restarting them when necessary

Supervisor‣ Restart Strategy‣ one_for_one‣ one_for_all‣ rest_for_one

‣Maximum Restart Frequency‣ to limit the number of restarts which occur in a given time interval

one for one

1

one for one

1

one for one

1

one for one

1

one for all

a

one for all

a

one for all

a

one for all

a

one for all

a

rest for one

R

rest for one

R

rest for one

R

rest for one

R

rest for one

R

그 외 기술/도구 소개

Riak‣ scalable ‣ highly available‣ networked‣ key/value store

Riak‣ Inspired by Amazon’s Dynamo ‣ Key/Value store + Metadata‣ Riak chooses Availability and Partition tolerance over Consistency

‣ Instead provides eventual consistency

QuickCheck‣ a Set theory...‣ X ∪ Y = Y ∪ X

GPGPU programming‣ Using the graphics processor for non- graphical programming

‣ NVidia CUDA‣ GPGPU framework for NVIDIA GPUs‣ Thrust‣ C++ framework for GPU computing

‣ OpenCL

pteracuda‣ Experiment to integrate CUDA & Erlang

‣ Accelerate slow Erlang operations‣ Built on CUDA 4.0 RC1

정리‣컨퍼런스 소개‣ Erlang 소개 & 예제‣ OTP 소개‣ 그 외 기술/도구 소개

감사합니다

스터디 모집‣ Erlang/OTP 걸음마‣매주 수요일 점심 12:00 ~ 13:00‣나는 얼랭개발자다: 7명‣가장 중요한 것은 참여 의지!‣메신저 연락 바람!

top related