Connecting thoughts
Articles written by SINAPTIA about Ruby on Rails.
The untold challenges of OpenAI's batch processing API
The most important part of making OpenAI’s batch processing API work in the real world is building a reliable polling system. This post explains why that’s necessary, and what else you’ll need to handle: token limits, partial failures, and retries.
Rails performance at scale: fixing slow queries with millions of rows
After saving millions of records in SolidTelemetry, a database-backed OpenTelemetry implementation for Rails apps, we could see how the performance of a page degraded to the point of unusability. Discover how we made the page 22x faster.
Building intelligent applications with Rails
Why we choose Ruby on Rails for intelligent applications development and how Rails helps us strategically integrate and try out the latest improvements in the AI field.
with_recursive_tree
In the last post we explored tree structure implementations for Ruby on Rails. In this post, we present a new implementation using Common Table Expressions.
Tree structures in Rails
Tree structures are a common way of organizing hierarchical data. In this post, we’ll explore existing solutions for Ruby on Rails, their benefits, drawbacks, and when to use them.
Debugging a memory-leaking action
This week we had to refactor a feature in one of the Ruby on Rails apps we’re maintaining. While at it, we discovered it was leaking memory, making the memory usage ramp up exponentially. With our expertise and the help of some tools, we were able to identify the root cause and fix the issue. Read on to learn more about how we approached this problem.
Optimize background jobs with Delayed::UniqueJob
Delayed Job doesn’t have a mechanism for defining unique jobs. Enqueing a time-consuming or resource-intensive job multiple times could be harmful if not treated accordingly. Introducing Delayed::UniqueJob, a Ruby gem for defining unique jobs in Delayed Job.
Reimplementing a broken search engine
We’ve been working with a boat marketplace for a year now. One of the most interesting challenges we faced during this time was reimplementing their broken search engine. This is how we did it.
Why Ruby on Rails is still great for MVPs
Ruby on Rails remains a great framework for developing web applications. Thanks to its maturity and philosophy, one can build MVPs in a fast, efficient, and scalable way. Discover why Rails continues to be a great and influential framework to this day.
Long-awaited comparison validator comes to Rails 7
For years we had to manually compare values in our validations. Rails 7 added the comparison validator to ActiveModel. Read on and discover, as we just did, how it works.
Is Ruby on Rails secure?
This is one of the most frequently asked questions from people who want to build an MVP with Ruby on Rails.
Talking to hostile APIs
APIs allow us to communicate with third-party software in order to use their services and data. In today’s software, it’s almost impossible not needing to use one, one way or another. What if they are hostile?
Introducing Audited-UI
We’ve been using the audited gem for a couple of projects, but the lack of a built-in view to display the changes challenged us to write our engine. We are happy to introduce audited-ui.
Consequences of parrot-like APIs
Psittacism signifies repetitive speech in the manner of a parrot. Can APIs suffer from it and what are their consequences?
Using strong_params beyond mass assignments
Strong Parameters are typically used in Ruby on Rails for mass assignments, but in this article, we explore an additional use for this feature.
Don't do this at home
Service objects is a Ruby on Rails pattern widely used. In this post, I’ll show you one example I stumbled upon recently. What’s wrong with it and how did we fix it?
Bringing a 10-year-old Ruby on Rails app back to life
Last week we published the case study of one of our first projects. After 10 years in the archive, I found and brought this old Ruby on Rails 4.0 application back to life.
Hybrid and Dynamic Database Multitenancy with Ruby on Rails
What is it and how to achieve it with Rails and Postgres? Learn how we successfully implemented this flexible and scalable architecture in a real-world project.
Debunking myths about Ruby
There’s a lot of criticism of Ruby and Ruby on Rails. In this post, we will try and debunk four widespread myths about Ruby.
Why Ruby on Rails?
Ruby on Rails is our main tool for building MVPs and big web applications. People say it’s old, dead, slow, that it’s not relevant anymore. Wrong! Here’s why.
Your old Ruby on Rails application sucks
Do you have a Ruby or Rails application in production for more than 4 or 5 years? Has the test suite crumbled to pieces because of too many broken or flaky tests that no one has time to fix? Do you feel your app needs a lot of love that no budget will ever be able to sustain? Read on to know what we do in these cases.
Upgrading Ruby on Rails applications
Learn our approach to upgrading Ruby on Rails applications. Discover why staying current with the latest framework versions is crucial for security, performance, and future maintainability.
A case against form objects
Explore the concept of form objects in Ruby on Rails, their architectural purpose, and why a more disciplined approach to code organization is often beneficial.