0

I always asked my self how can I build website where users can download database and share with each other. Like torrents or something like that.

So user comes to website and he can download all database and website from our server or from each other and have it offline and they could update it again even if our server is down, then they can share with each others. So on their desktops of mobile phones.

I think skype did something like this two users that did chat they have both copy of that chat log, so if one loose it the other have it still and it can be sync.

So if anyone can give me some idea how to do it or maybe there is something like this that makes programming easier... like sharing databases (mysql, couchdb, mongodb etc.), and then I could program it to get the database offline on their computers.

And how wikileaks did it their info it is all over the place

4

2 に答える 2

0

関連する MongoDB コレクションを CSV または JSON ファイルとして、外部ユーザーがアクセスできるファイルにダンプするように cron をセットアップします。たとえば、15 分ごとに実行され、「mydatabase」内の「users」コレクションをエクスポートする cron は次のとおりです。

*/15 * * * * mongoexport --csv -h localhost:27017 -d mydatabase -c users -f name,email,age -o /path/to/public/users.csv

そのため、ユーザーは「users.csv」をダウンロードできます。もちろん、機密情報のためにこれを行うことはありませんよね?

于 2012-12-04T23:21:44.813 に答える
0

オフライン モードは Web サイトの優れた機能ですが、データベースを「共有」することは通常、最善の方法ではありません。データのどのコピーが最新になるか、競合する可能性のある変更を誰が行ったかなどがわからないためです。 .

1 つのオプションは、集中型データベースを引き続き使用し、ユーザーが自分のデータに加えた変更をキューに入れ、サーバー上で再生することです。データの競合が依然として存在する可能性があり、ユーザーは変更を簡単にロールオーバーできるため、これは絶対確実ではありません。新しいリビジョンがあるかどうか、アイテムを最後に変更したのは誰かなどを確認する必要があります。

于 2012-12-05T00:16:36.203 に答える