Damus
calle profile picture
calle
@calle
bitchat-sim – a simulated physical world for bitchat

Testing a decentralized mesh-based messenger like bitchat is hard. Like, really really hard. Predicting how design decisions will affect real-world behavior in larger crowds is vital though.

That's why I built a simulator.



I started by simulating people. Simulated people that have devices that run a bare-bone abstract javascript version of the bitchat app.

Their simulated device has bluetooth that can scan for other peers like bitchat, and establish connections and send and relay packets.



This is already pretty useful. I can spawn and move around these people, change their simulated phone's battery settings, their bluetooth range and more. I can test message propagation, packet routing, and adjust actual app parameters.

But it gets way better.



Walls, buildings, hills. All these affect how much Bluetooth signal travels from one person's phone to another. In the simulation, the physical environment modulates the Bluetooth strength.

Here you can see how the signal rather travels around the wall than passing through it.


People in the real world move so I gave them basic path-finding skills and put them in a city block.

Using data from OpenStreetMaps, I can now set up different environments and test crowds in them with just a few clicks.

Here you see 140 simulated users around Time Square. Messages propagate through the entire square.


You can contribute here: https://github.com/callebtc/bitchat-simulator

Or play around with it here: https://callebtc.github.io/bitchat-simulator/
2624❤️56❤️5🤙53👍3🚀2
kidwarp · 10w
What government do you work for?
Brunswick · 10w
Lol I made the exact same thing in the mid 90s when testing a mesh routing algo
jakub · 9w
Using Bluetooth for a chat application introduces physical-layer constraints (range, interference, pairing, power management) that massively outweigh any perceived benefit. It’s solving a non-problem with the wrong tool.
Justice Beaver · 9w
Fucking genius. #MenBuiltTheWorld
average_bitcoiner · 9w
https://github.com/coreemu/core Comparable project.
ABH3PO · 9w
If we cant increase the range, we should create a "carry messages feature " on bitchat where someone can carry a message intended for someone else. And when the recipient is in proximity with any of the carriers, they automatically receive it.
Globe99 · 9w
This is really cool! How are you modeling the walls, etc? I'm sure that this is something that Apple and any other device manufacturer has figured out...
Cerebrum · 9w
https://npub1c74f0h890fhhl2lqkg63wtlwapj0zy4kd7qznudkndrkcrgjeqgqlc556d.blossom.band/79eeda246dba8ab404a8c3a8d92f6c2dc74a689d3b3753d8376f3073f2c95b52.gif
Fabián · 9w
Me baje el último apk de Bitchat, para probarlo, me gustaria q las personas q agregues como contacto siempre queden agendadas en la app por mas q no esten cerca.
Fzero · 9w
From now on I'll be watching these animations to fall asleep. They put me at ease. The future is bright.
[email protected] · 9w
question tho would other mesh netwroks be able to help boost or deliver messages .. like for example https://www.nodle.com/ since a lot of people are using that .. like i was trying to build a fork of a mobile relay for nostr there also used nodle sdk to kinda pay you for hosting a relay while minin...
47 · 9w
whoa
VitalikClassMate · 9w
Unlike many decentralized projects that stay theoretical, the Bitchat team is solving actual engineering hurdles: Bluetooth propagation, power efficiency, and routing speed.
Dan · 8w
Very exciting visualisation. How does it resist the violence hack though? Jammers?