MASQ-Project / MASQ-Node-issues

This repo contains the issues that are used for planning MASQ Node product work. It has no code in it, only GitHub issue tickets
https://masq.ai/
31 stars 12 forks source link

Spike: Split the `Accountant` #614

Open dnwiebe opened 2 years ago

dnwiebe commented 2 years ago

Speculation: If we were to classify the messages that come into the Accountant in a standard Node session, a significant majority of them would be ReportXxxServiceConsumed and ReportXxxServiceProvided messages.

(If you find an easy way to confirm or rebut this speculation, try it and see.)

We believe that carving this responsibility off the Accountant and giving it to a new Actor might make the whole Node more responsive; however, it might instead make the Node less responsive by creating severe database contention between the new Actor and the Accountant, since they'd both be modifying the same database tables.

Do enough spiking to determine the answers to one or two questions:

One: Does creating a separate Actor to handle consumption and provision reports make the Node more responsive, so that demands on the Accountant are processed more promptly? (You might want to collect some statistics before you make the change to help you answer this question.)

Two: If creating a separate Actor does help, what happens if you create several instances of the separate Actor, and round-robin the consumption/provision messages among them? Do things get better, or worse?

Deliverables: Show the results of your work as regards service improvement or degradation, and show the code you used to determine it. (For example, create a branch in the Repository containing that code and link to it in a comment on this card.)

dnwiebe commented 2 years ago

(This is really from Bert.)

If several consumption/provision Actors make the situation better rather than worse, is it better to create all of them at bootstrap time, or is it better to create only one of them at bootstrap time and bring others online as they're needed, destroying them when demand is reduced?