Comments (5)
Possible edge case: I connect to a cabal, read some backlog, then leave. I return the next day, still not having posted anything yet, and now nobody will ever replicate my feed again (because it's size=0
).
from cabal-core.
cc @telamon
from cabal-core.
@noffle yes, that pretty much sums it up, if you're a lurker then you won't unnecessarily tax the network you'll just act as another seed,
And if a user writes a message his feed will no longer be empty and thus it will no longer be filtered.
from cabal-core.
from cabal-core.
@noffle The peer shouldn't be filtered, only zero length feeds would be rejected. So a user with a zero-length writer should behave like --seed
mode until he appends an entry.
I'm thinking of letting other peers know there's a new feed that is qualified for replication the same way that the active feed forwarding works.
When an peer with established connections suddenly becomes aware of a new feed the _onFeedReplicated handler is invoked that forwards the feed to all other connected peers that dosen't have it yet.
So the same needs to be done on the peer that has a zero-length writer when the first entry is written.
Maybe cabal could invoke the above _onFeedReplicated()
or startConversation()
method which should reannounce previously filtered feeds.
But anyway, at the moment of writing, in order to manually notify connected peers that your writer is no-longer empty we could do the following:
const writer = multi.feed('local')
writer.on('append', () => {
if (writer.length === 1) {
multi.replicationManager.connections.forEach(conn => {
multi.replicationManager._onFeedReplicated(conn, writer.key)
})
}
})
I'm adding to my TODO to expose an manager#advertise(key)
method to wrap up the above loop in a nicer package.
Did i manage to answer the question?
from cabal-core.
Related Issues (20)
- hidden users can edit channel topic
- sodium-native undefined symbol causes startup crash
- Generate typescript definitions from JSDoc
- Status messages HOT 2
- ephemeral messages HOT 2
- Experiment with `bridge: true` property HOT 1
- Message ordering HOT 10
- Sync & discovery inconsistencies HOT 3
- Add destroy method HOT 3
- Add WebRTC Fallback? HOT 5
- Emit event for new feed being added HOT 1
- Export / import swarm nodes
- Add search to cabal HOT 1
- Unknown users are joining private cabals HOT 5
- host from URL is undefined in electron/browsers
- [moderation] Case where a mod can +mod or +admin others HOT 2
- Private cabals HOT 2
- Does cabal have any sort of flooding resistance? HOT 2
- Specify a default listening port HOT 2
- Suggestion: make it clear which is the main repo to track HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cabal-core.