chrisdinn / brando

A Redis client written with Akka's IO package
Other
107 stars 24 forks source link

Shard broadcast & ShardRequestKeyOverride #31

Closed tysonjh closed 10 years ago

tysonjh commented 10 years ago

Originally I wanted to have,

ShardRequest(shardKey: ByteString, command: ByteString, params: ByteString*)

where in the ShardManager the shardKey would not be used as part of the command.

client forward Request(request.command, request.params: _*)

However this is not backwards compatible and would allow consumers to easily/mistakenly break the sharding model. Having a new case class ShardRequestKeyOverride with the helper function withKeyOverride makes the intent clear.

chrisdinn commented 10 years ago

Well, can't merge it with the build failing.

ShardRequestKeyOverride as an abstraction feels a little clunky. If we need to fix the Sharding model in a backwards incompatible way I'm okay with that. We can do a major version bump.