Broker login for tournament games

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Broker login for tournament games

grampajohn
Administrator
I am working on a new model for broker login in tournament situations (see issue #574), and I would like your input. I have posted an updated description and a timing diagram for a revised login process that I hope will solve one of the major problems we had with the Valencia tournament.

I would appreciate your thoughts on this approach. I think this could be implemented rather quickly, but it will require changes to the broker, the TS, and the game server, and of course existing brokers would need to be modified.

Thanks much.

John
Reply | Threaded
Open this post in threaded view
|

Re: Broker login for tournament games

markus
John --

I like the proposed scheme and would be happy to adapt the LARGEpower
broker to it.

One additional suggestion: If queue names are determined by the server
it should be easy to also get rid of the "key" that is currently sent
with every message. The server would simply choose a (long, complicated)
queue name that cannot be guessed by other clients.

Cheers,

Markus

Reply | Threaded
Open this post in threaded view
|

Re: Broker login for tournament games

grampajohn
Administrator
markus wrote
One additional suggestion: If queue names are determined by the server
it should be easy to also get rid of the "key" that is currently sent
with every message. The server would simply choose a (long, complicated)
queue name that cannot be guessed by other clients.
Thanks, Markus - we cannot get rid of the key, because that serves a different purpose. There's only one server input queue, and all brokers in a game have access to it. The key prevents spoofing - one broker submitting messages (like tariffs) claiming to be another broker.

Does this make sense?

John
Reply | Threaded
Open this post in threaded view
|

Re: Broker login for tournament games

grampajohn
Administrator
In reply to this post by grampajohn
One last decision to make regarding broker and queue names for the new login scheme. Currently, the server is given the broker list as a command-line argument. The server now needs the names of the queues corresponding to the brokers. I don't want to introduce another command-line arg for queue names, because requiring broker names and queue names in corresponding positions seems unnecessarily brittle. Instead, I propose specifying the broker name using a string of the form broker-name/queue-name, where the slash / is a delimiter between them. If the server is started with just broker names (as in development/test mode), then the queue name will be the same as the broker name.

The consequence of this is that the slash character would be reserved as a delimiter, and could not be used in broker names. I don't think anyone would do that; it just seems wrong, but it will now be disallowed completely.

This will allow the tournament manager to compose the queue names, serve them to the brokers when they log in, and serve them to the simulator through it's CLI.

Does anyone have a problem with this?

John
Reply | Threaded
Open this post in threaded view
|

Re: Broker login for tournament games

markus
In reply to this post by grampajohn

> Does this make sense?
At the time, I was thinking more of a separate destination for each
(Power TAC) broker. In AMQP there is a concept called "exchanges" that
would allow you to create a (uniquely named) destination for each (Power
TAC) broker, and have the (AMQP) broker forward them all to one queue
from which the server can then read. There closest equivalent in
ActiveMQ that I'm aware of would be to have the server subscribe to
multiple (uniquely named) topics, one for each (Power TAC) broker.

But the truth is, all of these are only glorified versions of the
current message key hack. The proper way to resolve this would be to use
the built-in authentication mechanisms to allow the server to establish
the identity of each sender. And we already decided that this is too
much trouble for the present purpose.

Markus

Reply | Threaded
Open this post in threaded view
|

Re: Broker login for tournament games

grampajohn
Administrator
In reply to this post by grampajohn
I have just closed issue #574. It required changes to common, server-interface, server-main, accounting, default-broker, sample-broker, and powertac-tournament-scheduler. Brokers no longer create queues, and the name of the server input queue is no longer fixed - the broker has to get it from the tournament scheduler before it can log into the server. In addition, the sample broker now runs multiple sessions, so it's no longer necessary to use a shell script to run it in a multi-game tournament.

I have not yet deployed the updated common module to the Sonatype snapshot repo, so if you want to work with this in the short term, you will need a local install of the common module. I did not want to do a deploy until folks have had a couple of days warning - anyone who depends on that will need to update their servers and brokers once I deploy.

As always, I welcome your comments and suggestions.

John