SlideShare a Scribd company logo
동기의 시대를 뛰어넘는
응용 프로그램이
나쁜 평가를 받는 이유
사용자들은 대체적으로
성능과 연관 지어
응용 프로그램의
품질을 평가
개념
다른 측(다른 스레드/디바이스 드라이버)이 작업 수행
작업을 요청한 스레드와 작업을 수행하는 측이 동일하지 않다
비동기 함수 호출
작업요청 방식이 다르다
작업이 완료될 때까지 대기하지 않겠다
작업 완료 통지
작업이 완료되면 알려다오
작업 요청 스레드 작업 수행 스레드 혹은 Device Driver
작업 요청 스레드 작업 수행 스레드 혹은 Device Driver
작업 요청 스레드 작업 수행 스레드 혹은 Device Driver
작업 요청 스레드 작업 수행 스레드 혹은 Device Driver
비동기 프로그래밍
사용자의 조작에 빠르게 응답
CPU 작업을 효율적으로 수행
I/O 작업을 효율적으로 수행
public class MyClass
{
public int Read(byte [] buffer, int offset, int count);
}
public class MyClass
{
public IAsyncResult BeginRead(
byte [] buffer, int offset, int count,
AsyncCallback callback, object state);
public int EndRead(IAsyncResult asyncResult);
}
public class MyClass
{
public void ReadAsync(byte [] buffer, int offset, int count);
public event ReadCompletedEventHandler ReadCompleted;
}
public class MyClass
{
public Task<int> ReadAsync(byte [] buffer, int offset, int count);
}
1. Sync
2. APM
3. EAP
4. TAP
private void Button_Click(object sender, RoutedEventArgs e)
{
string url = "http://windowsteamblog.com/windows/b/windowsexperience/atom.aspx";
WebClient client = new WebClient();
client.DownloadStringCompleted += client_DownloadStringCompleted;
client.DownloadStringAsync(new Uri(url)); // 수행해야할 작업을 전달
// 다른 일을 할 수도 있다
}
// 작업이 완료되면 이벤트를 발생시켜 통보
void client_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs arg)
{
Debug.WriteLine(arg.Result);
}
private void Button_Click(object sender, RoutedEventArgs e)
{
string url = "http://windowsteamblog.com/windows/b/windowsexperience/atom.aspx";
WebClient client = new WebClient();
client.DownloadStringCompleted += (s, arg) => Debug.WriteLine(arg.Result);
client.DownloadStringAsync(new Uri(url));
}
private void Button_Click(object sender, RoutedEventArgs e)
{
Task.Run(() => WorkAsync());
}
private void WorkAsync()
{
string url = "http://windowsteamblog.com/windows/b/windowsexperience/atom.aspx";
WebClient client = new WebClient();
Task<string> t = client.DownloadStringTaskAsync(new Uri(url));
t.Wait(); // 작업이 완료되때까지 대기
Debug.WriteLine(t.Result);
}
private void Button_Click(object sender, RoutedEventArgs e)
{
Task.Run(() => WorkAsync());
}
private void WorkAsync()
{
string url = "http://windowsteamblog.com/windows/b/windowsexperience/atom.aspx";
WebClient client = new WebClient();
Task<string> t = client.DownloadStringTaskAsync(new Uri(url));
t.ContinueWith((prevTask) => Debug.WriteLine(prevTask.Result));
}
async Task<int> FuncAsync()
{
int r = await DoAsync();
return r;
}
• TAP과 함께
• APM/EAPTAP로 변환
• 비동기 함수의 이름은
XxxAsync()/XxxTaskAsync()
• await 와 async는 함께
• 반환형은
Task, Task<TResult>
private async void Button_Click(object sender, RoutedEventArgs e)
{
await WorkAsync();
}
private async Task WorkAsync()
{
string url = "http://windowsteamblog.com/windows/b/windowsexperience/atom.aspx";
WebClient client = new WebClient();
string result = await client.DownloadStringTaskAsync(new Uri(url));
Debug.WriteLine(result);
}
Click
async Task LoadSettingsAsync() {
await IO.Network.DownloadAsync(path);
}
async void Button1_Click(){
await LoadSettingsAsync();
UpdateView();
}
Click
Messagepump
Task ...
DownloadAsync
Task ...
LoadSettingsAsync
Download
LoadSettings
private void Button_Click(object sender, RoutedEventArgs e)
{
string url = "http://windowsteamblog.com/windows/b/windowsexperience/atom.aspx";
WebClient client = new WebClient();
Task<string> t = client.DownloadStringTaskAsync(new Uri(url));
t.ContinueWith((r) => Debug.WriteLine(r.Result));
}
private async void Button_Click_1(object sender, RoutedEventArgs e)
{
string url = "http://windowsteamblog.com/windows/b/windowsexperience/atom.aspx";
WebClient client = new WebClient();
string result = await client.DownloadStringTaskAsync(new Uri(url));
Debug.WriteLine(result);
}
TAP with async/await
TAP
TAP
EAP
TAP, ContinueWith
async/await
WinRT의 비동기
C++는 PPL
C#, VB는 TPL과 async/await
Javascript는 commonJS/A 의 promise/then
+ +
Windows Runtime
public sealed class SyndicationClient : ISyndicationClient
{
public IAsyncOperationWithProgress<SyndicationFeed, RetrievalProgress>
RetrieveFeedAsync(Uri uri);
…
}
public sealed class SyndicationFeed : ISyndicationNode
{
public ISyndicationText Title { get; set; }
…
}
public interface ISyndicationText : ISyndicationNode
{
string Text { get; set; }
…
}
#include <ppltasks.h>
void App::SetFeedText() {
using namespace Windows::Web::Syndication;
using namespace concurrency;
String^ url = "http://windowsteamblog.com/windows_phone/b/wmdev/atom.aspx";
SyndicationClient^ client = ref new SyndicationClient();
task<SyndicationFeed^> retriveTask(client->RetrieveFeedAsync(ref new Uri(url)));
retriveTask.then([this] (SyndicationFeed^ feed)
{
String ^title = feed->Title->Text;
});
}
function SetFeedText()
{
var url = "http://windowsteamblog.com/windows/b/windowsexperience/atom.aspx";
var client = Windows.Web.Syndication.SyndicationClient();
var feedOp = client.retrieveFeedAsync(new Windows.Foundation.Uri(url));
feedOp.then(function (feed)
{
var title = feed.title.text;
});
}
private async void SetFeedText()
{
string url = "http://windowsteamblog.com/windows/b/windowsexperience/atom.aspx";
SyndicationClient client = new SyndicationClient();
SyndicationFeed feed = await client.RetrieveFeedAsync(new Uri(url));
var title = feed.Title.Text;
}
async/await
Use raw interface
Multiple task
Task Combination
동기화 시대를 뛰어넘는 비동기 프로그래밍
동기화 시대를 뛰어넘는 비동기 프로그래밍

More Related Content

What's hot

Ndc14 분산 서버 구축의 ABC
Ndc14 분산 서버 구축의 ABCNdc14 분산 서버 구축의 ABC
Ndc14 분산 서버 구축의 ABC
Ho Gyu Lee
 
190119 unreal engine c++ 입문 및 팁
190119 unreal engine c++ 입문 및 팁190119 unreal engine c++ 입문 및 팁
190119 unreal engine c++ 입문 및 팁
KWANGIL KIM
 
테라로 살펴본 MMORPG의 논타겟팅 시스템
테라로 살펴본 MMORPG의 논타겟팅 시스템테라로 살펴본 MMORPG의 논타겟팅 시스템
테라로 살펴본 MMORPG의 논타겟팅 시스템
QooJuice
 
이승재, 마비노기 듀얼: 분산 데이터베이스 트랜잭션 설계와 구현, NDC2015
이승재, 마비노기 듀얼: 분산 데이터베이스 트랜잭션 설계와 구현, NDC2015이승재, 마비노기 듀얼: 분산 데이터베이스 트랜잭션 설계와 구현, NDC2015
이승재, 마비노기 듀얼: 분산 데이터베이스 트랜잭션 설계와 구현, NDC2015devCAT Studio, NEXON
 
[Unite17] 유니티에서차세대프로그래밍을 UniRx 소개 및 활용
[Unite17] 유니티에서차세대프로그래밍을 UniRx 소개 및 활용 [Unite17] 유니티에서차세대프로그래밍을 UniRx 소개 및 활용
[Unite17] 유니티에서차세대프로그래밍을 UniRx 소개 및 활용
MinGeun Park
 
중앙 서버 없는 게임 로직
중앙 서버 없는 게임 로직중앙 서버 없는 게임 로직
중앙 서버 없는 게임 로직
Hoyoung Choi
 
Lock free queue
Lock free queueLock free queue
Lock free queue
Bongseok Cho
 
Multiplayer Game Sync Techniques through CAP theorem
Multiplayer Game Sync Techniques through CAP theoremMultiplayer Game Sync Techniques through CAP theorem
Multiplayer Game Sync Techniques through CAP theorem
Seungmo Koo
 
임태현, 게임 서버 디자인 가이드, NDC2013
임태현, 게임 서버 디자인 가이드, NDC2013임태현, 게임 서버 디자인 가이드, NDC2013
임태현, 게임 서버 디자인 가이드, NDC2013devCAT Studio, NEXON
 
온라인 게임 처음부터 끝까지 동적언어로 만들기
온라인 게임 처음부터 끝까지 동적언어로 만들기온라인 게임 처음부터 끝까지 동적언어로 만들기
온라인 게임 처음부터 끝까지 동적언어로 만들기Seungjae Lee
 
[2019] 게임 서버 대규모 부하 테스트와 모니터링 이렇게 해보자
[2019] 게임 서버 대규모 부하 테스트와 모니터링 이렇게 해보자[2019] 게임 서버 대규모 부하 테스트와 모니터링 이렇게 해보자
[2019] 게임 서버 대규모 부하 테스트와 모니터링 이렇게 해보자
NHN FORWARD
 
KGC 2016 오픈소스 네트워크 엔진 Super socket 사용하기
KGC 2016 오픈소스 네트워크 엔진 Super socket 사용하기KGC 2016 오픈소스 네트워크 엔진 Super socket 사용하기
KGC 2016 오픈소스 네트워크 엔진 Super socket 사용하기
흥배 최
 
나만의 엔진 개발하기
나만의 엔진 개발하기나만의 엔진 개발하기
나만의 엔진 개발하기
YEONG-CHEON YOU
 
KSUG 스프링캠프 2019 발표자료 - "무엇을 테스트할 것인가, 어떻게 테스트할 것인가"
KSUG 스프링캠프 2019 발표자료 - "무엇을 테스트할 것인가, 어떻게 테스트할 것인가"KSUG 스프링캠프 2019 발표자료 - "무엇을 테스트할 것인가, 어떻게 테스트할 것인가"
KSUG 스프링캠프 2019 발표자료 - "무엇을 테스트할 것인가, 어떻게 테스트할 것인가"
용근 권
 
[NDC2016] TERA 서버의 Modern C++ 활용기
[NDC2016] TERA 서버의 Modern C++ 활용기[NDC2016] TERA 서버의 Modern C++ 활용기
[NDC2016] TERA 서버의 Modern C++ 활용기
Sang Heon Lee
 
GCGC- CGCII 서버 엔진에 적용된 기술 (1)
GCGC- CGCII 서버 엔진에 적용된 기술 (1)GCGC- CGCII 서버 엔진에 적용된 기술 (1)
GCGC- CGCII 서버 엔진에 적용된 기술 (1)
상현 조
 
NDC12_Lockless게임서버설계와구현
NDC12_Lockless게임서버설계와구현NDC12_Lockless게임서버설계와구현
NDC12_Lockless게임서버설계와구현
noerror
 
Multithread & shared_ptr
Multithread & shared_ptrMultithread & shared_ptr
Multithread & shared_ptr
내훈 정
 
오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...
오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...
오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...
Amazon Web Services Korea
 
[NDC18] 만들고 붓고 부수고 - 〈야생의 땅: 듀랑고〉 서버 관리 배포 이야기
[NDC18] 만들고 붓고 부수고 - 〈야생의 땅: 듀랑고〉 서버 관리 배포 이야기[NDC18] 만들고 붓고 부수고 - 〈야생의 땅: 듀랑고〉 서버 관리 배포 이야기
[NDC18] 만들고 붓고 부수고 - 〈야생의 땅: 듀랑고〉 서버 관리 배포 이야기
Chanwoong Kim
 

What's hot (20)

Ndc14 분산 서버 구축의 ABC
Ndc14 분산 서버 구축의 ABCNdc14 분산 서버 구축의 ABC
Ndc14 분산 서버 구축의 ABC
 
190119 unreal engine c++ 입문 및 팁
190119 unreal engine c++ 입문 및 팁190119 unreal engine c++ 입문 및 팁
190119 unreal engine c++ 입문 및 팁
 
테라로 살펴본 MMORPG의 논타겟팅 시스템
테라로 살펴본 MMORPG의 논타겟팅 시스템테라로 살펴본 MMORPG의 논타겟팅 시스템
테라로 살펴본 MMORPG의 논타겟팅 시스템
 
이승재, 마비노기 듀얼: 분산 데이터베이스 트랜잭션 설계와 구현, NDC2015
이승재, 마비노기 듀얼: 분산 데이터베이스 트랜잭션 설계와 구현, NDC2015이승재, 마비노기 듀얼: 분산 데이터베이스 트랜잭션 설계와 구현, NDC2015
이승재, 마비노기 듀얼: 분산 데이터베이스 트랜잭션 설계와 구현, NDC2015
 
[Unite17] 유니티에서차세대프로그래밍을 UniRx 소개 및 활용
[Unite17] 유니티에서차세대프로그래밍을 UniRx 소개 및 활용 [Unite17] 유니티에서차세대프로그래밍을 UniRx 소개 및 활용
[Unite17] 유니티에서차세대프로그래밍을 UniRx 소개 및 활용
 
중앙 서버 없는 게임 로직
중앙 서버 없는 게임 로직중앙 서버 없는 게임 로직
중앙 서버 없는 게임 로직
 
Lock free queue
Lock free queueLock free queue
Lock free queue
 
Multiplayer Game Sync Techniques through CAP theorem
Multiplayer Game Sync Techniques through CAP theoremMultiplayer Game Sync Techniques through CAP theorem
Multiplayer Game Sync Techniques through CAP theorem
 
임태현, 게임 서버 디자인 가이드, NDC2013
임태현, 게임 서버 디자인 가이드, NDC2013임태현, 게임 서버 디자인 가이드, NDC2013
임태현, 게임 서버 디자인 가이드, NDC2013
 
온라인 게임 처음부터 끝까지 동적언어로 만들기
온라인 게임 처음부터 끝까지 동적언어로 만들기온라인 게임 처음부터 끝까지 동적언어로 만들기
온라인 게임 처음부터 끝까지 동적언어로 만들기
 
[2019] 게임 서버 대규모 부하 테스트와 모니터링 이렇게 해보자
[2019] 게임 서버 대규모 부하 테스트와 모니터링 이렇게 해보자[2019] 게임 서버 대규모 부하 테스트와 모니터링 이렇게 해보자
[2019] 게임 서버 대규모 부하 테스트와 모니터링 이렇게 해보자
 
KGC 2016 오픈소스 네트워크 엔진 Super socket 사용하기
KGC 2016 오픈소스 네트워크 엔진 Super socket 사용하기KGC 2016 오픈소스 네트워크 엔진 Super socket 사용하기
KGC 2016 오픈소스 네트워크 엔진 Super socket 사용하기
 
나만의 엔진 개발하기
나만의 엔진 개발하기나만의 엔진 개발하기
나만의 엔진 개발하기
 
KSUG 스프링캠프 2019 발표자료 - "무엇을 테스트할 것인가, 어떻게 테스트할 것인가"
KSUG 스프링캠프 2019 발표자료 - "무엇을 테스트할 것인가, 어떻게 테스트할 것인가"KSUG 스프링캠프 2019 발표자료 - "무엇을 테스트할 것인가, 어떻게 테스트할 것인가"
KSUG 스프링캠프 2019 발표자료 - "무엇을 테스트할 것인가, 어떻게 테스트할 것인가"
 
[NDC2016] TERA 서버의 Modern C++ 활용기
[NDC2016] TERA 서버의 Modern C++ 활용기[NDC2016] TERA 서버의 Modern C++ 활용기
[NDC2016] TERA 서버의 Modern C++ 활용기
 
GCGC- CGCII 서버 엔진에 적용된 기술 (1)
GCGC- CGCII 서버 엔진에 적용된 기술 (1)GCGC- CGCII 서버 엔진에 적용된 기술 (1)
GCGC- CGCII 서버 엔진에 적용된 기술 (1)
 
NDC12_Lockless게임서버설계와구현
NDC12_Lockless게임서버설계와구현NDC12_Lockless게임서버설계와구현
NDC12_Lockless게임서버설계와구현
 
Multithread & shared_ptr
Multithread & shared_ptrMultithread & shared_ptr
Multithread & shared_ptr
 
오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...
오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...
오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...
 
[NDC18] 만들고 붓고 부수고 - 〈야생의 땅: 듀랑고〉 서버 관리 배포 이야기
[NDC18] 만들고 붓고 부수고 - 〈야생의 땅: 듀랑고〉 서버 관리 배포 이야기[NDC18] 만들고 붓고 부수고 - 〈야생의 땅: 듀랑고〉 서버 관리 배포 이야기
[NDC18] 만들고 붓고 부수고 - 〈야생의 땅: 듀랑고〉 서버 관리 배포 이야기
 

Similar to 동기화 시대를 뛰어넘는 비동기 프로그래밍

Middleware.pdf
Middleware.pdfMiddleware.pdf
Middleware.pdf
Bareen Shaikh
 
Unit Testing Express and Koa Middleware in ES2015
Unit Testing Express and Koa Middleware in ES2015Unit Testing Express and Koa Middleware in ES2015
Unit Testing Express and Koa Middleware in ES2015
Morris Singer
 
Async programming on NET
Async programming on NETAsync programming on NET
Async programming on NET
yuyijq
 
Asynchronous programming in .net 4.5 with c#
Asynchronous programming in .net 4.5 with c#Asynchronous programming in .net 4.5 with c#
Asynchronous programming in .net 4.5 with c#Binu Bhasuran
 
Asynchronous in dot net4
Asynchronous in dot net4Asynchronous in dot net4
Asynchronous in dot net4Wei Sun
 
Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. REST
Sam Brannen
 
Android best practices
Android best practicesAndroid best practices
Android best practices
Jose Manuel Ortega Candel
 
Building Web Apps with Express
Building Web Apps with ExpressBuilding Web Apps with Express
Building Web Apps with Express
Aaron Stannard
 
Azure Durable Functions (2019-03-30)
Azure Durable Functions (2019-03-30) Azure Durable Functions (2019-03-30)
Azure Durable Functions (2019-03-30)
Paco de la Cruz
 
Intro to Node
Intro to NodeIntro to Node
Intro to Node
Aaron Stannard
 
Reactive programming every day
Reactive programming every dayReactive programming every day
Reactive programming every day
Vadym Khondar
 
Azure Durable Functions (2019-04-27)
Azure Durable Functions (2019-04-27)Azure Durable Functions (2019-04-27)
Azure Durable Functions (2019-04-27)
Paco de la Cruz
 
Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.
Visual Engineering
 
Welcome to an asynchronous world 1.29s
Welcome to an asynchronous world 1.29sWelcome to an asynchronous world 1.29s
Welcome to an asynchronous world 1.29s
Jose Luis Latorre Millas
 
Serverless Java on Kubernetes
Serverless Java on KubernetesServerless Java on Kubernetes
Serverless Java on Kubernetes
Krzysztof Sobkowiak
 
Durable functions 2.0 (2019-10-10)
Durable functions 2.0 (2019-10-10)Durable functions 2.0 (2019-10-10)
Durable functions 2.0 (2019-10-10)
Paco de la Cruz
 
Server side JavaScript: going all the way
Server side JavaScript: going all the wayServer side JavaScript: going all the way
Server side JavaScript: going all the way
Oleg Podsechin
 
May 2010 - RestEasy
May 2010 - RestEasyMay 2010 - RestEasy
May 2010 - RestEasy
JBug Italy
 
RESTEasy
RESTEasyRESTEasy

Similar to 동기화 시대를 뛰어넘는 비동기 프로그래밍 (20)

Middleware.pdf
Middleware.pdfMiddleware.pdf
Middleware.pdf
 
Unit Testing Express and Koa Middleware in ES2015
Unit Testing Express and Koa Middleware in ES2015Unit Testing Express and Koa Middleware in ES2015
Unit Testing Express and Koa Middleware in ES2015
 
Async programming on NET
Async programming on NETAsync programming on NET
Async programming on NET
 
Asynchronous programming in .net 4.5 with c#
Asynchronous programming in .net 4.5 with c#Asynchronous programming in .net 4.5 with c#
Asynchronous programming in .net 4.5 with c#
 
Asynchronous in dot net4
Asynchronous in dot net4Asynchronous in dot net4
Asynchronous in dot net4
 
Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. REST
 
JS everywhere 2011
JS everywhere 2011JS everywhere 2011
JS everywhere 2011
 
Android best practices
Android best practicesAndroid best practices
Android best practices
 
Building Web Apps with Express
Building Web Apps with ExpressBuilding Web Apps with Express
Building Web Apps with Express
 
Azure Durable Functions (2019-03-30)
Azure Durable Functions (2019-03-30) Azure Durable Functions (2019-03-30)
Azure Durable Functions (2019-03-30)
 
Intro to Node
Intro to NodeIntro to Node
Intro to Node
 
Reactive programming every day
Reactive programming every dayReactive programming every day
Reactive programming every day
 
Azure Durable Functions (2019-04-27)
Azure Durable Functions (2019-04-27)Azure Durable Functions (2019-04-27)
Azure Durable Functions (2019-04-27)
 
Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.
 
Welcome to an asynchronous world 1.29s
Welcome to an asynchronous world 1.29sWelcome to an asynchronous world 1.29s
Welcome to an asynchronous world 1.29s
 
Serverless Java on Kubernetes
Serverless Java on KubernetesServerless Java on Kubernetes
Serverless Java on Kubernetes
 
Durable functions 2.0 (2019-10-10)
Durable functions 2.0 (2019-10-10)Durable functions 2.0 (2019-10-10)
Durable functions 2.0 (2019-10-10)
 
Server side JavaScript: going all the way
Server side JavaScript: going all the wayServer side JavaScript: going all the way
Server side JavaScript: going all the way
 
May 2010 - RestEasy
May 2010 - RestEasyMay 2010 - RestEasy
May 2010 - RestEasy
 
RESTEasy
RESTEasyRESTEasy
RESTEasy
 

More from 명신 김

업무를 빼고 가치를 더하는 클라우드 기술
업무를 빼고 가치를 더하는 클라우드 기술업무를 빼고 가치를 더하는 클라우드 기술
업무를 빼고 가치를 더하는 클라우드 기술
명신 김
 
[2020 Ignite Seoul]Azure에서 사용할 수 있는 컨테이너/오케스트레이션 기술 살펴보기
[2020 Ignite Seoul]Azure에서 사용할 수 있는 컨테이너/오케스트레이션 기술 살펴보기[2020 Ignite Seoul]Azure에서 사용할 수 있는 컨테이너/오케스트레이션 기술 살펴보기
[2020 Ignite Seoul]Azure에서 사용할 수 있는 컨테이너/오케스트레이션 기술 살펴보기
명신 김
 
Best of Build Seoul 2019 Keynote
Best of Build Seoul 2019 KeynoteBest of Build Seoul 2019 Keynote
Best of Build Seoul 2019 Keynote
명신 김
 
Passwordless society
Passwordless societyPasswordless society
Passwordless society
명신 김
 
DevOps and Azure Devops 소개, 동향, 그리고 기대효과
DevOps and Azure Devops 소개, 동향, 그리고 기대효과DevOps and Azure Devops 소개, 동향, 그리고 기대효과
DevOps and Azure Devops 소개, 동향, 그리고 기대효과
명신 김
 
Serverless design and adoption
Serverless design and adoptionServerless design and adoption
Serverless design and adoption
명신 김
 
Durable functions
Durable functionsDurable functions
Durable functions
명신 김
 
Azure functions v2 announcement
Azure functions v2 announcementAzure functions v2 announcement
Azure functions v2 announcement
명신 김
 
Azure functions
Azure functionsAzure functions
Azure functions
명신 김
 
Logic apps
Logic appsLogic apps
Logic apps
명신 김
 
Serverless
ServerlessServerless
Serverless
명신 김
 
Azure event grid
Azure event gridAzure event grid
Azure event grid
명신 김
 
Serverless, Azure Functions, Logic Apps
Serverless, Azure Functions, Logic AppsServerless, Azure Functions, Logic Apps
Serverless, Azure Functions, Logic Apps
명신 김
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture
명신 김
 
Visual studio 2015를 활용한 개발 생산성 및 코드 품질 혁신
Visual studio 2015를 활용한 개발 생산성 및 코드 품질 혁신Visual studio 2015를 활용한 개발 생산성 및 코드 품질 혁신
Visual studio 2015를 활용한 개발 생산성 및 코드 품질 혁신
명신 김
 
Connect(); 2016 한시간 총정리
Connect(); 2016 한시간 총정리Connect(); 2016 한시간 총정리
Connect(); 2016 한시간 총정리
명신 김
 
크로스 플랫폼을 품은 오픈 소스 프레임워크 .NET Core
크로스 플랫폼을 품은 오픈 소스 프레임워크 .NET Core크로스 플랫폼을 품은 오픈 소스 프레임워크 .NET Core
크로스 플랫폼을 품은 오픈 소스 프레임워크 .NET Core
명신 김
 
Coded UI test를 이용한 테스트 자동화
Coded UI test를 이용한 테스트 자동화Coded UI test를 이용한 테스트 자동화
Coded UI test를 이용한 테스트 자동화
명신 김
 
VS2015 C++ new features
VS2015 C++ new featuresVS2015 C++ new features
VS2015 C++ new features
명신 김
 
Welcome to the microsoft madness
Welcome to the microsoft madnessWelcome to the microsoft madness
Welcome to the microsoft madness
명신 김
 

More from 명신 김 (20)

업무를 빼고 가치를 더하는 클라우드 기술
업무를 빼고 가치를 더하는 클라우드 기술업무를 빼고 가치를 더하는 클라우드 기술
업무를 빼고 가치를 더하는 클라우드 기술
 
[2020 Ignite Seoul]Azure에서 사용할 수 있는 컨테이너/오케스트레이션 기술 살펴보기
[2020 Ignite Seoul]Azure에서 사용할 수 있는 컨테이너/오케스트레이션 기술 살펴보기[2020 Ignite Seoul]Azure에서 사용할 수 있는 컨테이너/오케스트레이션 기술 살펴보기
[2020 Ignite Seoul]Azure에서 사용할 수 있는 컨테이너/오케스트레이션 기술 살펴보기
 
Best of Build Seoul 2019 Keynote
Best of Build Seoul 2019 KeynoteBest of Build Seoul 2019 Keynote
Best of Build Seoul 2019 Keynote
 
Passwordless society
Passwordless societyPasswordless society
Passwordless society
 
DevOps and Azure Devops 소개, 동향, 그리고 기대효과
DevOps and Azure Devops 소개, 동향, 그리고 기대효과DevOps and Azure Devops 소개, 동향, 그리고 기대효과
DevOps and Azure Devops 소개, 동향, 그리고 기대효과
 
Serverless design and adoption
Serverless design and adoptionServerless design and adoption
Serverless design and adoption
 
Durable functions
Durable functionsDurable functions
Durable functions
 
Azure functions v2 announcement
Azure functions v2 announcementAzure functions v2 announcement
Azure functions v2 announcement
 
Azure functions
Azure functionsAzure functions
Azure functions
 
Logic apps
Logic appsLogic apps
Logic apps
 
Serverless
ServerlessServerless
Serverless
 
Azure event grid
Azure event gridAzure event grid
Azure event grid
 
Serverless, Azure Functions, Logic Apps
Serverless, Azure Functions, Logic AppsServerless, Azure Functions, Logic Apps
Serverless, Azure Functions, Logic Apps
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture
 
Visual studio 2015를 활용한 개발 생산성 및 코드 품질 혁신
Visual studio 2015를 활용한 개발 생산성 및 코드 품질 혁신Visual studio 2015를 활용한 개발 생산성 및 코드 품질 혁신
Visual studio 2015를 활용한 개발 생산성 및 코드 품질 혁신
 
Connect(); 2016 한시간 총정리
Connect(); 2016 한시간 총정리Connect(); 2016 한시간 총정리
Connect(); 2016 한시간 총정리
 
크로스 플랫폼을 품은 오픈 소스 프레임워크 .NET Core
크로스 플랫폼을 품은 오픈 소스 프레임워크 .NET Core크로스 플랫폼을 품은 오픈 소스 프레임워크 .NET Core
크로스 플랫폼을 품은 오픈 소스 프레임워크 .NET Core
 
Coded UI test를 이용한 테스트 자동화
Coded UI test를 이용한 테스트 자동화Coded UI test를 이용한 테스트 자동화
Coded UI test를 이용한 테스트 자동화
 
VS2015 C++ new features
VS2015 C++ new featuresVS2015 C++ new features
VS2015 C++ new features
 
Welcome to the microsoft madness
Welcome to the microsoft madnessWelcome to the microsoft madness
Welcome to the microsoft madness
 

Recently uploaded

How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Strategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptxStrategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptx
varshanayak241
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Hivelance Technology
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
MayankTawar1
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Why React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdfWhy React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdf
ayushiqss
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
Jelle | Nordend
 

Recently uploaded (20)

How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Strategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptxStrategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptx
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Why React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdfWhy React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdf
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
 

동기화 시대를 뛰어넘는 비동기 프로그래밍

  • 2.
  • 3. 응용 프로그램이 나쁜 평가를 받는 이유 사용자들은 대체적으로 성능과 연관 지어 응용 프로그램의 품질을 평가
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11. 개념 다른 측(다른 스레드/디바이스 드라이버)이 작업 수행 작업을 요청한 스레드와 작업을 수행하는 측이 동일하지 않다 비동기 함수 호출 작업요청 방식이 다르다 작업이 완료될 때까지 대기하지 않겠다 작업 완료 통지 작업이 완료되면 알려다오
  • 12. 작업 요청 스레드 작업 수행 스레드 혹은 Device Driver
  • 13. 작업 요청 스레드 작업 수행 스레드 혹은 Device Driver
  • 14. 작업 요청 스레드 작업 수행 스레드 혹은 Device Driver
  • 15. 작업 요청 스레드 작업 수행 스레드 혹은 Device Driver
  • 16. 비동기 프로그래밍 사용자의 조작에 빠르게 응답 CPU 작업을 효율적으로 수행 I/O 작업을 효율적으로 수행
  • 17.
  • 18.
  • 19.
  • 20. public class MyClass { public int Read(byte [] buffer, int offset, int count); } public class MyClass { public IAsyncResult BeginRead( byte [] buffer, int offset, int count, AsyncCallback callback, object state); public int EndRead(IAsyncResult asyncResult); } public class MyClass { public void ReadAsync(byte [] buffer, int offset, int count); public event ReadCompletedEventHandler ReadCompleted; } public class MyClass { public Task<int> ReadAsync(byte [] buffer, int offset, int count); } 1. Sync 2. APM 3. EAP 4. TAP
  • 21. private void Button_Click(object sender, RoutedEventArgs e) { string url = "http://windowsteamblog.com/windows/b/windowsexperience/atom.aspx"; WebClient client = new WebClient(); client.DownloadStringCompleted += client_DownloadStringCompleted; client.DownloadStringAsync(new Uri(url)); // 수행해야할 작업을 전달 // 다른 일을 할 수도 있다 } // 작업이 완료되면 이벤트를 발생시켜 통보 void client_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs arg) { Debug.WriteLine(arg.Result); }
  • 22. private void Button_Click(object sender, RoutedEventArgs e) { string url = "http://windowsteamblog.com/windows/b/windowsexperience/atom.aspx"; WebClient client = new WebClient(); client.DownloadStringCompleted += (s, arg) => Debug.WriteLine(arg.Result); client.DownloadStringAsync(new Uri(url)); }
  • 23. private void Button_Click(object sender, RoutedEventArgs e) { Task.Run(() => WorkAsync()); } private void WorkAsync() { string url = "http://windowsteamblog.com/windows/b/windowsexperience/atom.aspx"; WebClient client = new WebClient(); Task<string> t = client.DownloadStringTaskAsync(new Uri(url)); t.Wait(); // 작업이 완료되때까지 대기 Debug.WriteLine(t.Result); }
  • 24. private void Button_Click(object sender, RoutedEventArgs e) { Task.Run(() => WorkAsync()); } private void WorkAsync() { string url = "http://windowsteamblog.com/windows/b/windowsexperience/atom.aspx"; WebClient client = new WebClient(); Task<string> t = client.DownloadStringTaskAsync(new Uri(url)); t.ContinueWith((prevTask) => Debug.WriteLine(prevTask.Result)); }
  • 25. async Task<int> FuncAsync() { int r = await DoAsync(); return r; } • TAP과 함께 • APM/EAPTAP로 변환 • 비동기 함수의 이름은 XxxAsync()/XxxTaskAsync() • await 와 async는 함께 • 반환형은 Task, Task<TResult>
  • 26. private async void Button_Click(object sender, RoutedEventArgs e) { await WorkAsync(); } private async Task WorkAsync() { string url = "http://windowsteamblog.com/windows/b/windowsexperience/atom.aspx"; WebClient client = new WebClient(); string result = await client.DownloadStringTaskAsync(new Uri(url)); Debug.WriteLine(result); }
  • 27. Click async Task LoadSettingsAsync() { await IO.Network.DownloadAsync(path); } async void Button1_Click(){ await LoadSettingsAsync(); UpdateView(); } Click Messagepump Task ... DownloadAsync Task ... LoadSettingsAsync Download LoadSettings
  • 28. private void Button_Click(object sender, RoutedEventArgs e) { string url = "http://windowsteamblog.com/windows/b/windowsexperience/atom.aspx"; WebClient client = new WebClient(); Task<string> t = client.DownloadStringTaskAsync(new Uri(url)); t.ContinueWith((r) => Debug.WriteLine(r.Result)); } private async void Button_Click_1(object sender, RoutedEventArgs e) { string url = "http://windowsteamblog.com/windows/b/windowsexperience/atom.aspx"; WebClient client = new WebClient(); string result = await client.DownloadStringTaskAsync(new Uri(url)); Debug.WriteLine(result); } TAP with async/await TAP
  • 30. WinRT의 비동기 C++는 PPL C#, VB는 TPL과 async/await Javascript는 commonJS/A 의 promise/then
  • 31. + +
  • 33. public sealed class SyndicationClient : ISyndicationClient { public IAsyncOperationWithProgress<SyndicationFeed, RetrievalProgress> RetrieveFeedAsync(Uri uri); … } public sealed class SyndicationFeed : ISyndicationNode { public ISyndicationText Title { get; set; } … } public interface ISyndicationText : ISyndicationNode { string Text { get; set; } … }
  • 34. #include <ppltasks.h> void App::SetFeedText() { using namespace Windows::Web::Syndication; using namespace concurrency; String^ url = "http://windowsteamblog.com/windows_phone/b/wmdev/atom.aspx"; SyndicationClient^ client = ref new SyndicationClient(); task<SyndicationFeed^> retriveTask(client->RetrieveFeedAsync(ref new Uri(url))); retriveTask.then([this] (SyndicationFeed^ feed) { String ^title = feed->Title->Text; }); }
  • 35. function SetFeedText() { var url = "http://windowsteamblog.com/windows/b/windowsexperience/atom.aspx"; var client = Windows.Web.Syndication.SyndicationClient(); var feedOp = client.retrieveFeedAsync(new Windows.Foundation.Uri(url)); feedOp.then(function (feed) { var title = feed.title.text; }); }
  • 36. private async void SetFeedText() { string url = "http://windowsteamblog.com/windows/b/windowsexperience/atom.aspx"; SyndicationClient client = new SyndicationClient(); SyndicationFeed feed = await client.RetrieveFeedAsync(new Uri(url)); var title = feed.Title.Text; }
  • 37. async/await Use raw interface Multiple task Task Combination

Editor's Notes

  1. 소개
  2. 오늘은 이 질문으로부터 시작
  3. 비정상 종료는 다르나 나머지는 성능과 대체로 연관이 있음
  4. 응답하라 1987
  5. 무한루프. Logical Core가 4개임에도 사용율은 100%가 되지 못함
  6. NTFS Driver가 실제 작업을 수행함에도 사용자 Thread가 작업 완료까지 대기 하고 있음
  7. UI 응답성. UI Component는 자체적인 Thread Model이 있음, WinForm, WPF, Silverlight, IE 는 모두 STA/Console App은 없음 CPU 코어 수 = 실행 중 스레드 수를 만드려면. 수동으로 사용자가 스레드 개수를 제어하거나, 잘 짜여진 Thread Pool등을 사용하는 것이 좋음. Context Switching이란 결국 CPU의 상태를 저장하고/복원하는 과정 Windows는 30ms Quantium Time을 가짐 비동기 함수는 Win32, WPF, Siverlight, WP, W8까지 대체로 대부분 존재함. 특별히 Windows 8의 WinRT의 경우 50ms은 넘는 모든 작업들은 모두 비동기로만 제공하고 있음 대략 60%에 육박하는 수준의 I/O 기능들이 비동기로 수행
  8. 개념만 정리하면 3가지로 특징 지어질 수 있음 비동기는 작업 요청자와 작업 수행자가 다름 작업을 요청하는 다른 방식이 필요함 작업을 완료 통지를 받을 수 있는 방법이 필요함
  9. APM .NET framework 1.1 EAP .NET framework 2.0 TAP .NET Framework 4.0 APM과 EAP는 모두 쉽게 TAP형태로 변경해서 사용가능 병렬화 기법상의 Task parallelism 언급
  10. Sync/Tap이 signature 차원에서 가장 닮아있음 APM/EAP 모두 추가 method와 delegate type/event가 필요함
  11. event 결합
  12. Lamda expression Anonymous method Haskell과 같은 언어에서 많이 사용됨/nested function 하지만 Anonymous method 자체는 1936년 Lambda calculaus에서 정립됨 Closure 를 만들기 위한 것임. Lamda+ environment A closure is a lambda expression paired with an environment that binds each of its free variables to a value. In Java, lambda expressions will be implemented by means of closures, so the two terms have come to be used interchangeably in the community.
  13. 비동기 작업이 완료되면 디버그 출력 화면에 출력. 비동기 작업이 완료될 때 까지 스레드가 대기할 것임. Blocking이 발생 -> wait free/lock 로
  14. function composition 선행 task가 끝났을 때 수행할 Task Continuation 생성. Continuation chaining을 생성하여 효율을 도모할 수 있음
  15. Async/await가 C# 5.0에 추가 Async는 modifer이지만 method signature에 포함되지 않음 Task를 기반으로 동작함 언어가 library Type가 쌍을 이루어 돌아간(e.g. foreach/Ienumerable)
  16. Async는 Task /Task<Tresult> 만 혀용함 하지만 예외적으로 async void를 허용하긴 함. 그러나 최상위 event handler에서만 사용됨 Generics는 73년 ML 같은 언어에서 처음 출현 이후 Ada, Delphi, Eiffel, Java, C#, f#에서는 generics로 ML, Scala, Haskell에서는 parametric polymorphism으로 불림 C+은 template이라고 조금 다르긴 하지만 불림
  17. [CLICK] * In any UI application, Winforms/WPF/Silverlight/Phone/Win8, the UI thread runs a loop * When a click arrives, it invokes the handler. [CLICK] * When async method hits first await, returns to its caller. [CLICK] * When it hits first await, ... you know the drill [CLICK] * Back to the message-loop. That's why it's responsive, and ready to handle more UI interactions. * Doesn't freeze. [CLICK] * Later on, let's say the network download has finished. * Task gets marked as completed, and if UI thread is free, can resume where it left off. * That's going to be: finish the method [CLICK] * And so the task gets marked as completed, and again the UI thread can resume where it left off. * Okay, that's the mechanism. * Even if you don't follow, that's fine, we'll spell out the practical ramifications.
  18. 순수 TAP와 TAW With async/await의 코드를 비교.
  19. Completed와 같은 event handler, Cancel, Progress 등이 있음. EAP와 Pattern이 일치
  20. C++/CX는 WinRT를 사용하기 위한 확장으로 객체 생성시 ref new/참조시 caret(^)를 사용함.
  21. 앞서 우리가 살펴보았던 UI 응답성의 문제/비효율적 CPU 사용의 문제 그리고/비효율적인 I/O의 문제등을 해결하기 위해서 비동기 함수 호출 메커니즘은 필수 불가결한 요소가 되었음. Win32에서 WinForm, Siverlight, WinRT와 같은 Framework과 함께 C++의 PPL/C#의 TPL/Javascript CommonJS/A proposal등의 library를 제공하고 있으며, 더 나아가 async/await와 같은 강력한 언어 규격을 추가하였음. 비동기 프로그래밍은 이제 하면 좋은 것이 아니라 반드시 해야 하는 필수적인 요소로 부각되고 있음. 이는 Mobile/Desktop/Server Application이 이르기 까지 예외없이 적용되며, 분산환경의 서버에 도입될 경우 그 기대효과가 더 크다고 할 것임
  22. 부족한 내용이나마 도움이 되셨길 바라고, 참석해 주신 여러분께 다시 한번 감사의 말씀을 드립니다. 감사합니다.