1. 1

  2. 7

    I downvoted for the following reasons:

    • I find these “you are doing X wrong” titles offensive.

    • Considering the author wants to tell me how to scale, they are using an RDBMS for their social graph?

    • The author is using strings to create SQL queries. Not even funny.

    1. 4

      I disliked how the author threw out concepts without really describing pitfalls that someone trying to scale would probably need. He just mentions that cache is a magic thing and then does little to describe how to best use it. Even when he talks about sharding he just ends it by saying “it’s complex, deal with it later.”

      1. 1


        • Agreed on the titles - renamed
        • Doesn’t matter what the example is/was. It wasn’t originally even an example around social graph, until a friend of mine pointed out to best keep my examples on 1 subject. I ultimately settled on this example since it’s straightforward - don’t need no explaning on how it should work. Anyway, 1 example updated & another removed ;)
        • The goal was to keep the examples as simple as possible - didn’t want to bother with mysql_query or ORM code. But that seemed confusing indeed; fixed that.


        I’ve added a little more info. However, the message on sharding is still: don’t deal with it unless you really have to (plus, there is a link to another post that will explain in detail how, should you need to)

        1. 2

          Doesn’t matter what the example is/was

          Yes it does. This post is making a statement about how to solve problems in a scalable way and as its example is using the, known, least scalable way of solving a social graph. This author should be laughed out of the room.

          1. 1

            This author should be laughed out of the room

            Pretty sure you noticed that was me. Can’t say I appreciate the snark.

            As mentioned, I agree the choice of a social graph was not the best fit given this context.

            However, Facebook’s social graph (using TAO) still persists the data to MySQL[1] and relies on it to replicate to slaves. Way back before they built TAO, they also mostly relied on memcached[2] - like in the example.

            Anyway, I’m done discussing this. I’ve removed the example since I agree it was pretty poor & didn’t contribute much anyway.

            1: http://www.theregister.co.uk/2013/06/27/facebook_tao/

            2: https://www.facebook.com/notes/facebook-engineering/tao-the-power-of-the-graph/10151525983993920

    2. [Comment removed by author]

      1. 3

        It’s definitely really easy to go down that rabbit hole of “designing for scale” when you don’t have a functional product yet. However, I think a key part of this is that you have to be ready to refactor your code when it’s the right time to do so, if that makes sense. You can’t be afraid to identify what appears to be holding you back and fix it as it arises.