4 ms·
Even as a much smaller team, building Heii On-Call [0] as a lightweight alerting/monitoring/on-call rotations SaaS based on Ruby on Rails has basically been a p
by compumike 4y ago
Even as a much smaller team, building Heii On-Call [0] as a lightweight alerting/monitoring/on-call rotations SaaS based on Ruby on Rails has basically been a pleasure!
And as the article highlights, perhaps the key reason for smooth deployments and upgrades is that the CI testing story is so, so good: RSpec [1] plus Capybara [2] for us. That means we have decently extensive tests of just about all behavior. The few small Rails and Ruby upgrades we've done have gone quite smoothly and confidently, with usually just a few non-Rails gem dependencies needing to be manually updated as well.
The "microservices" story is where we've pulled in the Crystal programming language [3] to great effect. After dabbling with Go and Rust, we've found that Crystal is truly a breath of fresh air. Crystal powers the parts of Heii On-Call that need to be fast and low-RAM, specifically the inbound API https://api.heiioncall.com/ https://api.heiioncall.com/ and the outbound HTTP(S) prober background processes. I've ported some shared utility classes from Ruby to Crystal almost completely by just copy-and-pasting ___.rb to ___.cr; porting the tests for those classes was far more onerous than porting the class code itself. (Perhaps another point of evidence toward the superiority of RoR's testing story...)
The front-end story is nice but just a bit weaker. Using Hotwire / Turbo successfully, but I have an open PR to fix a fairly obvious stale cache bug in Turbo [4] that has been sitting unloved for nearly a month, despite other users reporting the same issue. I'm hopeful that it will get merged in the next release, but definitely less active than the backend side.
For me, the key conclusion is that the excellent Ruby on Rails testing story is what enables everything to go a lot more smoothly and have such a strong foundation. I'd be curious if any GitHubbers can talk more about whether they too are using Rspec+Capybara or something else? Are there internal guidelines for test coverage?
[0] https://heiioncall.com/ https://heiioncall.com/
[1] https://rspec.info/ https://rspec.info/
[2] https://github.com/teamcapybara/capybara https://github.com/teamcapybara/capybara
[3] https://crystal-lang.org/ https://crystal-lang.org/
[4] https://github.com/hotwired/turbo/pull/895 https://github.com/hotwired/turbo/pull/895
- jack_riminton 4y agoMy startup is using minitest (mainly for running tests in parallel I believe) and capybara. Crystal looks great, are you using it mainly for type checking? If so why not Sorbet?
- compumike 4y agoWe're using Crystal for "premature optimization" for the parts of the system that need to scale, specifically: (1) the API server at https://api.heiioncall.com/ https://api.heiioncall.com/ which gets hit frequently for check-ins, e.g. cron job monitoring (2) the outbound probe processes that do website monitoring, polling your desired URL every minute and making sure it's up!