D
D
Dmitry Kuznetsov2016-01-22 13:45:51
Social media
Dmitry Kuznetsov, 2016-01-22 13:45:51

What is needed for a good social networks?

Hello. I decided in my free time (and I have a lot of it) to make my own social network. network. At least for training, if the idea burns out. And immediately a lot of questions arose, which I will describe below. I hope for your good answers, and not like "Why do you need a social network", etc.
1. Storage of photo, audio and video files.
At the moment, I have one server, in which the social media will actually be deployed. network. I'm wondering what is the best way to organize the folder and file structure for storing files.
As I understand it, among other things, I will have to raise another server for storing files, CDN and other goodies. I understand correctly? And is it immediately necessary to focus attention during the development of the site on this problem, or later?
2. Database.
The amount of data, especially posts and personal messages will be very much. From here comes the question - how best to organize everything? Replication or raising for these needs of servers?
3. Messages
Everyone is already used to the fact that in VK and similar social networks. networks, private messages are received and sent without reloading the page. How it is better to implement it? Sockets or just Ajax?
There was an idea to work with sockets, but in order for messages to be saved when sent, you have to climb with requests to the database, and this already looks like Ajax.
PS: Please, don't litter the topic with messages that I won't do anything with such knowledge... So, you have to learn sometime)
Thank you in advance for your answers!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Q
Qw234, 2016-01-22
@dima9595

So this is a study project?
1. Files (photos, etc.) are stored on a specialized "cloud storage", for example, Amazon S3.
2. Replication is not replication, sharding is not sharding - depends on the load. To divide a DB on sense. For example, I would single out a database for messages, a database for accounting and a database for publications. And all these databases can be of different types.
3. Look at push technology if we are talking about heavy loads.

S
Sanes, 2016-01-22
@Sanes

Any social the network is 99% dependent on contingent, administration and marketing. A bunch of examples when there are millions of visitors on the usual forum engine. You should break your task into modules and deal with implementation issues.

T
toaster khabrovich, 2016-01-22
@studententer

first you need to make a simple network like a blog forum
, then you can already think about a good or cool
database, you can do it on files

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question