

NoSQL at Twitter - mace
http://www.slideshare.net/squarecog/nosql-at-twitterdevoxx2010

======
devmonk
Curious about this in snowflake (mentioned in slides):

[https://github.com/twitter/snowflake/blob/master/src/main/sc...](https://github.com/twitter/snowflake/blob/master/src/main/scala/com/twitter/service/snowflake/IdWorker.scala)

    
    
      def nextId(): Long = synchronized {
        var timestamp = timeGen()
    
        if (lastTimestamp > timestamp) {
            log.warning("clock is moving backwards. Rejecting requests until %d.", lastTimestamp);
            throw new InvalidSystemClock("Clock moved backwards. Refusing to generate id for %d milliseconds".format(lastTimestamp - timestamp));
        }
    

Does that mean that the inability to tweet grinds to a halt if the system
clock gets set back? That could be a problem whenever the server time is being
sync'd with the time server and is running ahead (or if time server goes
down/connection goes down- it happens), etc. I know there would be other
issues too, but this seems a little fishy.

~~~
mace
> Does that mean that the inability to tweet grinds to a halt if the system
> clock gets set back

Not necessarily, their applications most likely have some retry logic which
runs when an InvalidSystemClock exception is caught.

~~~
devmonk
Retry would work for small time differences, but would mean greater delay (and
subsequent "I give up"), if the system clock were to be set backwards a
substantial amount.

