K
K
knott2013-02-20 15:33:04
PostgreSQL
knott, 2013-02-20 15:33:04

Proper Data Sharing in a Web Application?

Hello, I ask for advice from the habra community.
I am designing a service that will serve some organizations. Logically, the service is divided into two parts:

  1. Muzzle - includes all sorts of tinsel like Wiki, Landing Page and client-organization profile (billing, account status, etc.),
  2. Directly service in which employees of the client-organization sit.

Play 2.0 framework, I plan to be hosted by Heroku.
At this stage, it is not entirely clear how to separate instances and databases.
Should the database be separated by clients: one client - one database? Or is it worth keeping everything in one database, but attaching a column to each table indicating belonging to the client, and will there be problems with performance, administration and scaling?
If you choose the option of splitting databases, then how to split it all? After all, for this it is necessary to launch a service instance specifying the database for this client, it turns out that we make the instances heterogeneous, and this can be an obstacle to scalability. Also, as far as I know, Heroku requires webprocesses to be uniform.
I can assume a variant with homogeneous instances having a connection to each database, but this smacks of an overkill.
Estimated stack:
  • Play 2.0
  • Anorm
  • JDBC
  • PostgreSQL
  • Heroku

Not tied to Heroku, maybe something more suitable?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
relgames, 2013-03-03
@relgames

We have made the second option (one base). If the client is large, then a separate application instance with its own base is allocated for it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question