up to 70 backend requests. Each backend response should be visible as soon as possible to the user. The total response time should remain close to the response time of the slowest backend. (~15s)
Has an incoming message queue Reaction loop processing messages one by one Reacts to incoming messages by: making local decisions sending more messages to other Actors replying a message to the sender
!"#$1+"2*+&(# 3#-1. !"#$1+"2*+&(# '(-4 !"#$1+"2*+&(# 5&&6 '"06(.0"0 3#-1.2!"#$1+" ,%-."2!"#$1+" '(-42!"#$1+" A POGO is stored, it contains: the correlation id, HTTP request and response
!"#$1+"2*+&(# 3#-1. !"#$1+"2*+&(# '(-4 !"#$1+"2*+&(# 5&&6 '"06(.0"0 3#-1.2!"#$1+" ,%-."2!"#$1+" '(-42!"#$1+" From now on: all message hold the correlation id. Request message is sent to the Router Actor.
!"#$1+"2*+&(# 3#-1. !"#$1+"2*+&(# '(-4 !"#$1+"2*+&(# 5&&6 '"06(.0"0 3#-1.2!"#$1+" ,%-."2!"#$1+" '(-42!"#$1+" Duplicate request messages are sent to specialized Business Actors.
!"#$1+"2*+&(# 3#-1. !"#$1+"2*+&(# '(-4 !"#$1+"2*+&(# 5&&6 '"06(.0"0 3#-1.2!"#$1+" ,%-."2!"#$1+" '(-42!"#$1+" Business Actors reply the number of messages they’ll send to Service Actors. POGO counts expected responses.
!"#$1+"2*+&(# 3#-1. !"#$1+"2*+&(# '(-4 !"#$1+"2*+&(# 5&&6 '"06(.0"0 3#-1.2!"#$1+" ,%-."2!"#$1+" '(-42!"#$1+" Request is split into backend compliant requests and sent to the next level.
!"#$1+"2*+&(# 3#-1. !"#$1+"2*+&(# '(-4 !"#$1+"2*+&(# 5&&6 '"06(.0"0 3#-1.2!"#$1+" ,%-."2!"#$1+" '(-42!"#$1+" Business post treatment is applied. Response messages are sent to Router Actor. Content is written in HttpResponse.
!"#$1+"2*+&(# 3#-1. !"#$1+"2*+&(# '(-4 !"#$1+"2*+&(# 5&&6 '"06(.0"0 3#-1.2!"#$1+" ,%-."2!"#$1+" '(-42!"#$1+" When the count of expected response chunk reaches 0: HTTP response is closed and cleaned
!"#$1+"2*+&(# 3#-1. !"#$1+"2*+&(# '(-4 !"#$1+"2*+&(# 5&&6 '"06(.0"0 3#-1.2!"#$1+" ,%-."2!"#$1+" '(-42!"#$1+" An exception must propagate to the response counter. Elsewise, we have neverending requests.
!"#$1+"2*+&(# 3#-1. !"#$1+"2*+&(# '(-4 !"#$1+"2*+&(# 5&&6 '"06(.0"0 3#-1.2!"#$1+" ,%-."2!"#$1+" '(-42!"#$1+" We scale in peace Every RoundRobin has its own size.
!"#$1+"2*+&(# 3#-1. !"#$1+"2*+&(# '(-4 !"#$1+"2*+&(# 5&&6 '"06(.0"0 3#-1.2!"#$1+" ,%-."2!"#$1+" '(-42!"#$1+" 16 4 1 1 1 1 1 Consider worst case ever to run in parallel for a single incoming request. Size does matter
global performance tuning (connection pools, XML parsers) Goal reached when, under constant concurrent requests load: end-to-end response time stay constant over time with constant memory usage (and not too much GC)
15 sec each each search is 70 backends calls, plus XML parsing and processing, business rules applying, JSON marshalling and response writing average CPU usage: ~70% average GC activity: ~15% Limited by Memory and Backend response time