The gossip protocol comes without a built-in storage mechanism.
Gossip messages send to the network are distributed among all peers on the network and that's that, messages are not stored by any of the peers.
The gossip messages are in many ways similar to NXT/FIMK transactions.
- they can use strong encryption
- they always have a sender
- they can have a recipient
- they always have a timestamp
- they always have a topic (which is a free-form number similar to how there are transaction types)
- they all contain a powerful cryptographic signature which can be used to confirm the sender is who he/she says he/she is (this will almost certainly be used at a later stage to manage network access and/or priority for gossip messages - basically spam control)
So how does that work if I cant query the network for messages?
Well thats where the efficiency comes from, it's an event based system
For this to work each server (peer) in the network (at least the ones that want to serve clients) needs to be able to have clients register with them as listeners (done over websockets) and when that peer detects a valid gossip message it should forward that to it's registered client listeners.
But not to every listening client of course, only to those interested in that specific topic, sender or recipient (or combination of those).
Other people can have a real-time connection with your script without knowing it's IP address, that is since all messages are directed to any one of the peers in the gossip network. Because of this one-to-one-to-all setup between clients and servers and servers among each other the scale of the number of direct connections becomes enormous. And because each gossip message comes with a sender ID which is your FIMK address (until i add this to NXT-PLUS) each relay node (peer) in the network has access to the same strong identity and balance info as all the others, meaning it can stop spam data at the gate (keeping things really fast).
What can be built on such a free decentralized real-time message bus (since thats what it is basically) I dont know. But I know it's a lot, real-time direct chat is just one it's uses.
If you look at the gossip-service.js you'll find the full client-side implementation of it all:https://github.com/fimkrypto/mofowallet/blob/e5a7db321ff990bb44efe65d3c0a9a620c313f36/app/scripts/services/gossip-service.js
Not all of that is required of course to get a working prototype. I'm planning still on making an easy to use plugin system to tap into Lompsa, it will contain the most easiest gossip support possible I guess.
So in short - what to remember is - Gossip is a free decentralized messaging protocol - making it possible for people around the world to have real-time, free, encrypted communications with each other.