SlideShare a Scribd company logo
서버 개발자가 바라 본
Functional Reactive Programming
with RxJava
김대성
http://gmind7.github.io
Java Software Developer
2
3
4
int a = 0;
int b = a*1;
int c = a*1;
int d = b*c;
.println(d) // 0
d
a
b c
d
b
a
Machine1
c
Machine2Actor Model
Functional Reactive Programming e.g
a = 2
.println(d) // ?
// b=2, c=2, d=4
5
eXchange programming paradigm
6
FP RPFRP
Functional Reactive Programming 이란?
7
8
COMPOSABLE FUNCTIONS
REACTIVELY APPLIED
d
b
ca
9
RxJava
getData();
Calling Thread
Thread Pool
Callback Thread
Observable<Data>Public
10
RxJava
EVENT ITERABLE (PULL) OBSERVABLE (PUSH)
Retrieve Data onNext(T)
Discover Error onError(Exception)
Complete onCompleted()
PUSH 4 3 2 1 …..
11
RxJava
>> 4 3 2 1 ….. >>
ObserverObservable
PUSH
12
RxJava Hello, World!
Observable
데이터 발행 (PUSH) 하기
>> 4 3 2 1 ….. >>
PUSH
Observable<String> observable = Observable.create(
new Observable.OnSubscribe<String>() {
@Override
public void call(Subscriber<? super String> subscriber) {
subscriber.onNext("Hello, world!"); // 데이터 PUSH … next
subscriber.onCompleted(); // 데이터 PUSH 이제 그만(완료) 할게..
}
}
);
13
RxJava
Observer
Hello, World!
PUSH 될 데이터 구독(소비) 계획 하기
>> 4 3 2 1 ….. >>
Subscriber<String> subscriber = new Subscriber<String>() {
@Override // 구독 계획
public void onNext(String s) { System.out.println("onNext:" + s); }
@Override // 에러 계획
public void onError(Throwable e) { System.out.println("onError:"+e.getMessage()); }
@Override // 완료 계획
public void onCompleted() { System.out.println("onComplated"); }
};
14
RxJava Hello, World!
// 2. PUSH 될 데이터 구독 계획
Subscriber<String> subscriber = new Subscriber<String>() {……
// 3. 구독자가 가입 되면 데이터 발행 -> 구독 (Run)
observable.subscribe(subscriber);
// 1. PUSH 데이터 생성 (Async)
Observable<String> observable = Observable.create( ……
15
RxJava Hello, World!
// java 7
Observable.just("Hello, world!").subscribe(new Action1<String>() {
@Override
public void call(String s) {
System.out.println(s);
}
});
// java 8
Observable.just("Hello, world!").subscribe(System.out::println);
// Outputs
// Hello, world!
16
- Create
- Defer
- Empty / Never ..
- From
- Interval
- Just
- Range
- Repeat
- Start
- Timer
…..
- And / Then / When
- CombineLatest
- Join
- Merge
- StartWith
- Switch
- Map / FlatMap
- Zip
- Filter
- IgnoreElemets
- Last
…..
- Delay
- Do
- Materialize
- Dematerialize
- ObserveOn
- Serialize
- Subscribe
- SubscribeOn
- TimeInterval
- Timeout
…..
17
18
19
@RequestMapping(value="/callable", method = RequestMethod.GET)
public Callable<Object> callableShowAll() {
Callable<Object> callable = () -> accountService.findAll();
return callable;
}
@RequestMapping(value="/rxjava", method = RequestMethod.GET)
public DeferredResult<Object> rxJavaShowAll() {
DeferredResult<Object> deferredResult = new DeferredResult<>(5000L);
Observable<List<Account>> resources = accountService.rxFindAll();
resources.subscribe(response -> {
deferredResult.setResult(response);
});
return deferredResult;
}
RxJava +
20
1 2 3 4 5 6 …
recommendService
.requestRecommends(id)
RxJava +
21
@RequestMapping(value="/{id}", method = RequestMethod.GET)
public DeferredResult<Object> showYourStore(@PathVariable("id") Long id) {
DeferredResult<Object> deferredResult = new DeferredResult<>();
Observable<Recommend> recommendRx = recommend.requestRecommends(id);
…..
deferredResult.setResult(response);
return deferredResult;
RxJava +
22
RxJava +
public Observable<Recommend> requestRecommends(long accountId) {
return Observable.from(
RxNetty.createHttpGet("http://localhost:19080" + "/rxjava/recommend/" +
accountId)
.flatMap(response -> response.getContent().map(content ->
content.toString(Charset.defaultCharset())))
.map(data -> new Gson().fromJson(new String(data), Recommend[].class))
.toBlocking().single());
}
23
1 2 3 4 5 6 …
recommendService
.requestRecommends(id)
1 2 3 4 5
unsubscribe
.take(5)
RxJava +
24
@RequestMapping(value="/{id}", method = RequestMethod.GET)
public DeferredResult<Object> showYourStore(@PathVariable("id") Long id) {
DeferredResult<Object> deferredResult = new DeferredResult<>();
Observable<Recommend> recommendRx = recommend.requestRecommends(id);
recommendRx
.take(5)
…..
deferredResult.setResult(response);
return deferredResult;
RxJava +
25
1 2 6 …
recommendService
.requestRecommends(id)
1 2.take(5)
.flatMap() 1 2
3
3
3
4
4
4
5
5
5
RxJava +
unsubscribe
26
@RequestMapping(value="/{id}", method = RequestMethod.GET)
public DeferredResult<Object> showYourStore(@PathVariable("id") Long id) {
DeferredResult<Object> deferredResult = new DeferredResult<>();
Observable<Recommend> recommendRx = recommend.requestRecommends(id);
recommendRx
.take(3)
.flatMap(recommend -> {
…….
}
…..
deferredResult.setResult(response);
return deferredResult;
RxJava +
27
1 2 3 4 5 6 …
recommendService
.requestRecommends(id)
1 2 3 4 5.take(5)
.flatMap()
goodsMetaInfo()
1 2 3 4 5
1
RxJava +
unsubscribe
28
………………
.flatMap(recommend -> {
// async 1
Observable<GoodsMetaInfo> goodsMetaInfo = goodsMetaInfo.findOne(recommend.id())
……..
RxJava +
29
1 2 3 4 5 6 …
recommendService
.requestRecommends(id)
1 2 3 4 5.take(5)
.flatMap()
goodsMetaInfo()
.map()
1 2 3 4 5
1
1
RxJava +
unsubscribe
30
………………
.flatMap(recommend -> {
// async 1
Observable<GoodsMetaInfo> goodsMetaInfo = goodsMetaInfo.findOne(recommend.id())
.map(x -> { // 출시 1개월 이내 상품에는 [New] 타이틀 추가
boolean isNewTitle = x.createDate.isAfter(LocalDateTime.now().minusMonths(1));
if (isNewTitle) {
x.setTitle("[New] " + x.getTitle());
}
return x;
});
…….
….
})
……..
RxJava +
31
1 2 3 4 5 6 …
recommendService
.requestRecommends(id)
1 2 3 4 5.take(5)
.flatMap()
goodsMetaInfo()
goodsRating()
.map()
1 2 3 4 5
1
1
1
RxJava +
unsubscribe
32
RxJava
………………
.flatMap(recommend -> {
// async 1
Observable<GoodsMetaInfo> goodsMetaInfo = goodsMetaInfo.findOne(recommend.id())
.map(x -> {
boolean isNewTitle = x.createDate.isAfter(LocalDateTime.now().minusMonths(1));
if (isNewTitle) {
x.setTitle("[New] " + x.getTitle());
}
return x;
});
// async 2
Observable<GoodsRating> goodsRating = goodsRating.findOne(recommend.id());
…….
….
})
……..
33
1 2 3 4 5 6 …
recommendService
.requestRecommends(id)
1 2 3 4 5.take(5)
.flatMap()
goodsMetaInfo()
goodsRating()
.map()
1 2 3 4 5
1
1
.zip()
1
1
RxJava
unsubscribe
34
………………
.flatMap(recommend -> {
Observable<GoodsMetaInfo> goodsMetaInfo = goodsMetaInfo.findOne(recommend.id())
.map(x -> {
boolean isNewTitle = x.createDate.isAfter(LocalDateTime.now().minusMonths(1));
if (isNewTitle) {
x.setTitle("[New] " + x.getTitle());
}
return x;
});
Observable<GoodsRating> goodsRating = goodsRating.findOne(recommend.id());
// async 3
return Observable.zip(goodsMetaInfo, goodsRating, (x, y) -> {
Map<String, Object> map = Maps.newHashMap();
map.put("recommend", recommend);
map.put("goods", x);
map.put("rating", y);
return map;
});
})
……..
RxJava +
35
1 2 3 4 5 6 …
recommendService
.requestRecommends(id)
1 2 3 4 5
unsubscribe
.take(5)
.flatMap()
goodsMetaInfo()
goodsRating()
.map()
1 2 3 4 5
1
1
.zip()
1
1
.toList() 1 2 3 4 5
RxJava +
36
@RequestMapping(value="/{id}", method = RequestMethod.GET)
public DeferredResult<Object> showYourStore(@PathVariable("id") Long id) {
DeferredResult<Object> deferredResult = new DeferredResult<>();
Observable<Recommend> recommendRx = recommend.requestRecommends(id);
recommendRx
.take(3)
.flatMap(recommend -> {
……
})
.toList()
…..
return deferredResult;
RxJava +
37
@RequestMapping(value="/{id}", method = RequestMethod.GET)
public DeferredResult<Object> showYourStore(@PathVariable("id") Long id) {
DeferredResult<Object> deferredResult = new DeferredResult<>();
Observable<Recommend> recommendRx = recommend.requestRecommends(id);
recommendRx
.take(3)
.flatMap(recommend -> {
……..
……..
})
.toList()
.timeout(5L, TimeUnit.SECONDS)
.subscribe(response -> {
deferredResult.setResult(response);
}, error -> {
deferredResult.setErrorResult(error);
}, () -> {
});
return deferredResult;
RxJava +
38
@RequestMapping(value="/{id}", method = RequestMethod.GET)
public DeferredResult<Object> showYourStore(@PathVariable("id") Long id) {
DeferredResult<Object> deferredResult = new DeferredResult<>();
Observable<Recommend> recommendRx = recommend.requestRecommends(id);
recommendRx
.take(3)
.flatMap(recommend -> {
……..
……..
})
.toList()
.timeout(5L, TimeUnit.SECONDS)
.subscribe(response -> {
deferredResult.setResult(response);
}, error -> {
deferredResult.setErrorResult(error);
}, () -> {
});
return deferredResult;
RxJava +
39
40
41
………………
.flatMap(recommend -> {
Observable<GoodsMetaInfo> goodsMetaInfo = goodsMetaInfo.findOne(recommend.id())
…
.subscribeOn(Schedulers.computation());
Observable<GoodsRating> goodsRating = goodsRating.findOne(recommend.id())
…
.subscribeOn(Schedulers.computation());
return Observable.zip(goodsMetaInfo, goodsRating, (x, y) -> {
…
return map;
}).subscribeOn(Schedulers.computation());
})
……..
RxJava +
42
ERROR
43
@RequestMapping(value="/{id}", method = RequestMethod.GET)
public DeferredResult<Object> showYourStore(@PathVariable("id") Long id) {
DeferredResult<Object> deferredResult = new DeferredResult<>();
Observable<Recommend> recommendRx = recommend.requestRecommends(id);
recommendRx
.take(3)
.flatMap(recommend -> {
Observable<GoodsMetaInfo> goodsMetaInfo = goodsMetaInfo….
…
Observable<GoodsRating> goodsRating = goodsRating…
…
})
.toList()
.timeout(5L, TimeUnit.SECONDS)
.subscribe(response -> {
deferredResult.setResult(response);
}, error -> {
deferredResult.setErrorResult(error);
}, () -> {
});
return deferredResult;
RxJava +
44
RxJava +
request
Netty
tcpwrite
response
tcpwrite
public Channel…
@Override
public void channelRead0(ChannelHandlerContext ctx, String msg) throws Exception {
Account message = new Account(1);
Observable<Object> observable = clientReqHandler.request(ctx.channel(), message);
observable.subscribe(response -> {
ctx.channel().writeAndFlush(response);
});
}
?
tcpread
public void…
45
RxJava + Netty
public class ClientRequestHandler extends SimpleChannelInboundHandler<Object> {
private final ConcurrentHashMap QUEUE
= new ConcurrentHashMap<String, Subscriber<?>>;
public ClientRequestHandler(){
}
46
RxJava + Netty
public Observable<Object> request(final Channel channel, final Object message) {
return Observable.<Object>create(suscriber -> {
this.QUEUE.put("requestId", suscriber);
channel.writeAndFlush(message);
})
.timeout(5L, TimeUnit.SECONDS)
.finallyDo(() -> queue.remove("requestId")});
};
@Override
protected void channelRead0(ChannelHandlerContext channelHandlerContext, Object
object) throws Exception {
Subscriber subscriber = (Subscriber)this.QUEUE.remove("requestId");
if(subscriber==null) return;
subscriber.onNext(object);
subscriber.onCompleted();
}
47
RxJava + Netty
@Override
public void channelRead0(ChannelHandlerContext ctx, String msg) throws Exception {
Account message = new Account(1);
Observable<Object> observable = clientReqHandler.request(ctx.channel(), message);
observable.subscribe(response -> {
ctx.channel().writeAndFlush(response);
});
}
request1
tcpwrite
response1
tcpwrite
public void…tcpread
public void…
48
49
50
51
OOP
CACHE
RDBMS
1995 2015
HADOOP
NOSQL
FP, RX, FRP …
지금은 POLYGLOT 시대…
53
http://www.manning.com/blackheath
http://www.slideshare.net/InfoQ/functional-reactive-programming-in-the-netflix-api
https://youtu.be/-P28LKWTzrI
Towards Reactive Programming for Object-oriented Applications.pdf
http://www.slideshare.net/misgod/functional-41887638
http://ent.hankyung.com/news/app/newsview.php?aid=2014112839734
감사합니다

More Related Content

What's hot

Java 8, Streams & Collectors, patterns, performances and parallelization
Java 8, Streams & Collectors, patterns, performances and parallelizationJava 8, Streams & Collectors, patterns, performances and parallelization
Java 8, Streams & Collectors, patterns, performances and parallelization
José Paumard
 
Federated Engine 실무적용사례
Federated Engine 실무적용사례Federated Engine 실무적용사례
Federated Engine 실무적용사례
I Goo Lee
 
도메인 주도 설계의 본질
도메인 주도 설계의 본질도메인 주도 설계의 본질
도메인 주도 설계의 본질
Young-Ho Cho
 
webservice scaling for newbie
webservice scaling for newbiewebservice scaling for newbie
webservice scaling for newbie
DaeMyung Kang
 
Threading Made Easy! A Busy Developer’s Guide to Kotlin Coroutines
Threading Made Easy! A Busy Developer’s Guide to Kotlin CoroutinesThreading Made Easy! A Busy Developer’s Guide to Kotlin Coroutines
Threading Made Easy! A Busy Developer’s Guide to Kotlin Coroutines
Lauren Yew
 
InnoDB Locking Explained with Stick Figures
InnoDB Locking Explained with Stick FiguresInnoDB Locking Explained with Stick Figures
InnoDB Locking Explained with Stick Figures
Karwin Software Solutions LLC
 
오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...
오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...
오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...
Amazon Web Services Korea
 
Python 게임서버 안녕하십니까 : RPC framework 편
Python 게임서버 안녕하십니까 : RPC framework 편Python 게임서버 안녕하십니까 : RPC framework 편
Python 게임서버 안녕하십니까 : RPC framework 편
준철 박
 
김민욱, (달빛조각사) 엘릭서를 이용한 mmorpg 서버 개발, NDC2019
김민욱, (달빛조각사) 엘릭서를 이용한 mmorpg 서버 개발, NDC2019김민욱, (달빛조각사) 엘릭서를 이용한 mmorpg 서버 개발, NDC2019
김민욱, (달빛조각사) 엘릭서를 이용한 mmorpg 서버 개발, NDC2019min woog kim
 
초보자를 위한 분산 캐시 이야기
초보자를 위한 분산 캐시 이야기초보자를 위한 분산 캐시 이야기
초보자를 위한 분산 캐시 이야기OnGameServer
 
C++20 Key Features Summary
C++20 Key Features SummaryC++20 Key Features Summary
C++20 Key Features Summary
Chris Ohk
 
Node.js API 서버 성능 개선기
Node.js API 서버 성능 개선기Node.js API 서버 성능 개선기
Node.js API 서버 성능 개선기
JeongHun Byeon
 
The Art of Unit Testing - Towards a Testable Design
The Art of Unit Testing - Towards a Testable DesignThe Art of Unit Testing - Towards a Testable Design
The Art of Unit Testing - Towards a Testable Design
Victor Rentea
 
Evolving a Clean, Pragmatic Architecture - A Craftsman's Guide
Evolving a Clean, Pragmatic Architecture - A Craftsman's GuideEvolving a Clean, Pragmatic Architecture - A Craftsman's Guide
Evolving a Clean, Pragmatic Architecture - A Craftsman's Guide
Victor Rentea
 
How to build massive service for advance
How to build massive service for advanceHow to build massive service for advance
How to build massive service for advance
DaeMyung Kang
 
〈야생의 땅: 듀랑고〉 서버 아키텍처 Vol. 3
〈야생의 땅: 듀랑고〉 서버 아키텍처 Vol. 3〈야생의 땅: 듀랑고〉 서버 아키텍처 Vol. 3
〈야생의 땅: 듀랑고〉 서버 아키텍처 Vol. 3
Heungsub Lee
 
Hexagonal architecture with Spring Boot
Hexagonal architecture with Spring BootHexagonal architecture with Spring Boot
Hexagonal architecture with Spring Boot
Mikalai Alimenkou
 
[IGC2018] 넷마블 이상철 - 모바일 게임 보안 AR(Android Republic) 변조앱 내부를 파헤치다
[IGC2018] 넷마블 이상철 - 모바일 게임 보안 AR(Android Republic) 변조앱 내부를 파헤치다[IGC2018] 넷마블 이상철 - 모바일 게임 보안 AR(Android Republic) 변조앱 내부를 파헤치다
[IGC2018] 넷마블 이상철 - 모바일 게임 보안 AR(Android Republic) 변조앱 내부를 파헤치다
강 민우
 
The Power of Composition
The Power of CompositionThe Power of Composition
The Power of Composition
Scott Wlaschin
 
시즌 2: 멀티쓰레드 프로그래밍이 왜이리 힘드나요?
시즌 2: 멀티쓰레드 프로그래밍이 왜이리 힘드나요?시즌 2: 멀티쓰레드 프로그래밍이 왜이리 힘드나요?
시즌 2: 멀티쓰레드 프로그래밍이 왜이리 힘드나요?
내훈 정
 

What's hot (20)

Java 8, Streams & Collectors, patterns, performances and parallelization
Java 8, Streams & Collectors, patterns, performances and parallelizationJava 8, Streams & Collectors, patterns, performances and parallelization
Java 8, Streams & Collectors, patterns, performances and parallelization
 
Federated Engine 실무적용사례
Federated Engine 실무적용사례Federated Engine 실무적용사례
Federated Engine 실무적용사례
 
도메인 주도 설계의 본질
도메인 주도 설계의 본질도메인 주도 설계의 본질
도메인 주도 설계의 본질
 
webservice scaling for newbie
webservice scaling for newbiewebservice scaling for newbie
webservice scaling for newbie
 
Threading Made Easy! A Busy Developer’s Guide to Kotlin Coroutines
Threading Made Easy! A Busy Developer’s Guide to Kotlin CoroutinesThreading Made Easy! A Busy Developer’s Guide to Kotlin Coroutines
Threading Made Easy! A Busy Developer’s Guide to Kotlin Coroutines
 
InnoDB Locking Explained with Stick Figures
InnoDB Locking Explained with Stick FiguresInnoDB Locking Explained with Stick Figures
InnoDB Locking Explained with Stick Figures
 
오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...
오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...
오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...
 
Python 게임서버 안녕하십니까 : RPC framework 편
Python 게임서버 안녕하십니까 : RPC framework 편Python 게임서버 안녕하십니까 : RPC framework 편
Python 게임서버 안녕하십니까 : RPC framework 편
 
김민욱, (달빛조각사) 엘릭서를 이용한 mmorpg 서버 개발, NDC2019
김민욱, (달빛조각사) 엘릭서를 이용한 mmorpg 서버 개발, NDC2019김민욱, (달빛조각사) 엘릭서를 이용한 mmorpg 서버 개발, NDC2019
김민욱, (달빛조각사) 엘릭서를 이용한 mmorpg 서버 개발, NDC2019
 
초보자를 위한 분산 캐시 이야기
초보자를 위한 분산 캐시 이야기초보자를 위한 분산 캐시 이야기
초보자를 위한 분산 캐시 이야기
 
C++20 Key Features Summary
C++20 Key Features SummaryC++20 Key Features Summary
C++20 Key Features Summary
 
Node.js API 서버 성능 개선기
Node.js API 서버 성능 개선기Node.js API 서버 성능 개선기
Node.js API 서버 성능 개선기
 
The Art of Unit Testing - Towards a Testable Design
The Art of Unit Testing - Towards a Testable DesignThe Art of Unit Testing - Towards a Testable Design
The Art of Unit Testing - Towards a Testable Design
 
Evolving a Clean, Pragmatic Architecture - A Craftsman's Guide
Evolving a Clean, Pragmatic Architecture - A Craftsman's GuideEvolving a Clean, Pragmatic Architecture - A Craftsman's Guide
Evolving a Clean, Pragmatic Architecture - A Craftsman's Guide
 
How to build massive service for advance
How to build massive service for advanceHow to build massive service for advance
How to build massive service for advance
 
〈야생의 땅: 듀랑고〉 서버 아키텍처 Vol. 3
〈야생의 땅: 듀랑고〉 서버 아키텍처 Vol. 3〈야생의 땅: 듀랑고〉 서버 아키텍처 Vol. 3
〈야생의 땅: 듀랑고〉 서버 아키텍처 Vol. 3
 
Hexagonal architecture with Spring Boot
Hexagonal architecture with Spring BootHexagonal architecture with Spring Boot
Hexagonal architecture with Spring Boot
 
[IGC2018] 넷마블 이상철 - 모바일 게임 보안 AR(Android Republic) 변조앱 내부를 파헤치다
[IGC2018] 넷마블 이상철 - 모바일 게임 보안 AR(Android Republic) 변조앱 내부를 파헤치다[IGC2018] 넷마블 이상철 - 모바일 게임 보안 AR(Android Republic) 변조앱 내부를 파헤치다
[IGC2018] 넷마블 이상철 - 모바일 게임 보안 AR(Android Republic) 변조앱 내부를 파헤치다
 
The Power of Composition
The Power of CompositionThe Power of Composition
The Power of Composition
 
시즌 2: 멀티쓰레드 프로그래밍이 왜이리 힘드나요?
시즌 2: 멀티쓰레드 프로그래밍이 왜이리 힘드나요?시즌 2: 멀티쓰레드 프로그래밍이 왜이리 힘드나요?
시즌 2: 멀티쓰레드 프로그래밍이 왜이리 힘드나요?
 

Viewers also liked

Cascadia.js: Don't Cross the Streams
Cascadia.js: Don't Cross the StreamsCascadia.js: Don't Cross the Streams
Cascadia.js: Don't Cross the Streams
mattpodwysocki
 
[1B4]안드로이드 동시성_프로그래밍
[1B4]안드로이드 동시성_프로그래밍[1B4]안드로이드 동시성_프로그래밍
[1B4]안드로이드 동시성_프로그래밍
NAVER D2
 
Functional Reactive Programming With RxSwift
Functional Reactive Programming With RxSwiftFunctional Reactive Programming With RxSwift
Functional Reactive Programming With RxSwift
선협 이
 
Functional Reactive Programming with RxJS
Functional Reactive Programming with RxJSFunctional Reactive Programming with RxJS
Functional Reactive Programming with RxJS
stefanmayer13
 
NDC14 - Rx와 Functional Reactive Programming으로 고성능 서버 만들기
NDC14 - Rx와 Functional Reactive Programming으로 고성능 서버 만들기NDC14 - Rx와 Functional Reactive Programming으로 고성능 서버 만들기
NDC14 - Rx와 Functional Reactive Programming으로 고성능 서버 만들기
Jong Wook Kim
 
RxJS and Reactive Programming - Modern Web UI - May 2015
RxJS and Reactive Programming - Modern Web UI - May 2015RxJS and Reactive Programming - Modern Web UI - May 2015
RxJS and Reactive Programming - Modern Web UI - May 2015
Ben Lesh
 
혁신적인 웹컴포넌트 라이브러리 - Polymer
혁신적인 웹컴포넌트 라이브러리 - Polymer혁신적인 웹컴포넌트 라이브러리 - Polymer
혁신적인 웹컴포넌트 라이브러리 - Polymer
Jae Sung Park
 
FalsyValues. Dmitry Soshnikov - ECMAScript 6
FalsyValues. Dmitry Soshnikov - ECMAScript 6FalsyValues. Dmitry Soshnikov - ECMAScript 6
FalsyValues. Dmitry Soshnikov - ECMAScript 6
Dmitry Soshnikov
 
Module, AMD, RequireJS
Module, AMD, RequireJSModule, AMD, RequireJS
Module, AMD, RequireJS偉格 高
 
RxAndroid: 비동기 및 이벤트 기반 프로그래밍을 위한 라이브러리
RxAndroid: 비동기 및 이벤트 기반 프로그래밍을 위한 라이브러리RxAndroid: 비동기 및 이벤트 기반 프로그래밍을 위한 라이브러리
RxAndroid: 비동기 및 이벤트 기반 프로그래밍을 위한 라이브러리
Soyeon Kim
 
Angular2 ecosystem
Angular2 ecosystemAngular2 ecosystem
Angular2 ecosystem
Kamil Lelonek
 
System webpack-jspm
System webpack-jspmSystem webpack-jspm
System webpack-jspmJesse Warden
 
Compose Async with RxJS
Compose Async with RxJSCompose Async with RxJS
Compose Async with RxJS
Kyung Yeol Kim
 
React in Native Apps - Meetup React - 20150409
React in Native Apps - Meetup React - 20150409React in Native Apps - Meetup React - 20150409
React in Native Apps - Meetup React - 20150409
Minko3D
 
React JS and why it's awesome
React JS and why it's awesomeReact JS and why it's awesome
React JS and why it's awesome
Andrew Hull
 
맛만 보자 액터 모델이란
맛만 보자 액터 모델이란 맛만 보자 액터 모델이란
맛만 보자 액터 모델이란
jbugkorea
 
DEVOPS 에 대한 전반적인 소개 및 자동화툴 소개
DEVOPS 에 대한 전반적인 소개 및 자동화툴 소개DEVOPS 에 대한 전반적인 소개 및 자동화툴 소개
DEVOPS 에 대한 전반적인 소개 및 자동화툴 소개
태준 문
 
DevOps와 자동화
DevOps와 자동화DevOps와 자동화
DevOps와 자동화
DONGSU KIM
 
Ksug2015 jpa5 스프링과jpa
Ksug2015 jpa5 스프링과jpaKsug2015 jpa5 스프링과jpa
Ksug2015 jpa5 스프링과jpa
Younghan Kim
 
DevOps with Docker
DevOps with DockerDevOps with Docker
DevOps with Docker
Sangcheol Hwang
 

Viewers also liked (20)

Cascadia.js: Don't Cross the Streams
Cascadia.js: Don't Cross the StreamsCascadia.js: Don't Cross the Streams
Cascadia.js: Don't Cross the Streams
 
[1B4]안드로이드 동시성_프로그래밍
[1B4]안드로이드 동시성_프로그래밍[1B4]안드로이드 동시성_프로그래밍
[1B4]안드로이드 동시성_프로그래밍
 
Functional Reactive Programming With RxSwift
Functional Reactive Programming With RxSwiftFunctional Reactive Programming With RxSwift
Functional Reactive Programming With RxSwift
 
Functional Reactive Programming with RxJS
Functional Reactive Programming with RxJSFunctional Reactive Programming with RxJS
Functional Reactive Programming with RxJS
 
NDC14 - Rx와 Functional Reactive Programming으로 고성능 서버 만들기
NDC14 - Rx와 Functional Reactive Programming으로 고성능 서버 만들기NDC14 - Rx와 Functional Reactive Programming으로 고성능 서버 만들기
NDC14 - Rx와 Functional Reactive Programming으로 고성능 서버 만들기
 
RxJS and Reactive Programming - Modern Web UI - May 2015
RxJS and Reactive Programming - Modern Web UI - May 2015RxJS and Reactive Programming - Modern Web UI - May 2015
RxJS and Reactive Programming - Modern Web UI - May 2015
 
혁신적인 웹컴포넌트 라이브러리 - Polymer
혁신적인 웹컴포넌트 라이브러리 - Polymer혁신적인 웹컴포넌트 라이브러리 - Polymer
혁신적인 웹컴포넌트 라이브러리 - Polymer
 
FalsyValues. Dmitry Soshnikov - ECMAScript 6
FalsyValues. Dmitry Soshnikov - ECMAScript 6FalsyValues. Dmitry Soshnikov - ECMAScript 6
FalsyValues. Dmitry Soshnikov - ECMAScript 6
 
Module, AMD, RequireJS
Module, AMD, RequireJSModule, AMD, RequireJS
Module, AMD, RequireJS
 
RxAndroid: 비동기 및 이벤트 기반 프로그래밍을 위한 라이브러리
RxAndroid: 비동기 및 이벤트 기반 프로그래밍을 위한 라이브러리RxAndroid: 비동기 및 이벤트 기반 프로그래밍을 위한 라이브러리
RxAndroid: 비동기 및 이벤트 기반 프로그래밍을 위한 라이브러리
 
Angular2 ecosystem
Angular2 ecosystemAngular2 ecosystem
Angular2 ecosystem
 
System webpack-jspm
System webpack-jspmSystem webpack-jspm
System webpack-jspm
 
Compose Async with RxJS
Compose Async with RxJSCompose Async with RxJS
Compose Async with RxJS
 
React in Native Apps - Meetup React - 20150409
React in Native Apps - Meetup React - 20150409React in Native Apps - Meetup React - 20150409
React in Native Apps - Meetup React - 20150409
 
React JS and why it's awesome
React JS and why it's awesomeReact JS and why it's awesome
React JS and why it's awesome
 
맛만 보자 액터 모델이란
맛만 보자 액터 모델이란 맛만 보자 액터 모델이란
맛만 보자 액터 모델이란
 
DEVOPS 에 대한 전반적인 소개 및 자동화툴 소개
DEVOPS 에 대한 전반적인 소개 및 자동화툴 소개DEVOPS 에 대한 전반적인 소개 및 자동화툴 소개
DEVOPS 에 대한 전반적인 소개 및 자동화툴 소개
 
DevOps와 자동화
DevOps와 자동화DevOps와 자동화
DevOps와 자동화
 
Ksug2015 jpa5 스프링과jpa
Ksug2015 jpa5 스프링과jpaKsug2015 jpa5 스프링과jpa
Ksug2015 jpa5 스프링과jpa
 
DevOps with Docker
DevOps with DockerDevOps with Docker
DevOps with Docker
 

Similar to 서버 개발자가 바라 본 Functional Reactive Programming with RxJava - SpringCamp2015

Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with ClojureDmitry Buzdin
 
Angular2 rxjs
Angular2 rxjsAngular2 rxjs
Angular2 rxjs
Christoffer Noring
 
RxJS Evolved
RxJS EvolvedRxJS Evolved
RxJS Evolved
trxcllnt
 
Reactive programming on Android
Reactive programming on AndroidReactive programming on Android
Reactive programming on Android
Tomáš Kypta
 
Async Microservices with Twitter's Finagle
Async Microservices with Twitter's FinagleAsync Microservices with Twitter's Finagle
Async Microservices with Twitter's Finagle
Vladimir Kostyukov
 
RxJava и Android. Плюсы, минусы, подводные камни
RxJava и Android. Плюсы, минусы, подводные камниRxJava и Android. Плюсы, минусы, подводные камни
RxJava и Android. Плюсы, минусы, подводные камни
Stfalcon Meetups
 
Rx java in action
Rx java in actionRx java in action
Rx java in action
Pratama Nur Wijaya
 
Luis Atencio on RxJS
Luis Atencio on RxJSLuis Atencio on RxJS
Luis Atencio on RxJS
Luis Atencio
 
Rxjs marble-testing
Rxjs marble-testingRxjs marble-testing
Rxjs marble-testing
Christoffer Noring
 
10. Kapusta, Stofanak - eGlu
10. Kapusta, Stofanak - eGlu10. Kapusta, Stofanak - eGlu
10. Kapusta, Stofanak - eGlu
MobCon
 
Migrating from Flux to Redux. Why and how.
Migrating from Flux to Redux. Why and how.Migrating from Flux to Redux. Why and how.
Migrating from Flux to Redux. Why and how.
Astrails
 
RxJava for Android - GDG DevFest Ukraine 2015
RxJava for Android - GDG DevFest Ukraine 2015RxJava for Android - GDG DevFest Ukraine 2015
RxJava for Android - GDG DevFest Ukraine 2015
Constantine Mars
 
Gearmam, from the_worker's_perspective copy
Gearmam, from the_worker's_perspective copyGearmam, from the_worker's_perspective copy
Gearmam, from the_worker's_perspective copyBrian Aker
 
Gearmam, from the_worker's_perspective copy
Gearmam, from the_worker's_perspective copyGearmam, from the_worker's_perspective copy
Gearmam, from the_worker's_perspective copyBrian Aker
 
Building Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJavaBuilding Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJava
Rick Warren
 
Timur Shemsedinov "Пишу на колбеках, а что... (Асинхронное программирование)"
Timur Shemsedinov "Пишу на колбеках, а что... (Асинхронное программирование)"Timur Shemsedinov "Пишу на колбеках, а что... (Асинхронное программирование)"
Timur Shemsedinov "Пишу на колбеках, а что... (Асинхронное программирование)"
OdessaJS Conf
 
TypeScript Introduction
TypeScript IntroductionTypeScript Introduction
TypeScript Introduction
Dmitry Sheiko
 
CodiLime Tech Talk - Katarzyna Ziomek-Zdanowicz: RxJS main concepts and real ...
CodiLime Tech Talk - Katarzyna Ziomek-Zdanowicz: RxJS main concepts and real ...CodiLime Tech Talk - Katarzyna Ziomek-Zdanowicz: RxJS main concepts and real ...
CodiLime Tech Talk - Katarzyna Ziomek-Zdanowicz: RxJS main concepts and real ...
CodiLime
 
Spark workshop
Spark workshopSpark workshop
Spark workshop
Wojciech Pituła
 
What they don't tell you about JavaScript
What they don't tell you about JavaScriptWhat they don't tell you about JavaScript
What they don't tell you about JavaScriptRaphael Cruzeiro
 

Similar to 서버 개발자가 바라 본 Functional Reactive Programming with RxJava - SpringCamp2015 (20)

Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with Clojure
 
Angular2 rxjs
Angular2 rxjsAngular2 rxjs
Angular2 rxjs
 
RxJS Evolved
RxJS EvolvedRxJS Evolved
RxJS Evolved
 
Reactive programming on Android
Reactive programming on AndroidReactive programming on Android
Reactive programming on Android
 
Async Microservices with Twitter's Finagle
Async Microservices with Twitter's FinagleAsync Microservices with Twitter's Finagle
Async Microservices with Twitter's Finagle
 
RxJava и Android. Плюсы, минусы, подводные камни
RxJava и Android. Плюсы, минусы, подводные камниRxJava и Android. Плюсы, минусы, подводные камни
RxJava и Android. Плюсы, минусы, подводные камни
 
Rx java in action
Rx java in actionRx java in action
Rx java in action
 
Luis Atencio on RxJS
Luis Atencio on RxJSLuis Atencio on RxJS
Luis Atencio on RxJS
 
Rxjs marble-testing
Rxjs marble-testingRxjs marble-testing
Rxjs marble-testing
 
10. Kapusta, Stofanak - eGlu
10. Kapusta, Stofanak - eGlu10. Kapusta, Stofanak - eGlu
10. Kapusta, Stofanak - eGlu
 
Migrating from Flux to Redux. Why and how.
Migrating from Flux to Redux. Why and how.Migrating from Flux to Redux. Why and how.
Migrating from Flux to Redux. Why and how.
 
RxJava for Android - GDG DevFest Ukraine 2015
RxJava for Android - GDG DevFest Ukraine 2015RxJava for Android - GDG DevFest Ukraine 2015
RxJava for Android - GDG DevFest Ukraine 2015
 
Gearmam, from the_worker's_perspective copy
Gearmam, from the_worker's_perspective copyGearmam, from the_worker's_perspective copy
Gearmam, from the_worker's_perspective copy
 
Gearmam, from the_worker's_perspective copy
Gearmam, from the_worker's_perspective copyGearmam, from the_worker's_perspective copy
Gearmam, from the_worker's_perspective copy
 
Building Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJavaBuilding Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJava
 
Timur Shemsedinov "Пишу на колбеках, а что... (Асинхронное программирование)"
Timur Shemsedinov "Пишу на колбеках, а что... (Асинхронное программирование)"Timur Shemsedinov "Пишу на колбеках, а что... (Асинхронное программирование)"
Timur Shemsedinov "Пишу на колбеках, а что... (Асинхронное программирование)"
 
TypeScript Introduction
TypeScript IntroductionTypeScript Introduction
TypeScript Introduction
 
CodiLime Tech Talk - Katarzyna Ziomek-Zdanowicz: RxJS main concepts and real ...
CodiLime Tech Talk - Katarzyna Ziomek-Zdanowicz: RxJS main concepts and real ...CodiLime Tech Talk - Katarzyna Ziomek-Zdanowicz: RxJS main concepts and real ...
CodiLime Tech Talk - Katarzyna Ziomek-Zdanowicz: RxJS main concepts and real ...
 
Spark workshop
Spark workshopSpark workshop
Spark workshop
 
What they don't tell you about JavaScript
What they don't tell you about JavaScriptWhat they don't tell you about JavaScript
What they don't tell you about JavaScript
 

Recently uploaded

Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Jay Das
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
Srikant77
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
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
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
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
 
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
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 

Recently uploaded (20)

Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
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...
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
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
 
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
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 

서버 개발자가 바라 본 Functional Reactive Programming with RxJava - SpringCamp2015

  • 1. 서버 개발자가 바라 본 Functional Reactive Programming with RxJava 김대성 http://gmind7.github.io Java Software Developer
  • 2. 2
  • 3. 3
  • 4. 4 int a = 0; int b = a*1; int c = a*1; int d = b*c; .println(d) // 0 d a b c d b a Machine1 c Machine2Actor Model Functional Reactive Programming e.g a = 2 .println(d) // ? // b=2, c=2, d=4
  • 6. 6 FP RPFRP Functional Reactive Programming 이란?
  • 7. 7
  • 10. 10 RxJava EVENT ITERABLE (PULL) OBSERVABLE (PUSH) Retrieve Data onNext(T) Discover Error onError(Exception) Complete onCompleted() PUSH 4 3 2 1 …..
  • 11. 11 RxJava >> 4 3 2 1 ….. >> ObserverObservable PUSH
  • 12. 12 RxJava Hello, World! Observable 데이터 발행 (PUSH) 하기 >> 4 3 2 1 ….. >> PUSH Observable<String> observable = Observable.create( new Observable.OnSubscribe<String>() { @Override public void call(Subscriber<? super String> subscriber) { subscriber.onNext("Hello, world!"); // 데이터 PUSH … next subscriber.onCompleted(); // 데이터 PUSH 이제 그만(완료) 할게.. } } );
  • 13. 13 RxJava Observer Hello, World! PUSH 될 데이터 구독(소비) 계획 하기 >> 4 3 2 1 ….. >> Subscriber<String> subscriber = new Subscriber<String>() { @Override // 구독 계획 public void onNext(String s) { System.out.println("onNext:" + s); } @Override // 에러 계획 public void onError(Throwable e) { System.out.println("onError:"+e.getMessage()); } @Override // 완료 계획 public void onCompleted() { System.out.println("onComplated"); } };
  • 14. 14 RxJava Hello, World! // 2. PUSH 될 데이터 구독 계획 Subscriber<String> subscriber = new Subscriber<String>() {…… // 3. 구독자가 가입 되면 데이터 발행 -> 구독 (Run) observable.subscribe(subscriber); // 1. PUSH 데이터 생성 (Async) Observable<String> observable = Observable.create( ……
  • 15. 15 RxJava Hello, World! // java 7 Observable.just("Hello, world!").subscribe(new Action1<String>() { @Override public void call(String s) { System.out.println(s); } }); // java 8 Observable.just("Hello, world!").subscribe(System.out::println); // Outputs // Hello, world!
  • 16. 16 - Create - Defer - Empty / Never .. - From - Interval - Just - Range - Repeat - Start - Timer ….. - And / Then / When - CombineLatest - Join - Merge - StartWith - Switch - Map / FlatMap - Zip - Filter - IgnoreElemets - Last ….. - Delay - Do - Materialize - Dematerialize - ObserveOn - Serialize - Subscribe - SubscribeOn - TimeInterval - Timeout …..
  • 17. 17
  • 18. 18
  • 19. 19 @RequestMapping(value="/callable", method = RequestMethod.GET) public Callable<Object> callableShowAll() { Callable<Object> callable = () -> accountService.findAll(); return callable; } @RequestMapping(value="/rxjava", method = RequestMethod.GET) public DeferredResult<Object> rxJavaShowAll() { DeferredResult<Object> deferredResult = new DeferredResult<>(5000L); Observable<List<Account>> resources = accountService.rxFindAll(); resources.subscribe(response -> { deferredResult.setResult(response); }); return deferredResult; } RxJava +
  • 20. 20 1 2 3 4 5 6 … recommendService .requestRecommends(id) RxJava +
  • 21. 21 @RequestMapping(value="/{id}", method = RequestMethod.GET) public DeferredResult<Object> showYourStore(@PathVariable("id") Long id) { DeferredResult<Object> deferredResult = new DeferredResult<>(); Observable<Recommend> recommendRx = recommend.requestRecommends(id); ….. deferredResult.setResult(response); return deferredResult; RxJava +
  • 22. 22 RxJava + public Observable<Recommend> requestRecommends(long accountId) { return Observable.from( RxNetty.createHttpGet("http://localhost:19080" + "/rxjava/recommend/" + accountId) .flatMap(response -> response.getContent().map(content -> content.toString(Charset.defaultCharset()))) .map(data -> new Gson().fromJson(new String(data), Recommend[].class)) .toBlocking().single()); }
  • 23. 23 1 2 3 4 5 6 … recommendService .requestRecommends(id) 1 2 3 4 5 unsubscribe .take(5) RxJava +
  • 24. 24 @RequestMapping(value="/{id}", method = RequestMethod.GET) public DeferredResult<Object> showYourStore(@PathVariable("id") Long id) { DeferredResult<Object> deferredResult = new DeferredResult<>(); Observable<Recommend> recommendRx = recommend.requestRecommends(id); recommendRx .take(5) ….. deferredResult.setResult(response); return deferredResult; RxJava +
  • 25. 25 1 2 6 … recommendService .requestRecommends(id) 1 2.take(5) .flatMap() 1 2 3 3 3 4 4 4 5 5 5 RxJava + unsubscribe
  • 26. 26 @RequestMapping(value="/{id}", method = RequestMethod.GET) public DeferredResult<Object> showYourStore(@PathVariable("id") Long id) { DeferredResult<Object> deferredResult = new DeferredResult<>(); Observable<Recommend> recommendRx = recommend.requestRecommends(id); recommendRx .take(3) .flatMap(recommend -> { ……. } ….. deferredResult.setResult(response); return deferredResult; RxJava +
  • 27. 27 1 2 3 4 5 6 … recommendService .requestRecommends(id) 1 2 3 4 5.take(5) .flatMap() goodsMetaInfo() 1 2 3 4 5 1 RxJava + unsubscribe
  • 28. 28 ……………… .flatMap(recommend -> { // async 1 Observable<GoodsMetaInfo> goodsMetaInfo = goodsMetaInfo.findOne(recommend.id()) …….. RxJava +
  • 29. 29 1 2 3 4 5 6 … recommendService .requestRecommends(id) 1 2 3 4 5.take(5) .flatMap() goodsMetaInfo() .map() 1 2 3 4 5 1 1 RxJava + unsubscribe
  • 30. 30 ……………… .flatMap(recommend -> { // async 1 Observable<GoodsMetaInfo> goodsMetaInfo = goodsMetaInfo.findOne(recommend.id()) .map(x -> { // 출시 1개월 이내 상품에는 [New] 타이틀 추가 boolean isNewTitle = x.createDate.isAfter(LocalDateTime.now().minusMonths(1)); if (isNewTitle) { x.setTitle("[New] " + x.getTitle()); } return x; }); ……. …. }) …….. RxJava +
  • 31. 31 1 2 3 4 5 6 … recommendService .requestRecommends(id) 1 2 3 4 5.take(5) .flatMap() goodsMetaInfo() goodsRating() .map() 1 2 3 4 5 1 1 1 RxJava + unsubscribe
  • 32. 32 RxJava ……………… .flatMap(recommend -> { // async 1 Observable<GoodsMetaInfo> goodsMetaInfo = goodsMetaInfo.findOne(recommend.id()) .map(x -> { boolean isNewTitle = x.createDate.isAfter(LocalDateTime.now().minusMonths(1)); if (isNewTitle) { x.setTitle("[New] " + x.getTitle()); } return x; }); // async 2 Observable<GoodsRating> goodsRating = goodsRating.findOne(recommend.id()); ……. …. }) ……..
  • 33. 33 1 2 3 4 5 6 … recommendService .requestRecommends(id) 1 2 3 4 5.take(5) .flatMap() goodsMetaInfo() goodsRating() .map() 1 2 3 4 5 1 1 .zip() 1 1 RxJava unsubscribe
  • 34. 34 ……………… .flatMap(recommend -> { Observable<GoodsMetaInfo> goodsMetaInfo = goodsMetaInfo.findOne(recommend.id()) .map(x -> { boolean isNewTitle = x.createDate.isAfter(LocalDateTime.now().minusMonths(1)); if (isNewTitle) { x.setTitle("[New] " + x.getTitle()); } return x; }); Observable<GoodsRating> goodsRating = goodsRating.findOne(recommend.id()); // async 3 return Observable.zip(goodsMetaInfo, goodsRating, (x, y) -> { Map<String, Object> map = Maps.newHashMap(); map.put("recommend", recommend); map.put("goods", x); map.put("rating", y); return map; }); }) …….. RxJava +
  • 35. 35 1 2 3 4 5 6 … recommendService .requestRecommends(id) 1 2 3 4 5 unsubscribe .take(5) .flatMap() goodsMetaInfo() goodsRating() .map() 1 2 3 4 5 1 1 .zip() 1 1 .toList() 1 2 3 4 5 RxJava +
  • 36. 36 @RequestMapping(value="/{id}", method = RequestMethod.GET) public DeferredResult<Object> showYourStore(@PathVariable("id") Long id) { DeferredResult<Object> deferredResult = new DeferredResult<>(); Observable<Recommend> recommendRx = recommend.requestRecommends(id); recommendRx .take(3) .flatMap(recommend -> { …… }) .toList() ….. return deferredResult; RxJava +
  • 37. 37 @RequestMapping(value="/{id}", method = RequestMethod.GET) public DeferredResult<Object> showYourStore(@PathVariable("id") Long id) { DeferredResult<Object> deferredResult = new DeferredResult<>(); Observable<Recommend> recommendRx = recommend.requestRecommends(id); recommendRx .take(3) .flatMap(recommend -> { …….. …….. }) .toList() .timeout(5L, TimeUnit.SECONDS) .subscribe(response -> { deferredResult.setResult(response); }, error -> { deferredResult.setErrorResult(error); }, () -> { }); return deferredResult; RxJava +
  • 38. 38 @RequestMapping(value="/{id}", method = RequestMethod.GET) public DeferredResult<Object> showYourStore(@PathVariable("id") Long id) { DeferredResult<Object> deferredResult = new DeferredResult<>(); Observable<Recommend> recommendRx = recommend.requestRecommends(id); recommendRx .take(3) .flatMap(recommend -> { …….. …….. }) .toList() .timeout(5L, TimeUnit.SECONDS) .subscribe(response -> { deferredResult.setResult(response); }, error -> { deferredResult.setErrorResult(error); }, () -> { }); return deferredResult; RxJava +
  • 39. 39
  • 40. 40
  • 41. 41 ……………… .flatMap(recommend -> { Observable<GoodsMetaInfo> goodsMetaInfo = goodsMetaInfo.findOne(recommend.id()) … .subscribeOn(Schedulers.computation()); Observable<GoodsRating> goodsRating = goodsRating.findOne(recommend.id()) … .subscribeOn(Schedulers.computation()); return Observable.zip(goodsMetaInfo, goodsRating, (x, y) -> { … return map; }).subscribeOn(Schedulers.computation()); }) …….. RxJava +
  • 43. 43 @RequestMapping(value="/{id}", method = RequestMethod.GET) public DeferredResult<Object> showYourStore(@PathVariable("id") Long id) { DeferredResult<Object> deferredResult = new DeferredResult<>(); Observable<Recommend> recommendRx = recommend.requestRecommends(id); recommendRx .take(3) .flatMap(recommend -> { Observable<GoodsMetaInfo> goodsMetaInfo = goodsMetaInfo…. … Observable<GoodsRating> goodsRating = goodsRating… … }) .toList() .timeout(5L, TimeUnit.SECONDS) .subscribe(response -> { deferredResult.setResult(response); }, error -> { deferredResult.setErrorResult(error); }, () -> { }); return deferredResult; RxJava +
  • 44. 44 RxJava + request Netty tcpwrite response tcpwrite public Channel… @Override public void channelRead0(ChannelHandlerContext ctx, String msg) throws Exception { Account message = new Account(1); Observable<Object> observable = clientReqHandler.request(ctx.channel(), message); observable.subscribe(response -> { ctx.channel().writeAndFlush(response); }); } ? tcpread public void…
  • 45. 45 RxJava + Netty public class ClientRequestHandler extends SimpleChannelInboundHandler<Object> { private final ConcurrentHashMap QUEUE = new ConcurrentHashMap<String, Subscriber<?>>; public ClientRequestHandler(){ }
  • 46. 46 RxJava + Netty public Observable<Object> request(final Channel channel, final Object message) { return Observable.<Object>create(suscriber -> { this.QUEUE.put("requestId", suscriber); channel.writeAndFlush(message); }) .timeout(5L, TimeUnit.SECONDS) .finallyDo(() -> queue.remove("requestId")}); }; @Override protected void channelRead0(ChannelHandlerContext channelHandlerContext, Object object) throws Exception { Subscriber subscriber = (Subscriber)this.QUEUE.remove("requestId"); if(subscriber==null) return; subscriber.onNext(object); subscriber.onCompleted(); }
  • 47. 47 RxJava + Netty @Override public void channelRead0(ChannelHandlerContext ctx, String msg) throws Exception { Account message = new Account(1); Observable<Object> observable = clientReqHandler.request(ctx.channel(), message); observable.subscribe(response -> { ctx.channel().writeAndFlush(response); }); } request1 tcpwrite response1 tcpwrite public void…tcpread public void…
  • 48. 48
  • 49. 49
  • 50. 50
  • 51. 51
  • 52. OOP CACHE RDBMS 1995 2015 HADOOP NOSQL FP, RX, FRP … 지금은 POLYGLOT 시대…
  • 53. 53 http://www.manning.com/blackheath http://www.slideshare.net/InfoQ/functional-reactive-programming-in-the-netflix-api https://youtu.be/-P28LKWTzrI Towards Reactive Programming for Object-oriented Applications.pdf http://www.slideshare.net/misgod/functional-41887638 http://ent.hankyung.com/news/app/newsview.php?aid=2014112839734