by nullbytesmatter · 4y ago · 0 comments
Unlike the author, my product was making actual money ($XXX,000). I ended up completely rewriting the product from scratch (took ~3 months). I just swapped the old Rails service out for the new service on April 1st.
I stuck to "simple and boring" tech for the new stack. No more Rails, etc.
Congrats on having the gumption to do a rewrite. I’m curious what are the more detailed decisions you took to better future proof?
Given how often things shift in our world, I feel like anything I choose now will just end up being obsolete and annoying to maintain in a 5+ year timeframe.
To future proof the service I wanted to use tech that was based on the fundamentals. This boiled down to no special tooling, no special build process, etc. Furthermore I cut out all dependencies I could. I got my third party dependencies down to two (postgres + nginx).
Practically speaking this meant: no node, no yarn, no ruby, no webpack, no sidekiq, no redis, etc.
The entire service is now Nginx, Postgres and a single binary that has html/css/js/assets embedded inside of it. The entire product is a single Go binary that connects to postgres-- that's it.
I could probably do without Nginx, but it has been nice for a variety of reasons and has never given me a headache.
My tech/decisions may not be for everyone (that is why I didn't share them initially) but it works incredibly well for me and most products I build.
Once you get past a certain number of developers, the constant overhead is something that still needs to be dealt with, but relative to the human-hours of your entire team, it's much smaller. Also, the team is no longer able to ad-hoc share architectural goals, and so having a framework in place that enforces them scales much better.
Starting with a framework is tempting because everyone thinks that they'll get big. But what if you don't? Maybe it's better to have a little passive income than crash and burn. On the other hand, if you do get big, the tradeoff is that you'll need to rewrite with a framework. That's another opportunity to crash and burn, so it's debatable which is better. Personally I think that Twitter has demonstrated how to do the "start dead-simple and rewrite as the team grows" method.
Many years ago I used to write projects with Python/Django. The Django project releases 3-year LTS versions with 3-month overlap. LTS versions are supposed to ease the constant upgrade overhead, and hitting a 3 month window every 3 years doesn't seem too bad, especially when they also release documentation specifically guiding you from one LTS version to the next. Does Ruby/Rails not do this?
Doesn't mean your application isn't going to sprawl, but you will at least have a complete list of all its moving parts at all times, and changing them out can at least be done in a controlled way.
Still, it sounds like SSLPing's problem (and yours) was mostly bitrot, and no amount of ansible will cure that.
Seems like a rewrite would be way more effort.
Sure-- the rewrite was more effort up front but the hope was the long term compounding benefits would be worth it. I don't generally advocate for rewrites but in this case I went for it (and actually got it done).