-
Notifications
You must be signed in to change notification settings - Fork 5
Pylib Stackserver
Currently unused code, so I won't make much of an entry on it at the moment. Just a quick overview of the purpose of the stackserver.
The stackserver is a meta-server for the serverpool that allows you to configure and prioritize requests to different servers. A good example usage is lookups, in situations where you have many poolservers connected to you. First you check your own cache with a low timeout, then you move on to less speedy (but more universal) sources until you're sure nobody knows who this "[email protected]" is.
It accomplishes this by having poolservers listen for nonexistant message types, like "lookup3", where the actual type is readably obvious. When you want to prioritize a message type, you configure your serverpool so that the only server listening for it is the stackserver, which in turn forwards them as the fake message types to the rest of the servers according to timeouts until a termination condition is encountered - the final timeout, or some message that indicates the result has been found.
It gets its name from the way it's configured - a stack of services, moving on from one to the next level up every time a timeout for that level hits.