
The biggest example here was swapping the order of two function calls within an if statement, taking advantage of Java’s short circuiting. However, when we made improvements to our hot spots, we were able to make a huge difference.
#SPOTIFY BLEND BETA CODE#
If we tried to optimize sections of the code that weren’t run many times, we didn’t make much of an impact in our latency. What we learned is that our code base had some hot spots in it: some sections of the code were run over 50 times per Blend generation, while other sections of the code were only run once. We spent a lot of time trying to make the service as fast as possible. Once we were happy with Blend quality, and started to think about scaling the service, we realized how bad our latency had gotten while iterating on the algorithm. When we tried to come up with the best algorithm, we weren’t so concerned about our latency. We needed an approach that worked for both types of pairs, while also taking into consideration how any changes to the Blend algorithm impacts all combinations of users.īetween fetching data for both users in the Blend, and trying to come up with the ideal sequence balancing for all of our attributes, creating a Blend is a pretty heavy process. However, if we have two users with no common music listening history, it’s significantly more difficult to create a perfect Blend. It’s a bit simpler to create a Blend with users with similar taste since they listen to a lot of the same music. This decision was made based on feedback from employees and our data curation team. Our solution is more about maximizing the joy, where we try to select the songs that are most personally relevant to a user. “Maximize the joy” values relevance over democratic and coherent attributes. In other words, is it better to pick everyone’s favorite tracks, even if other people in the group wouldn’t like them, or is it better to pick the tracks that everyone is likely to like, even if their favorite songs never get selected? “Minimize the misery” is valuing democratic and coherent attributes over relevance. One of the core decisions we made for this product was whether it was better to “minimize the misery” or “maximize the joy”. Democratic: Does music that both users like rise to the top?.Equal: Are both users in the Blend represented equally?.Coherent: Does the playlist have flow, or do the tracks feel completely random and unrelated to each other?.This is especially important for track attribution - if we put a user’s profile image next to a song, we need to make sure that this specific user would agree the song listed is representative of their taste.Relevant: Does the track we’re selecting for that user reflect their taste? Or is it just a song they accidentally listened to once?.When we are working with multiple users, however, we have the challenge of taking more attributes into account. For Daily Mix, our attributes are familiarity and coherency. For example, with Discover Weekly, our main attribute is discovery. Most playlists are composed of a number of attributes and characteristics. We dealt with unique challenges both in the content creation process, and in the invitation flow, to create a Blend. A major complication we saw here was the increase of scale in the number of users we had to deal with.
:max_bytes(150000):strip_icc()/sara-kurfess-wXU9yeANElg-unsplash-8d39213111f8423cb37760c564839ba0.jpg)
With Blend in particular, we were taking concepts from Family Mix and Duo Mix, and expanding them to a much larger user group. This means we can’t always lean on our past experiences, and often encounter new challenges that require new solutions.


The products were well received, so we decided to expand this product line, creating a version of opt-in, automatic, shared, personalized playlists that could work for any two users.Īnytime we want to make a new playlist at Spotify, we’re aiming to do something different that we haven’t been able to accomplish before. These products create shared playlists for users on the same Family or Duo plan. Prior to Blend, the team worked on similar products, Family Mix and Duo Mix. We recently launched a new playlist initiative, Blend, where any user can invite any user to generate a playlist wherein the two users’ tastes are combined into one shared playlist.
#SPOTIFY BLEND BETA FULL#
What does it take to go from an idea for a new playlist, to shipping that playlist to Spotify users all around the world? From inception, to prototyping, to QAing, and finally shipping, releasing a new playlist at Spotify is a long process full of new learnings every time.
