twitter/gizzard — pull request #82 by jcorwin (2012-01-20 04:19:51+00:00)
Title: Nameserver batch api

An API to execute a batch of commands as an atomic unit.
Also tracks a nameserver state version, which is updated on any state change.

union BatchedCommand {
1: optional ShardInfo create_shard
2: optional ShardId delete_shard
3: optional AddLinkRequest add_link
4: optional RemoveLinkRequest remove_link
5: optional Forwarding set_forwarding
6: optional Forwarding remove_forwarding
}

service Manager {
...
void batch_execute(1: list commands) throws (1: GizzardException ex)
...
void increment_state_version() throws(1: GizzardException ex)
i64 get_current_state_version() throws(1: GizzardException ex)
i64 get_master_state_version() throws(1: GizzardException ex)
...
}