func (f *Farm) Insert(tuples []common.KeyScoreMember) error {
	return f.write(
		tuples,
		func(c cluster.Cluster, a []common.KeyScoreMember) error { return c.Insert(a) },
		insertInstrumentation{f.instrumentation},
	)
}
Insert adds each tuple into each underlying cluster, if the scores are
greater than the already-stored scores. As long as over half of the clusters
succeed to write all tuples, the overall write succeeds.
package farm
import (
	"fmt"
	"math/rand"
	"sort"
	"strings"
	"time"
	"github.com/soundcloud/roshi/cluster"
	"github.com/soundcloud/roshi/common"
	"github.com/soundcloud/roshi/instrumentation"
)
func init() {
	rand.Seed(time.Now().UnixNano())
}
type Farm struct {
	clusters        []cluster.Cluster
	writeQuorum     int
	selecter        Selecter
	repairStrategy  coreRepairStrategy
	instrumentation instrumentation.Instrumentation
}
func New(
	clusters []cluster.Cluster,
	writeQuorum int,
	readStrategy ReadStrategy,
	repairStrategy RepairStrategy,
	instr instrumentation.Instrumentation,
) *Farm {
	if instr == nil {
		instr = instrumentation.NopInstrumentation{}
	}
	farm := &Farm{
		clusters:        clusters,
		writeQuorum:     writeQuorum,
		repairStrategy:  repairStrategy(clusters, instr),
		instrumentation: instr,
	}
	farm.selecter = readStrategy(farm)
	return farm
}