How to avoid if/else with different ramifications

This page summarizes the projects mentioned and recommended in the original post on /r/rails

Judoscale - Save 47% on cloud hosting with autoscaling that just works
Judoscale integrates with Rails, Sidekiq, Solid Queue, and more to make autoscaling easy and reliable. Save big, and say goodbye to request timeouts and backed-up job queues.
judoscale.com
featured
InfluxDB high-performance time series database
Collect, organize, and act on massive volumes of high-resolution data to power real-time intelligent systems.
influxdata.com
featured
  1. Interactor

    Interactor provides a common interface for performing complex user interactions.

    You might be looking for an interactor pattern for these services. I've used this gem for similar things before and have had good experiences.

  2. Judoscale

    Save 47% on cloud hosting with autoscaling that just works. Judoscale integrates with Rails, Sidekiq, Solid Queue, and more to make autoscaling easy and reliable. Save big, and say goodbye to request timeouts and backed-up job queues.

    Judoscale logo
  3. wisper

    A micro library providing Ruby objects with Publish-Subscribe capabilities

    I would use events. Every services broadcast its results and everything that needs to listen for them. It also great to decouple dependencies between services. I like the Wisper gem : https://github.com/krisleech/wisper

  4. Light Service

    Series of Actions with an emphasis on simplicity.

    Similar to the above recommendations of Railway Orientated Programming and the Interactor gem, I use the Light Service gem. While it can sometimes be a bit verbose it excels in code reuse, testability, and composition.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • The Decree Design Pattern (Ruby on Rails)

    2 projects | /r/programming | 3 Feb 2023
  • Publish/Subscribe with Sidekiq

    2 projects | dev.to | 21 Feb 2024
  • Introducing StepSequencer: A Non-Monadic Take on Railway-Oriented Programming in Ruby

    3 projects | /r/ruby | 13 Nov 2023
  • Event Store with Rails

    3 projects | /r/rails | 15 Nov 2022
  • Rails Google Cloud PubSub options

    4 projects | /r/rubyonrails | 7 Nov 2022

Did you know that Ruby is
the 12th most popular programming language
based on number of references?