Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do client need to replicate whole gbs of db ? #75

Open
yashwanth2804 opened this issue Jul 11, 2018 · 6 comments
Open

do client need to replicate whole gbs of db ? #75

yashwanth2804 opened this issue Jul 11, 2018 · 6 comments

Comments

@yashwanth2804
Copy link

does replicating bulk dbs resources and time consuming, anyway can we limit upto few records
thanks

@RichardLitt
Copy link
Member

Good question, @yashwanth2804.

Let's make sure to add an answer to the docs when someone provides one.

@mistakia
Copy link

I don't believe there is currently a way to limit replication. You may want to explore modeling your data differently (on orbit-db or even ipfs).

Generally speaking, when modeling data for OrbitDB you should strive to "partition" it where it makes sense - i.e. along access rights. As an example, in a twitter-like application, each user should have their own database instead of a global "tweets" database for everyone.

@yashwanth2804
Copy link
Author

thanks for the reply,
I understood your explanation.say if i follow Justin X (random 🌟) on Twitter, where he makes tons of tweets a day.if i am gonna subscribe him after 2 yrs. As your mentioned pubsub model ,i subscribed for him so will i get megatons of tweets from his 1st twt.
i may limit in ui but how can i limit in loading those tweets.

please correct me if i am off the topic or missing something.

@mistakia
Copy link

mistakia commented Jul 18, 2018

If you have the tweets locally - you can limit how many entries are loaded by sending in an amount to db.load(amount):

const db = await orbitdb.feed("<justin's tweet OrbitDB address>")
await db.load(10)
// db now contains the 10 latest entries/tweets

If you don't have the data locally, I'm not sure there's a way to limit syncing to only the 10 latest entries.

@cristiano-belloni
Copy link

If you can't limit how many data you can replicate, it means that malicious peers could trick you to "follow" them, then just flood you with data. Which might be a huge problem in 99% of the use cases.

@aphelionz
Copy link
Member

Moving to Field Manual to discuss further

@aphelionz aphelionz transferred this issue from orbitdb/orbitdb Sep 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants