-
Notifications
You must be signed in to change notification settings - Fork 16
Conversation
src/index.js
Outdated
* @type {Map<string, Buffer>} | ||
* @private | ||
*/ | ||
this._lvc = new Map() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest using LRU cache, caches like that bitten as so many times in go-ipfs as things scaled up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah need to figure out what's the best caching strategy here. For now I just want to test if this actually solves our problems
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done @Kubuxu better safe than sorry :)
Note that this is a change in the spec. Good to try new things, but remember that this won't be present in go-ipfs unless it gets pushed to the spec and implemented in go-ipfs too. //cc @whyrusleeping This last message cache is something super biased for Orbit. What we are looking for is a SACK (Selective Ack) strategy, so that new peers can NACK the last message. |
@diasdavid please see libp2p/research-pubsub#12 for discussion on this
could you explain how this would give us last message caching? |
yes, but the spec is not properly written down, which makes it hard to properly propose changes.
That is fine. It looks like this works really well, so once we have an agreement on the spec we can move to implementing it in go as well. |
I also want to point out, that while I agree that spec updates are important, the whole floodsub story is still behind an experimental flag, with the goal to get something that works for the consumers of the api. This change is quite an important one, especially on the js side, as there is no ipns that could be used to do a similar thing. I also do not agree that it's fully tailored for Orbit. While that was the motivation it is a problem that many systems trying to propagate state through ipfs using pubsub will run into. |
Experiment to improve message loading in orbit.
ipfs/team-mgmt#355
cc @haadcode