frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Building Modular Rails Applications: A Deep Dive into Rails Engines

https://www.panasiti.me/blog/modular-rails-applications-rails-engines-active-storage-dashboard/
83•giovapanasiti•4h ago

Comments

henning•3h ago
This blog post just shows how libraries and frameworks often solve one problem but create another. This leads to the emission of ridiculous sentences like `One of the trickiest aspects of building engines is handling routing correctly` which would be a non-issue if you just wrote simple code to solve the problem in front of you instead of doing a bunch of "modular" "engine" framework-y compiler-y nonsense that adds boatloads of complexity just to accomplish one basic thing like handling file uploads.
adenta•3h ago
What problem was created?
pqdbr•1h ago
"one basic thing like handling file uploads" - say no more.

Actually, the article isn't even about handling file uploads - it's about deliberately creating a modular admin panel for dealing with file uploads.

It's not modularity for "framework-y" sake, but to easily deploy that admin panel in other applications with literally a one-liner.

giovapanasiti•1h ago
I couldn't have written this comment better myself. Thank you this is exactly the point
helle253•3h ago
I love Rails Engines, it's a very slick feature.

I recently migrated a featureset from one Rails project into another, as a mounted engine, and ensuring isolation (but not requiring it!) has been tremendously helpful.

hk1337•2h ago
I have been looking at using Rails Engines recently playing around with trying to get an idea off the ground.
GGO•2h ago
Rails engines are one of the most underrated features that everyone should be using more.
matltc•2h ago
Miss seeing rails in the wild
pqdbr•1h ago
Rails is not only alive and well, but actually booming.
capevace•2h ago
The Filament package for Laravel lets you build similarly encapsulated „plugins“, that are basically mini Laravel apps, that can be easily added to existing apps.

The plugins can rely on all of the Laravelisms (auth, storage etc) and Filament allows them to easily draw app/admin UI.

mrinterweb•1h ago
One of the reasons microservice architecture originally became popular was to break apart monolithic applications. In many cases, I bet a big driver was a lack of separation of concerns, and a more modular design was desired. There are many ways to put up walls in software to help make software more modular and self-contained. Rails engines are a good way to make more a rails app more modular. The number of times I've seen microservices created for the purpose of modularity (not scaling concerns), and the complexity that has brought has really soured me on microservices.
giovapanasiti•1h ago
This is exactly my experience. Most of the time people go to microservices for the wrong reason and they will regret that for years
whstl•1h ago
Different sections of an app can use different databases, if the bottleneck is in the database.

Different routes can be served by different servers, if the bottleneck is in CPU usage.

Different async tasks can run on different task runner services, if the problem is tasks competing with each other.

Different test suites can run for different sections of the app, if the problem is with tests taking too long to run.

Github and others even allow specific subfolders to be "owned" by different teams.

What else is there? Even slowness of compilation and/or initialization can be alleviated, depending on the language or framework.

nurettin•1h ago
I use multiple services for resilience. Example: With multiple services that have clear separation of concerns, you can debug and fix your processing layer without stopping the collection layer. You can update a distributor while workers wait and vice versa. This way I never have downtime anxiety. No regrets.
zrail•37m ago
Separation of services is orthogonal to separation of concerns. There's nothing stopping you from having multiple entry points into the same monolith. I.e. web servers run `puma` and workers run `sidekiq` but both are running the same codebase. This is, in fact, the way that every production Rails app that I've worked with is structured in terms of services.

Concerns (in the broad sense, not ActiveSupport::Concern) can be separated any number of ways. The important part is delineating and formalizing the boundaries between them. For example, a worker running in Puma might instantiate and call three or four or a dozen different service objects all within different engines to accomplish what it needs, but all of that runs in the same Sidekiq thread.

Inserting HTTP or gRPC requests between layers might enforce clean logical boundaries but often what you end up with is a distributed ball of mud that is harder to reason about than a single codebase.

Give and Take: An End-to-End Investigation of Giveaway Scam Conversion Rates

https://arxiv.org/abs/2405.09757
1•paulpauper•4m ago•0 comments

Ani's Character Profile in Grok

https://twitter.com/techdevnotes/status/1944739778143936711
1•pr337h4m•6m ago•0 comments

Ask HN: Why isn’t Hollywood producing WWIII films in these perilous times?

1•amichail•6m ago•2 comments

Guessing the Player's Sunrise

https://docs.getlost.gg/2.0.0/blog/sun-time/
1•todsacerdoti•6m ago•0 comments

The gains from trade are not the gains from trade

https://nicholasdecker.substack.com/p/the-gains-from-trade-are-not-the
1•yorwba•6m ago•0 comments

Plastic surgeon off the hook for alleged Covid fraud, injecting kids with saline

https://arstechnica.com/health/2025/07/bondi-drops-case-on-doc-accused-of-giving-kids-saline-shots-instead-of-vaccines/
1•duxup•7m ago•0 comments

Claude Code token usage and costs from local JSONL files

https://github.com/ryoppippi/ccusage
1•jbernardo95•7m ago•0 comments

Iceberg Is Wrong

https://database-doctor.com/posts/iceberg-is-wrong-2.html
1•redixhumayun•7m ago•0 comments

The Battle for Britain's First Book of the Month Club

https://www.historytoday.com/archive/history-matters/battle-britains-first-book-month-club
1•samclemens•7m ago•0 comments

Show HN: Context Rot Technical Report – How Input Length Impacts LLM Performance

https://research.trychroma.com/context-rot
2•kellyhongsn•7m ago•1 comments

AI is killing the web. Can anything save it?

https://www.economist.com/business/2025/07/14/ai-is-killing-the-web-can-anything-save-it
1•farseer•11m ago•0 comments

Improving AVIF in Open Source

https://halide.cx/blog/improving-avif-in-open-source/index.html
1•computerbuster•11m ago•0 comments

ZX Spectrum – Introduction To Programming (1983) [video]

https://www.youtube.com/watch?v=jPUaOS-TXfI
2•austinallegro•13m ago•0 comments

Commodore 64 Ultimate: Basic Beige

https://www.commodore.net/product-page/commodore-64-ultimate-basic-beige-batch1
2•doener•14m ago•0 comments

ETT: Expanding the Long Context Understanding Capability of LLMs at Test-Time

https://arxiv.org/abs/2507.06313
1•PaulHoule•15m ago•0 comments

C++ Library

https://mcyoung.xyz/2025/07/14/best/#fnref:terrible-people
1•todsacerdoti•16m ago•0 comments

Giant map details nerves across a mouse's body: see stunning pics

https://www.nature.com/articles/d41586-025-02156-y
1•bookofjoe•18m ago•1 comments

Being Boring app: relax and meditate for a short while on Apple devices

https://www.peterborgapps.com/beingboring/
1•sea-gold•19m ago•1 comments

Ice cream producers to phase out artificial food dyes

https://www.cnbc.com/2025/07/14/many-us-ice-cream-producers-to-phase-out-artificial-food-dyes-by-2028.html
1•Bluestein•20m ago•0 comments

As AI advances, the best interfaces will be the ones we don't see

https://airesidency.substack.com/p/a-screenless-future
1•carlyayres•20m ago•0 comments

AI's Goldilocks Problem: Powell, Huang, and Amodei Can't Agree

https://fortune.com/2025/07/14/will-ai-destroy-white-collar-jobs-entry-level-gen-z-amodei/
1•Bluestein•21m ago•0 comments

Sell Yourself Well – What Soham Parekh Can Teach Us

https://www.fldr.zip/blog/sell-yourself
1•wyxuan•23m ago•0 comments

Undiscovered galaxies orbiting the Milky Way, supercomputer simulations hint

https://www.livescience.com/space/cosmology/100-undiscovered-galaxies-may-be-orbiting-the-milky-way-supercomputer-simulations-hint
1•Bluestein•23m ago•0 comments

Collatz's Tape

https://gbragafibra.github.io/2025/07/12/collatz_ant8.html
1•Fibra•24m ago•0 comments

My Cybersecurity Research on Red Lion G3 Web Server Vulnerabilities

1•hacker_might•27m ago•0 comments

C-: A Portable Assembly Language (1997)

https://www.microsoft.com/en-us/research/publication/c-a-portable-assembly-language/
2•thunderbong•30m ago•0 comments

I Answer 18 Questions

https://www.honest-broker.com/p/i-answer-18-questions
1•paulpauper•33m ago•0 comments

Show HN

https://www.hexar.ai/
2•prajwalgote•36m ago•0 comments

LittleHorse Kernel: A Platform for Distributed Event-Driven Applications

https://github.com/littlehorse-enterprises/littlehorse
1•mooreds•36m ago•0 comments

Show HN: I Made a Product Image and Ad Cloner

https://extension.xsocialai.com/
1•pvisilias•36m ago•0 comments