Hi there,

I need to build a routing tool/service but do not know which is the fastest algorithm to use. I do believe that a star topolgy for this network is the best one, though I may be very wrong.

In this network there are subrcirbers that send messages and subsribers that recieve messages. the tool is connected to each of these subscribers. We can count on there being more than 1 in each group.

Messages will be pumped by the senders to the service, and the service has to route the message to the correct database of the reciever it was meant for.

Messages come in sporadically. i.e. We can have a message every few seconds or in massive bursts of messages (e.g. 1000+ messages per second)

There are two possible setups:
1. We know which database to send the message to, based on who the reciever is. We know who the reciever is from the message.
2. We know which database to send the message to, based on who the sender is. We know who the sender is from the connection. i.e. we have a unique connection with a sender for each reciever account. (I dont think this case is considered routing, but am not sure. I read something about pipeline routing, but am not sure whether this is pipeline routing).

So my questions are:
1. What is the best topology for each case?

2. What do you guys suggest as the best algorithm and data structure to implement in this case?

Thank you very much for assistance