3 ms·
The actor model may not help much with overall system comprehensibility. But it can help a lot with comprehensibility of the pieces. A HTTP request handler may
by toast0 9y ago
The actor model may not help much with overall system comprehensibility. But it can help a lot with comprehensibility of the pieces.
A HTTP request handler may send messages (and wait for responses) to get all the data it needs, instead of taking mutexes and getting the data directly. The actors responding to the data fetch requests will generally be pretty simple -- get a request, grab the data and return it (and handle writes as necessary); if they bottleneck, it's either too many requests or the underlying storage is too slow. If your request handler bottlenecks, you probably have a slow data fetcher, the handler's data processing is too slow, or you're making a lot of data requests sequentially instead of concurrently.
You absolutely need to have good instrumentation to understand your system -- at a minimum you need to know the queue lengths for at least important actors; having queue processing rate is pretty useful too.