Tumblr Engineering — Rolling out a New Activity Backend

1.5M ratings
277k ratings

See, that’s what the app is perfect for.

Sounds perfect Wahhhh, I don’t wanna

Rolling out a New Activity Backend

When someone likes your post, follows you, reblogs you, etc., we make a record of it in the activity feed for your blog. Over the last several months, we’ve been building a new backend for that activity system. We’re rolling out this new activity backend now, and hopefully, none of you will notice a thing except maybe your activity loading a little faster.

Another benefit of this new backend is that we can finally update the activity view to filter by activity type(s). So if you want to see just a list of new followers, or just your mentions, or even a feed of only reblogs and likes, you’ll be able to! To enable that feature, we’re building a new frontend for the activity page on desktop web, using Tumblr’s new web experience. Here’s a little sneak peek:

image

The current backend that powers every blog’s activity stream is pretty old and uses an asynchronous microservice-like architecture which is separate from the rest of Tumblr. It’s written in Scala, using HBase and Redis to store its data about all of the activity happening everywhere on Tumblr.

We’ve been working to replace it with a new architecture that more closely aligns with the rest of how Tumblr works: written in PHP, using MySQL and Memcached for data storage. The old architecture is something we don’t support anymore, which made fixing activity bugs and building new features for activity very difficult. Our hope is that this new system will be faster, more extendable, less complex, and easier to maintain.

Some of you nerds out there will say, “PHP is definitely not faster than Scala,” and you would be right to call that out. But you’d be missing the major change we’re making. Instead of the activity event system being asynchronous and separate from the rest of Tumblr, we’re bringing that code into the Tumblr PHP app and using the same underlying interface we’d use to fetch a blog or a post. That’s what actually makes it faster. We got rid of a bridge by eliminating the river, so it’s now faster to drive across!

The old system looked like this; you can read it top to bottom (if it looks complex, that’s because it is):

image

The new system is much simpler:

image

Again, our hope for this much simpler system is that we make activity load a bit faster, and we’re able to fix bugs and build new features for it more quickly. As always, if you experience any issues, please do not hesitate to contact Tumblr Support.

engineering activity

See more posts like this on Tumblr

#engineering #activity