Settings

Theme

Ask HN: How does big apps/platform manage between ORM vs. Stored procedures?

16 points by ameyv 5 years ago · 3 comments · 1 min read


I wanted to ask how does big app like (Uber/slack) or any other for that matter or platforms like github who use Ruby/Python/C#/Java handle CRUD operations at scale with ORM or Stored procedures.

Where do you draw the line when to use SP's or ORM? Considering not everyone understands database in depth and can write performant queries or SP's.

I know its very simple view and probably tons patterns (like CQRS) and infrastructure/serverless/geo-replicated architecture might be use behind the scene.

Have you ever worked on such systems where both ORM and SP's are used and how do they keep logic not fragmented at multiple places at scale?

TLDR; How highly scalable apps manage DB interactions in code vs handwritten SQL?

QueensGambit 5 years ago

When we were building a big app 10 years back, we used ORM for user facing modules and stored procedure for batch processing such as CSV import/export. We would clear the ORM cache for every SP run which are usually scheduled at mid-night to avoid stale data.

These days, it is graph DB (such as firebase) for user facing module. It syncs data into a warehouse (such as BigQuery) that we use for batch processing.

Graffur 5 years ago

Very interested in the answers. I would guess that most big websites use stored procedures.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection