Architecture used by dropbox

≡放荡痞女 提交于 2019-12-07 13:48:04

问题


I want to know whether client-server or peer-to-peer architecture is used by dropbox. Here my doubt lies: Suppose we have two systems which are synced via dropbox.

System1: dropbox > Folder_A > file_1

System2: dropbox > Folder_A > file_1

Initially both are synced. Suppose now, User on System1 adds a file_2 in Folder_A. Now this file gets uploaded to dropbox server. But my question is how does server notifies System2 about file_2.

I am seeing Observer Pattern being used here. But Is Pull or Push mechanism used ??

Point1: Does dropbox client on System2 polls dropbox server after some interval to get updates.

Point2: Dropbox server pushes the file on system2 itself.

Point3: All systems including dropbox central system is considered as a peer. peer-to-peer network is formed. dropbox central peer controls which file to be sent to which system.

PS: My question is not specific to dropbox but all the file sync service provider sites. I just used dropbox as reference.


回答1:


I suspect a pull mechanism is used as there are too many firewall issues in push this article strongly suggests that pull is used. Of course, the easiest way to be sure would be to look at a wireshark trace.




回答2:


dropbox uses push mechanism.Also it has

Constant TCP connection to notification server by Dropbox client used for changes that are performed elsewhere.client eventually requests for new changes and server responds at every 60 seconds in case of no change .new request is sent as soon as response comes from server.Changes on the central storage are instead advertised as soon as they are performed.




回答3:


I dont know much but i think dropbox (or other similar sites) use push mechanism. Because in pull mechanism there will be lot of unnecessary calls. please correct me if i am wrong.



来源:https://stackoverflow.com/questions/11338032/architecture-used-by-dropbox

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!