Is Twitter causally-consistent?

(muratbuffalo.blogspot.com)

74 points | by ingve 1990 days ago

3 comments

  • snowwrestler 1989 days ago
    Isn’t this a known feature of Twitter, usually called a soft block or forced unfollow? You block and unblock someone quickly and it forces them to unfollow you (and more importantly, does not signal them that it happened). I have heard of people fearing harassment to use this technique to get themselves out of a person’s timeline (out of sight, out of mind) without the pseudo-confrontation of a block.
    • x5315 1988 days ago
      This is correct.

      When we process a block request from user A -> user B, we remove the follow edges between user A -> user B and user B -> user A, and then add a block edge from user A -> user B.

      When we process an unblock request from user A -> user B, we remove the block edge from user A -> user B.

      I imagine that the "Aleksey checked that he was following me again" was either client caching, or eventual consistency latency. There's no nightly batch job or anything doing that.

      Source: I work on the social graph service at Twitter.

      • mad44 1988 days ago
        After the test, I unblocked Aleksey, and this tweet includes the video where we saw that Aleksey could see my tweets in his timeline again. Something went wrong after that I guess. https://twitter.com/muratdemirbas/status/1062763863332937728
        • mad44 1988 days ago
          Yet, another update. It might be that since my tweet included a mention to him, Aleksey clicked on the notification and could see my tweets after that, and not in his timeline. We repeated the experiment, and found that after I blocked and unblocked him, he was indeed still unfollowing me.
          • x5315 1988 days ago
            Ah ok. :thumbsup:

            I described how the logic works above, but we're always subject to and victims of replication or cache-expiration latency. So it could have been that.

    • michaelmrose 1989 days ago
      Isn't it weird that someone else controls this. It seems like a website removing itself from your bookmarks.

      Maybe twitter could instead work on not being a terrible way to communicate coherent thoughts to each other instead.

      • wafflesraccoon 1988 days ago
        I would argue that it is closer to being unfriended on Facebook than a website removing itself from your bookmarks.
        • michaelmrose 1988 days ago
          Facebook is mostly info that is scoped to a defined set of people. It makes implicit sense to have your access to private information removed if you no longer qualify eg no longer a friend.

          Twitter is publishing data that is world visible and making it hard for individuals who have been snubbed to keep track of what everyone including them if they log out can in fact see by removing their bookmark to same.

          The behavior of toggling block is weirder yet because the data is world published, you can read it, you can follow it but someone else has reached out and toggled the state of your account in some weird spooky action at a distance fashion that works only because it confuses people.

          Well designed things work in a way that is predictable to users. Who would predict that your follow status on accounts would from the perspective of the user toggle itself randomly.

          It's even worse that twitter sees purpose built for short toxic exchanges too short and badly organized for anyone to get each others point where the standard protocol is to disengage from anyone who disagrees and shout at all the people who believe exactly as you do.

    • iainmerrick 1989 days ago
      Maybe... but known to whom? Is it documented?
    • pjc50 1988 days ago
      For years there have been persistent rumours of an "unfollow bug", where X finds that they're not following Y and Y has no idea about why.
    • duskwuff 1988 days ago
      This is also the only way to remove followers from a protected account.
    • dredmorbius 1988 days ago
      There's a similar mechanism on G+
  • mav3rick 1989 days ago
    I find designing for different consistency (trade offs with scale etc.) models super interesting. Where can I find work like this ? I am assuming at big companies this work is already done. Any distributed systems experts here that can point me to some companies and / or small projects I ca build on the side.
    • pvarangot 1988 days ago
      Martin Kleppmann's book Designing Data-Intensive Applications has two chapters where it talks about consistency (one about replication and another one about consensus and consistency). That books reference sections for each character are goldmines.

      The work is never "completely done" because most of the known or reliable solutions involve choosing tradeoffs with scalability, speed or data locality, so you can always go bespoke to optimize for the current business needs, and when they change you may need to change protocols or algorithms again.

    • mav3rick 1989 days ago
      I've read and watched a lot of resources, thanks for more links :) Any pointers on companies that may hire for such jobs ?
    • devxpy 1989 days ago
      https://youtu.be/YAFGQurdJ3U

      Here is a nice, technical talk on distributed databases

    • baq 1989 days ago
      read all of this

      https://aphyr.com/tags/jepsen

      chronologically

    • beaconstudios 1989 days ago
      database design runs into these trade-offs a lot. CAP theorem is the canonical example.
  • d33 1989 days ago
    Could someone explain casual consistency to me? Is it just about not showing earlier messages to someone who got blocked, or is there something more to it?
    • mav3rick 1989 days ago
      If B happened as a result of A, then every node should observe A BEFORE B. For instance, "Deleting an ex (A) and posting a relationship with a new SO (B)". If this social network wasn't causally consistent then -

      Your ex may see your life update (and then be deleted).

      I may be wrong, so other experts feel free to correct me.

    • thebootstrapper 1989 days ago
      Read this paper[1], it explains various consistency in distributed system by using baseball scores updated over different medium. [1] https://www.microsoft.com/en-us/research/publication/replica...
    • bonoboTP 1989 days ago
      Why call it causal though? It seems like temporal consistency to me. What's the causation aspect?
      • beaconstudios 1989 days ago
        because the thing that needs to be maintained is the causal ordering of events. For the example from TFA, block -> tweet and tweet -> block have the causal effect of the blocked user seeing or not seeing the tweet respectively. Phrasing it as causal ordering removes time from the equation, which you aren't always able to take into account with distributed systems. Causal ordering also allows for causally unrelated events to appear in any order, for example updating your bio and posting a tweet. Check out the wiki article on logical clocks for a rough starting point in delving into this topic: https://en.wikipedia.org/wiki/Logical_clock.
        • kd5bjo 1989 days ago
          A more common example of causally unrelated events is two people tweeting from different parts of the world that don’t follow each other. The order these appear somewhere really doesn’t matter to anyone.
        • Liquid_Fire 1989 days ago
          But there is no causal relationship between the two events. You didn't tweet because you blocked the person, or block them because you tweeted.

          This blog post is really about sequential consistency.

          • beaconstudios 1989 days ago
            no it isn't. The two events are linked by a effect, ie switching the order of events has a different effect. They are causally linked, but not in the a => b sense. It's not about sequential consistency because for many other sets of events, the order does not matter and thus doesn't have to be enforced.
    • ishitatsuyuki 1989 days ago
    • svdr 1989 days ago
      Causal, not casual :)
    • anonymousDan 1989 days ago