Architecture of Social Networking Platforms
I am curious to know how the platforms like Ning, SocialGo are designed. Not particularly about Social Network Platforms, but generally platforms that allow the users to bu开发者_开发技巧ild similar websites.
My understanding is when the users register they get a sub domain through which their members can register and access that particular user generated site. I suppose there is a common database structure that is cloned for each user that generates a site.
I am wondering how they will scale when the individual sites grow. Also if they introduce a new feature, how they will incorporate that to all the available sites? For example, a new feature that requires a change in the database structure, how it can be done to all the existing sites?
Yeah. I want to create something similar. But all these complexities came to my mind. If anyone experienced in developing something this complex could share their knowledge that would be great.
Thanks.
It's quite a bit difficult to guess what is the architecture of foo and bar companies but... my vision is to have a virtualized base install of your operating system of choice bundled with your amazing social app pre-configured on it with it's own database set, or linked to a master/slave cluster.
So the things is whenever a user comes and register a new socialapp clone; your system do the job by creating a fresh new virtual machine based on your template. This may take a few seconds to auto-config... well and if that socialnet rocks and need to scale; just clone a few other virtual machines and tie them together. vips, cache, front-ends, and pairs of master-slave databases. You can have templates for all.
Take special note that this virtual machine does not need to be a fully operating system; you can manage to build userlands only with technologies like OpenVZ and friends (FreeBSD Jails).
Check out http://www.opennebula.org also.
Well this are my simple 2 cents. I am learning this as well.
Sites that scale to very many users generally do not use relational databases. It is not possible to pull data out off a relational database fast enough, it is also not possible to have only one copy of the data.
I do not know exactly how they have programmed their systems, but here is a guess how they have done it.
If you take for example facebook, when you open your page you see things that your friends have written, both on their walls and on other peoples walls.
The point here is that everyone has a wall when you write on your wall the system also writes that same information on all your friends walls. So when your friend requests his page, all the information is in one place, very fast to return.
On the database side the databases are name / value pair databases. What is in the value part can be different versions and updated in batches. (Adding a column to a relational table with 100 million rows would probably lock the table for a while)
精彩评论