Posts List

What I have done so far? Part 7

Introduce Go (that had great adaptation) We got to a point where we had to start deploying some apps on low-end machines and ruby stopped being the right tool for this problem. High memory footprint, tricky to track memory leaks pushed us to the corner. Once we were in that corner I started looking into compiled languages that could be potentially easily adapted at our company. Go seems really attractive in that department - really simple syntax, solid tooling, ridiculously simple deployment (single binary) and it was gaining more and more attention (for example it had great netlink library that we could just effortlessly consume).

What I have done so far? Part 6

Weird Microservices Redis setup that worked nicely It was a follow-up on that resque/sidekiq-based application - it was growing and growing, along with the business logic complexity. In 2016 I suggested splitting it into a bunch of smaller ruby-sidekiq apps that would communicate via Redis pipeline - after all, we already used Redis for communication and were relying on sidekiq heavily - so why reinvent the wheel? We ended up with a bunch of small apps and two internal gems.

What I have done so far? Part 5

Optimize database for fun & profit We got to a point where we ran out of int32 range on our biggest table - remember when Basecamp years later made a big blog post after the same issue caused some downtime for them? We were overflowing int32 before it was cool! Once you get to that point you have to think if you’re using that datetime field and if maybe date won’t do the job here (4 bytes less for each row!

What I have done so far? Part 4

Disaster recovery - ~8h rewrite from MongoDB to Postgres I recall once we had a huge problem with our MongoDB cluster - without going into too many details - it was like a 3TB+ beast that we have used mostly as some sort of cache layer. Unfortunately one of the replica servers decided to die on us - plugging a new server into the cluster as you can imagine slowed down everything to the point everything almost stopped - new server tried to pull the data from the main server that was under heavy load already and we ended up in a weird spot.

What I have done so far? Part 3

Start hiring from the ground up after moving to another city I remember my first hr-talk - it was so awkward. Nobody prepared me for it. Nobody walked me through anything, gave me any tips, I was just left alone to ask some questions for a person who was applying for a senior role. It went so bad and I was so stressed! I cherished that memory in order not to make the same mistake with my peers :).

What I have done so far? Part 2

Introduce React (the wrong way) We (at the company) were at the weird stage where we have some jQuery-glued libraries that were our ‘framework’ driving frontend. I think at that time it was often the case and usually, you made the call to jump into the Angular or Ember.js bandwagon. React was new on the market (I think it was around 2015) and was kinda… awkward? It was still unclear how to structure some more complex interfaces, where to handle the http layer, how to deal with the complex state, and so on.

What I have done so far? Part 1

I’m not the kind of person who keeps track of my work achievements, biggest challenges, and so forth. I have a very bad memory (for that and in general :P) so sometimes is hard for me to easily reach into my mind and construct a story when being asked by a fellow dev or recruiter so, what you have been doing so far? Thus I have decided to collect some, um, personal stories? A memoir so to speak. This is part one of hopefully more - so I can reflect on those achievements, small victories, and learnings later down the road.

Deploy docker container with http webhook the easy way

Recently I have been researching a way to automate the process of deploying some of my hobby projects. Frankly speaking nowadays I just pack everything in a docker container and call it a day, but as I rather very low-end servers (💸) I didn’t want to bring Swarm/Kubernetes overhead to the table (I had some pretty nice experience with Swarm a few years ago, but it seems k8s is eating the industry if you like it or not 🤷‍♀️).

Installing ruby 2.6 via asdf on macOS 10.15 Catalina

Recently I decided to give an asdf a go as I wanted to switch from my old rvm / nvm / homebrew-for-other-langs setup (plus I wanted to give a dart a try). Unfortunatelly installing ruby 2.6.x for one of the projects under Catalina was a true PITA.

PhotoSwipe video player (again with StimulusJS)

I was surprised that previous blog post about how to implement PhotoSwipe gallery using StimulusJS got so much traction (give the fact I spent 0 time promoting the blog and traffic is purely organic). So I decided to give it a follow-up and throw some ideas on how you can implement video support in PhotoSwipe using awesome Plyr library.