Local hosting

We made Shotty able to run on a local server in your studio or even on your laptop

Ilya Lindberg
SHOTTY
3 min readJul 6, 2017

--

If you ever wondered how the first version of Shotty have been working, here’s a diagram of different services interconnections:

Eyjafjallajökull

If it looks like Eyjafjallajökull to you but you really want to understand what it all means, just continue reading.

We’ve been using Amazon Web Services for uploading, transcoding and storing files and for sending notification emails. Amazon provides a lot of useful services!

Список сервисов книжного магазина amazon

S3 — storage for files without limits, you pay for used gigabytes and traffic.

ETC — (Elastic Transcoder) has been encoding all uploaded video files with h.264 codec. Here you pay for the length of encoded video. By the way, there was a month when we transcoded 1041 minutes (17 hours) of dailies for CUBIC studio.

Our small Python app (written with Flask framwork) hosted on T2 instance was receiving all files. When it got a video file, the file was sent to ETC; when the image came, it was compressed to the adequate size, complemented with thumbnails and sent to S3.

Using the integration between different Amazon services, we’ve been sending notifications created by SNS service for each file when transcoding was completed. So, our application could change the version encoding status in database.

Front-end part of the application (the part that is being loaded into a web-browser) was hosted on a Digital Ocean droplet (the fancy name for a VPS).

As a database we’ve been using Firebase. It was really handy thanks to AngularFire library, which provided simple and powerful abstraction layer over the native Firebase library with mappings for Angular — the framework Shotty interface is based on. But there was a caveat — you can’t serve Firebase on your own server.

The first version of Shotty

We created our own Theme Park with Docker, Node.JS and RethinkDB

Security policies and NDAs our clients work with are often too strict, so they can’t rely on services which are not controlled by them. Even if these services are provided by companies like Amazon and Google (Firebase). Also, some of our clients don’t want to lose the ability to work when their internet provider has failed.

Self-hosted version of Shotty

So, we’ve rewritten Shotty into a bunch of micro-services. Now we have our powerful and fast Backend based on the most recent version of Node.JS and paired with RethinkDB database. Also, we had to create our own Storage and Transcoder, they are written with Node.JS and powered by RethinkDB as well. And all they are packed into Docker image, so there’s no need to think about dependencies.

When someone wants to install or update Shotty server, all they have to do is to download and run our docker image!

In case you want to try our demo, use the link and credentials below:
demo.shottyapp.com
Login rick@shottyapp.com
Password morty

Any questions?
Comment below or contact us:

hello@shottyapp.com
@shottyapp in Telegram

--

--