In the previous example, we've been working on the basis that every time we receive a new bid, we add it to our list of bids received and then submit the auction and the entire list of bids to the ruleset for evaluation.
The obvious issue with this technique is that we are reevaluating all the bids that we have received from scratch every time we receive a new bid.
One possible solution would be to have a stateful rule session. With this approach, we would first submit the auction item to the decision service but with no bids. Then as we receive a bid, we could assert that against the ruleset and get the updated result back from the decision service.
The issue with this (as we discussed at the start of this chapter) is ...