ruby on rails - How are SaaS applications organized? -


consider web (mvc, example rails) application multiple clients service.

how design this?

  • one application instance per client? (+ 1 database per client)

  • one instance clients (+ 1 database clients)

former 1 simple, but... "inefficient". how latter? (best practices, design patterns) how separate client data? example: worker "a" of client "1" has 2 documents, worker "b" of client "2" has 3 documents. how build model associations protect other users (and clients) data? think joining every query client model not solution.

i suggest having @ earlier response on multi-tenant apps in ruby on rails.

it depends on use case, simplest way handle single database scoping particular applications. can head there depending on requirements/budget.

i big fan of postgresql schema system detailed in link :p


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -