Skip to Content
이벤트 기반 마이크로서비스 구축
book

이벤트 기반 마이크로서비스 구축

by 이일웅, 애덤 벨메어
May 2021
Beginner to intermediate
380 pages
7h 48m
Korean
Hanbit Media, Inc.
Content preview from 이벤트 기반 마이크로서비스 구축
273
13
장
이벤트 기반 마이크로서비스와 요청 - 응답 마이크로서비스의 통합
13.3
서드파티 요청-응답
API
연계
이벤트 기반 마이크로서비스는 요청-응답 프로토콜을 통해 서드파티
API
와 통신을 해야 할
일이 많습니다. 요청-응답 패턴은 요청과 응답을 단순히 원격 함수 호출
remote
function
call
처럼 처
리하기 때문에 이벤트 기반 처리와 잘 맞습니다. 마이크로서비스는 이벤트 기반의 로직에 따라
API
를 호출한 뒤 응답을 기다리고 응답이 도착하면 파싱해서 해당 스키마를 준수하는지 확인
한 다음, 여느 이벤트 처리와 마찬가지로 비즈니스 로직을 적용합니다. [그림
13
-
3
]은 이런 프
로세스를 일반화한 예입니다.
소비 + 요청
응답 파서
비즈니스 로직
프로듀서
마이크로서비스
5
) 출력 생산
1
) 이벤트 소비
2
) 요청
3
) 응답 수신
4
) 응답을 파싱하고
비즈니스 로직을 적용
외부 요청-응답
엔드포인트
입력 이벤트 스트림
결과 이벤트 스트림
그림
13-3
요청-응답
API
를 이벤트 기반 워크플로와 통합
다음은 블로킹 호출
blocking
call
을 하는 마이크로서비스의 로직을 나타낸 소스 코드입니다.
while (true) { //무한 처리 루프
Event[] eventsToProcess = Consumer.consume("input-event-stream");
for ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

헤드 퍼스트 자바(3판)

헤드 퍼스트 자바(3판)

케이시 시에라, 버트 베이츠
클라우드 핀옵스: 비용은 최소화 운영은 최적화

클라우드 핀옵스: 비용은 최소화 운영은 최적화

오성근, J. R. 스토먼트, 마이크 풀러

Publisher Resources

ISBN: 9791162244173