Sign in to follow this  
Axiverse

Implementing a distributed database

Recommended Posts

Does anyone have any idea how a distributed database would be implemented? E.g. Each user has a local list of names and if any user adds or removes a name, it would be modifyed in every user's database.

Share this post


Link to post
Share on other sites
It seems you are talking more about replication than an actual distributed database (which is typically more like one database, with different tables (or even parts of tables) stored at different sites).

In any case, the hardest problem to solve here is the synchronization. You need to determine what your requirements are. For instance, can ANY of those users insert names into your table, or are they ALWAYS coming from a single source, and getting pushed out to a bunch of child sites? In the latter case, it becomes relatively easy. However, in the former (where everyone can insert/update), you will need to use a distributed commit algorithm. Basically, you can spend some time studying transaction theory for DB's, and then realize you need to do the same thing over several replicated databases. This is a hard problem, and is a hot research topic these days. That's not to say there aren't systems in place that already do this, but just that they are either imperfect or just slower than they could be.

Think of a case like this: There are three DB's, and at each and every one, some user inserts a row with the same key. All of a sudden, a distributed arbitration algorithm has to resolve this conflict (say by serializing across all the sites).

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by Axiverse
Does anyone have any idea how a distributed database would be implemented?


I am also not sure if you are really talking about a "distributed database" or not.

What you are describing:

Quote:
Original post by Axiverse
E.g. Each user has a local list of names and if any user adds or removes a name, it would be modifyed in every user's database.


...can basically be easily achieved using a conventional database, with the exception that users don't literally have their "own database" located on their machine, but are rather only connected to a central DB server using a session, that way everything will be directly reflected on or updated across all connected clients.

Maybe you can elaborate more on a possible usage scenario, so that we can what it is that you want to do exactly, and whether you really need a DISTRIBUTED DB?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this