The requirement is that many 'clients' select many resources, which they usually want to listen to and control the events 10 will be either customers and 100 will be either resource. It is possible that the number of customers and resources can be over 1000, but still
It is currently implemented in the form of a client object as a map indexed by value by the client. The client object has a list of the selected resources. The problem is that if there is an event for processing, then when the resource A is said, the code must be run through each client and then through each list within the client. I'm worried about performance.
Is there a more efficient algorithm for handling this potential hurdle?
Your structure {client: [resource]} < / Code>, but for efficient event delivery, you need
{resource: [customer]}
Comments
Post a Comment