I’m just looking at my git-log, and I’m dumbfounded to realize that I’ve been hard at work on the latest and greatest AstroBin update for six weeks.

I must have had a wonderfully good time, because these weeks of late night working to improve AstroBin have really been flying.

Looking at the difference between the current master branch and my 1.10 development branch is even more astounding:

 434 files changed, 69324 insertions(+), 71068 deletions(-)

Now, not all these insertions and deletions are actually my code, of course: I’ve upgraded several large JavaScript libraries, for instance, and that’s a lot of pluses and minuses. If you look closely, you will see that the net amount of lines of code has actually gone down. That’s fantastic because I’ve added a lot of new features, and there were plenty new auto-generated files, like database schema and data migrations, and they can be large.

Overall, this new version of AstroBin is the largest incremental change I’ve had since launch! So let’s see what’s new.

Visible improvements

5-star rating system replaced by “Like” button

Many of you have seen this coming. There have been many discussions all over the place. In the end I’ve decided that a 5* rating system is just not ideal for astronomical images. Nobody needs “negative” votes like a 1 and a 2. I’ve implemented a Like button to replace the 5 stars. Old votes of 4 and 5 will be converted to a Like.

Because of this, a Favorite (heart) button doesn’t make sense anymore, so I’ve renamed it with “Bookmark”, and it works the same way.

New activity streams with more detail

The activity stream has become the central part of the front page experience. The activities are more detailed (for instance with the content of the comment, for comment actions) and thumbnails. It’s gonna be better to see what’s happening on AstroBin! Furthermore, there is a global stream with all activities, and a personal stream with activities from people you follow, and on their images.

Easier way to manage people you follow

A lot of focus has been placed on the follower/followee interactions. You get to see your follower numbers, and a list of people you follow / who follow you.

Smart thumbnail

AstroBin will try to find the most interesting area of the image, to generate the thumbnail. So if you have a picture with the moon in a corner, and the sky completely black, AstroBin should be able to generate a small thumbnail that has the moon in it, and not just a black square!

Revisions are solved too

This one has been in my todo-list for a while… now Revisions are first class citizens too! The will get plate-solved independently from the main image upload :)

Sky plot

Solved images have a small star chart next to them! How cool is that?

Behind the scenes

Complete refactoring of thumbnail generation

Instead of generating thumbnails by manually running PIL code after each upload, I’ve taken Django east-thumbnails into use. This allows me to generate whatever thumbnail size on the fly upon request.

This change simplified a lot of AstroBin’s code, and unifies the displaying of images everywhere, be them small thumbnails or full size ones.

Such unification allows me to cache the entirety of an image’s HMTL code, for faster performance and less strain on AstroBin’s database server.

In addition, generating thumbnails only when they are needed will help me lower the hosting costs. We are approaching half a terabyte.

Finally, I was able to completely remove the use of celery for the processing of images: they’re not run in the background anymore, but, as I was saying, they are now being generated on the fly.

For the reason that thumbnails generated for the first time won’t be cached, nor will they actually exist as physical files, displaying of all images on AstroBin now happens asynchronously.

Complete refactoring of uploads processing

Handling uploaded images was pretty much the first thing I did when I started AstroBin back in 2010 (has it been already three years?!?) and I wasn’t very experienced with web development back then, so it’s obvious that I made some mistakes.

One of them was not taking advantage of Django’s ImageField and the wonderful django-storages, by pretty much doing everything manually with boto. Now, that part is done properly and a result is much leaner and more robust.

Much faster, always blind, plate-solving

Pate-solving won’t happen on AstroBin’s server anymore, but using the API provided by nova.astrometry.net. This means that AstroBin’s server will suffer less strain, and be faster overall. Astrometry.net have a massive server, so plate-solving will be super fast! Usually 10-60 seconds, in my experience, for reasonably solver-friendly images. The plate-solving happens on the fly the first time a deep-sky image is displayed by a user and you get real time status updates.

Those were the main features. There have been other smaller improvements and bug fixes, plus some care for the IE and mobile browsers. I’m really excited about this new release of AstroBin and I hope it will strengthen the community and make the users even happier!