Pinkbike Photo Page Gets New Features

Oct 8, 2013 at 8:13
by Łukasz Rajzer  
Popular Photo

The Pinkbike photo page recently got a new addition in form of a Popular Photo box right above the previous favorites and mobile uploads boxes. The Popular Photos area is a personalized photo section that shows photos that you have not seen yet, but your friends have. It's organized to show the most popular first.

Popular box

On Pinkbike there are tons of great pictures being uploaded every day, yet you don't always get a chance to see them all. The Pinkbike photo page has a lot of options that make viewing and searching for photos really easy, but the amount of content being uploaded is big enough so that some of those masterpieces might go unnoticed. To solve this, Pinkbike started to develop a popular section in order to present you the best photos that were most popular within a given period of time. Can't wait any longer to check out this new addition? Go ahead and hit the “View more popular photos” button to see the page. If you want some insight into this system just keep reading.

Tabs

This is a view of the popular page. Marked in red there are tabs that you can switch between to get a different set of photos. There are two main categories of popular photos. The first one contains all photos that were most popular among users you follow. The main goal of this category is to present you content that best suits best personal preferences. Based on whether you follow users from your neighbourhood or best photographers on Pinkbike you will get photos from your local events and contents or the latest photos from the biggest events in the world.

The second category contains all photos that were most popular among all Pinkbike users. This category is not about personal preferences, but about the absolute best possible photos. If you keep up with this one you can be sure that none of those great shots will miss you!

In both categories you can choose from photos being most popular during last day or during last week. A history tab will keep track of the photos you have already seen, which is very useful in terms of what you will read next.

How Does it Work?

The rules are pretty simple. Let's take the “Friends Weekly” tab as an example. The more views and favs a given photo received from users you follow during the last week, the most popular it is. And in each tab photos are presented in descending order from the most popular to the least popular. But that is not all - each time you view some photo we will not bother you with it next time you visit this tab but instead propose some other photos that you have not seen yet! That is where the history tab comes in handy allowing you to get back to the photos you have already seen one more time.

Clockwise Friends weekly tab before viewing marked photo History tab before viewing marked photo History tab after viewing marked photo Friends weekly tab after viewing marked photo.
Clockwise from top left corner: Friends weekly tab before viewing marked photo, History tab before viewing marked photo, History tab after viewing marked photo, Friends weekly tab after viewing marked photo.

Tech Talk

For those who find this system interesting enough we decided to prepare a little tech talk which can give you even more insight.

Pinkbike uses zeroMQ extensively as a messaging library. 100s of zeroMQ messages per page view corresponding to all sorts of information are sent to a message broker. The Photo Popular system uses these messages and is also based on Redis, which for our purpose is great because it allows us to store information in simple key value pattern using sets or sorted sets and allows us to perform operations on those keys like union, diff or expiration.

Certain Python scripts are responsible for catching certain actions like photo view or fav from Pinkbike site and updating corresponding keys in Redis database. Other Python scripts are responsible for filtering those actions first so as to make sure that every single action is unique. All information about viewed photos are stored per user per day of the week. All keys from the given day are overwritten after one week once the corresponding day starts. Some of this information is stored in additional keys so as to make things work faster, e.g. all photos viewed on Pinkbike daily. Basically there are few interesting tricks implemented that allow us to optimize this system in both time and space.

While proposing photos popular among all Pinkbike users is 'just' about diffing previously prepared set of photos with what you have seen, proposing photos popular among your friends is quite a bit more challenging. Based on how many users you follow, unioning all those sets can require a lot of computation for a one simple page load. This being the main challenge, we managed to plan Redis database so that it is actually possible to make all those computations during one page load as opposed to storing different additional sets of photos for different groups of friends.

Editor's Note
Lukasz Rajzer - chajcu is a Pinkbike developer located in Krakow, Poland. He is an avid rider and DH racer in the Polish DH Cup on the Bartbass Goodbike DH Team

Author Info:
chajcu avatar

Member since Oct 28, 2007
1 articles

31 Comments
  • 30 1
 FYI the photos with girls featured. Well, someone had to do it.
www.pinkbike.com/photo/7273891
www.pinkbike.com/photo/9984441
  • 9 0
 Good man.
  • 2 1
 Well done...
  • 26 0
 Thanks for the tech talk section.
  • 8 0
 Yeah, I'm really stoked on how some the backend stuff works now. It really gives us some great possibilities when creating news stuff.
  • 6 1
 NSA backend?
  • 39 0
 NSA backend? Maybe. Let me test it... "Obama sucks and should be replaced. Kill big government!".
If you don't hear from me tomorrow then the NSA backdoor is there!
  • 32 0
 Hey Radek, this all looks great and thanks for putting it all together.
Now, how about an update to the buy/sell that lets us save search criteria and get a notification when new listings match that criteria? Would be an awesome addition to PB.
  • 6 0
 Kramster is onto something there....
  • 7 0
 The XC and AM folder in buy/sell and photos should also be separated if possible
  • 5 2
 Some form of app would be good, pinkbike on your phones a bit fiddly !
  • 1 0
 how about we go crazy programing. have so that the buy and sell prioritizes frames the right size whereby you choose "small" from a drop down menu and it brings up all frames that could possibly be considered small for example 14", 15", 15.5" etc. (yes some frame sizes on the fence show up in two choices)
  • 4 0
 How about being able to filter by negotiability, trades, and shipping? That would certainly cut down on the sea of bikes I have to wade through to find one that works for me.
  • 1 1
 Pinkbike should go open source Wink
  • 1 0
 @benbrooks , there is an app , an the google app market anyway! only shows the news feed (no forums)
  • 12 0
 Nip-slip in the top right. Boobies FTW
  • 2 0
 I think it would be better if "recently favorited" grid was above the "recently popular". Faved photos are most often great pics, whereas popular ones are mainly pics of my friends - maybe interesting, but nothing special.
  • 4 0
 You forgot the part where you added a delete photo button that removes photos and thumbnails from the server.
  • 1 0
 technical tuesdays.....RULE! i would have lost my front wheel if it wasn't for technical tuesdays...and my brakes actually work now.and i have helped people thanks to technical tuesadys.well done pinkbike!
  • 2 0
 I've suddenly posted in my album the same image twice. now i look how to delete one. pinkbike, am i retarded, or there's really no DELETE button?
  • 1 0
 No, you are not retarded. Every user has searched for that mysterious button since the beginning of time... and will continue to do so it appears.
  • 1 0
 select gear icon, select move, select trash
  • 1 0
 hell yeah! thanks!
  • 2 0
 Sweeeeeet more is a good thing . Cheers PB
  • 1 0
 Pink Bike isn't going to spy on members are they????? Maybe we'll hear about it later from Snowden
  • 1 0
 Awesome work guys. It's why I love PB for photos over every other social media site. Ken
  • 1 0
 Yes, a big thanks to the tech talk page!
  • 1 0
 need [view more Recent Favorites] button. Please, please, please....
  • 1 0
 What did you guys do to the resolution? Everything be tiny... WTF????
  • 1 0
 hahaha moje foto Big Grin
  • 1 0
 To słynne "kudłate" zdjęcie ;D Magia wspomnień Wink







Copyright © 2000 - 2024. Pinkbike.com. All rights reserved.
dv42 0.026973
Mobile Version of Website