So I've been working a lot on this new page behind the scenes. It definately has a lot more going on the backside than on the front side.
I'm hoping that I can use this site as a mechanism to learn some React and get better at JS. But that isn't what this post is about. I'm hoping to have a multi-part series that explains:
- Getting started with a practical Docker-compose workflow, with an eye towards production
- A few Django bits (not wanting to go over how to Django)
- Developing a Telegram bot
- I chose Docker Swarm, we'll cover the what, why, and how.
Plans for the future
To give an overview of the whole project, let me step back a bit and explain how I got here mentally.
I've never been a big fan of Facebook. Period. I quit Facebook years and years ago, only to be brought back in, because I tried to create a startup which needed some social interactions. Low and behold, you need a FB account to develop against FB. So reluctantly I created an account and for a few years I had a FB account. Only to remember why I disliked the platform so much and left it again.
I've always wanted a way to share my content with friends, without the noise and bullshit that goes alongside social media. Let alone all the other negative side affects that come with regular and daily use of social media.
In the past I've tried using Wordpress blogs and I even tried creating my own blog before. But every time I find myself avoiding creating content. Never writing, never sharing. Always trying to figure out a way to integrate with easier to use tools. But the "easy" tools are always written by and operated by the communities I don't want to be part of. I also feel pretty strongly that the internet should stay decentralized and there should be no gatekeeper to the internet. There shouldn't be a moderator.
If I don't like the rules, I don't have to play. Therefore I will play my own game.
In creating my own site, I decided to tackle this as creating a solution to a series of problems.
- I want to have an online presence.
- I want to be in control of my information.
- where and how it's displayed
- if anyone will get paid for my content it will be me
- Ease of use
- a way to create content on the go
- a simple way to consume the content
Taking a look at the first problem: having an online presence. This one is fairly simple. Just create a webpage...easy-peasy. I could sign up at any number of hosting sites that provide free or cheaply hosted websites. However, that doesn't solve the issue of ease-of-use. Usually to create content on those sites you have to go through their admin portals which are often not quite right. Mostly a one-size fits most.
Second problem, control of my information. Hosting my data on someone else's platform for the most part shouldn't be a big deal. I can usually extract the data, but there's no guarantee. But again, this doesn't solve the easy-to-use problem. Like I said before these usually require a special web portal. And typically most content isn't available via an API so if I wanted to do anything "interesting" I'm stuck writing a web scraper.
These first two problems lead us to the third which is ease-of-use. When I say ease of use I mean can I do anything interesting with my content. How can I share my content with friends and family if I'm trying to avoid using social media? How can I create content on the go? Pictures? Commentary? Check-ins?
This all lead me to developing my own in an attempt to scratch an itch that's been plaguing me for quite some time.
First I need to have a location, a central place. I've owned this domain for quite some time now and I think it's time I actually put it to good use. I debated using a static site generator, but in the end it wasn't going to give me the "dynamism" I was looking for. Specifically, if I wanted to share pictures, I would have to create a page of content around the picture, then generate a static page, then publish them, etc. By then the moment has passed. Quite frankly by the time I got back to my computer to want to share the picture, I'd have forgotten that I took it already.
I looked back on my Django roots and I decided that I'd jump back into the Django world and roll up my sleeves and write some Django. Django v2 just came out, DRF is still easy to use, Python 3 is amazing. It wouldn't take me long to get a simple POC up and running.
Cost came into my mind next. I needed a way to host this project, without breaking the bank. I read a few reviews, comparisons and it seemed like Digital Ocean came out on top. While maybe not as robust as AWS or Azure it's cheap, and it suits my needs. Linode was a contender, but I opted for DO because of their new Spaces project, which is an S3-like object store and it will plug into existing Django tools for managing static/media via S3 but using DO Spaces instead. Also, they have a 2 month free trial so hey, why not?
Ok, so now I have my site hosted. It's running in the wild now so how do I publish content? I want something easy and simple. Something that doesn't change my day-to-day use of my mobile. And then it hit me. Messaging app bots. My messaging app of choice right now is Telegram. For everyone out there who are going to harp on security, home grown crypto, etc... I know. But, I won't use WhatsApp cause it's owned by Facebook. Telegram has native clients for almost all operating systems (mobiles and computers). Signal doesn't have a stand alone app for computers or a robust bot infrastructure so it's kinda out.
After the philisophical debate about why I opted for Telegram it became really easy for me to upload photos and create "stream" posts. Any photo uploaded goes automatically into my Photo Stream album. This makes it very easy for me to publish quick and short content on the go. One of my earlier requirements.
The flip side for ease-of-use for me is ease-of-use for others. RSS is the first thing that pops into my mind, but RSS is a technology that's been to fading. Unfortunately with the rise of Facebook and other social networks the idea of subscribing to a data source is not the best way to discover content anymore. Everyone relies on their friends and algorithms from Twitter and Facebook to show you things that you're interested in.
So I can't rely on RSS only. But I've already spent a fair amount of my "messaging app" capital on convincing friends and family members to use Telegram. This means that they too can use my bot. I can create a subscription service for the bot so that new people who communicate with my bot will get the option to either "ask for updates" or have updates automatically published. Note the "push update" feature hasn't been developed yet. I'm still brainstorming how I think it should behave in the back end as well as how the interface should behave from a user perspective.
Of course the other option would be to write and maintain my own app for android and iOS, then convince people to download it. I think maintaining a bot will be simpler and easier than learning to write in two new languages and deal with app publishing and submission policies. Also by using the bot I can piggy back off the Telegram developers being responsible for updating the apps on phones and computers and I just need to make sure my bot stays updated to keep up-to-date with Telegram API's.
Where to go from here
I hope I've been able to outline a system of interlocking pieces that should hopefully make for a fun and easy way to stay abreast of my travels, my thoughts, and ultimately be a way for me to no longer be the mountain hermit recluse that no one knows about cause he has no presense online.
Please come back soon for the next part where I start to dive into the various components of how everything fits together.