http://fimkchat.com/2015/08/experimental-lompsa-0-4-7/-----------------------
Finally I got around to implementing a protocol I've had in mind for a long time.
The idea is extremely simple but at the same time extremely powerful.
With the gossip protocol everyone running a FIMK server can send a message to one or more of his connected peers and be pretty sure that same message is distributed as fast as possible among all other peers.
Nothing is stored however!
All that remains on any of the servers is the ID of the message. And only for a limited amount of time just to make sure we don't keep sending the same message around.
To actually do something with gossip messages the receiving party should be actively listening for them.
A party does not need to listen for all gossip messages!
What you do is create a special key which is built up from a sender, recipient and or topic (or any combination of that) and you'll subscribe to that key through two-way websocket client/server connections.
Now when anyone sends a gossip that matches that key, as soon as that message reaches the (p2p) server your client is connected to you will be notified.
Having a free distributed messaging protocol could potentially come at a cost.
That's why all transactions and blocks on the network always go first.
It is a very early stage and these extra measures have not been enabled yet but this protocol comes with excellent spam prevention methods.
Since every gossip message has a sender and every peer in the network has knowledge of that sender's balance we could easily require a sender to have a minimum balance, we could also limit the number of messages per minute/hour/day etc per account ..
Every gossip message is signed with a secret phrase which proves who send the message (same mechanism as signing blocks).
Every gossip message is timestamped and the timestamp is included in the signature, messages older than - or from more than 15 seconds in the future are discarded.
The live chat feature is just one of it's uses and is what is available in lompsa (used to be mofowallet) 0.4.7 now.
Lompsa 0.4.7 shows how with this relatively simple protocol we can create a sophisticated client side (javascript) distributed real-time communications platform.
# client side protocol implementation
https://github.com/fimkrypto/mofowallet/blob/master/app/scripts/services/gossip-service.js# messages are stored and served from indexeddb
https://github.com/fimkrypto/mofowallet/blob/master/app/scripts/providers/gossip-chat-messages-provider.jshttps://github.com/fimkrypto/mofowallet/blob/master/app/scripts/providers/gossip-chat-list-provider.jsLots of other uses exist. Free fast real-time communications between FIMK users is just one of them.
Eventually the protocol could be used for anything.. communications, games, live multi-sig, live trading etc..