Assassin
Assassin is a decentralized database that uses background threads to kill slow JavaScript.
Install / Use
/learn @genderev/AssassinREADME
You can copy and paste:
<pre> cd /path/to/where_you_want_this_to_be_stored git clone https://github.com/genderev/assassin_server.git cd assassin_server flyctl init flyctl deploy </pre>You can also deploy your server to <a href="https://buddy.works">buddy.works</a> or <a href="https://begin.com/">begin.com</a> on your own, if you want.
<h3 id="install-browser"> Get Started: Browser </h3>You can save this <a href="https://raw.githubusercontent.com/genderev/assassin/master/dist/assassin.js">file</a> or you can clone this repo and use <code>assassin.js</code> in the <code>dist</code> folder. <code>assassin.js</code> goes inside the web worker that the main thread posts messages to. You can see an example of how to do this in the <a href="https://github.com/genderev/assassin/tree/master/demo">source code</a> for the <a href="https://assassin-demo.surge.sh/">demo</a>.
<h3 id="arch">Architecture:</h3> <ul> <li><strong>Data Model</strong>: Assassin is a key/value store that supports mapping a key to its corresponding value. </li> <li><strong> System Architecture</strong>: The DAT protocol distributes and hosts data between many computers, so there is no one location where data is stored. Assassin relies on the the DAT protocol for data persistence. The metadata of the key-value pairs are stored in a distributed <a href="https://en.wikipedia.org/wiki/Trie">trie</a> structure.</li> <li><strong>Isolation Levels</strong>: The isolation level is determined by the end user of the database. Assassin is designed to have a low <a href="https://en.wikipedia.org/wiki/Isolation_(database_systems)">isolation level</a>.</li> <li><strong>Storage Model</strong>: Assassin sends data to the server, which then stores the metadata in the distributed file system <a href="https://github.com/hypercore-protocol/hyperdrive">Hyperdrive,</a> which is built on the DAT protocol. The data itself is distributed and hosted between multiple peers.</li> </ul> <h3 id="name">Why is it called Assassin?</h3><ul> <li>My website currently uses the <a href="https://gun.eco/">Gun</a> database.</li> <li> Gun has many features I like and the founder is pretty nice. </li><li> <strong>Gun stopped working for me.</strong></li> <li>Gun's storage adapter <a href="https://gun.eco/docs/RAD">RAD</a> relies on IndexedDB, which is <strong>disabled in private browsing</strong>. </li><li>Gun syncs data peer to peer through WebRTC, which <strong>doesn't function in web workers.</strong></li> <li>Assassin is sort of (seriously, very little) like Gun but for web workers.</li><li> <strong>Gun + worker = Assassin</strong> 💥 </li></ul> <h4 id="demo"> Demo 🚀 </h4> <p><a href="https://assassin-demo.surge.sh">https://assassin-demo.surge.sh</a></p> <h4 id="built-with"> Built with 🔧 </h4> <ul> <li> <a href="https://github.com/hypercore-protocol/hyperdrive">Hyperdrive</a> - Thanks for the abstraction layer on top of DAT!</li> <li>HTML - For creating the web demo</li> <li>CSS - For styling the web demo</li> <li>JavaScript - For logic</li> <li> <a href="https://nodejs.org">Node.js</a> - To serve the logic</li> </ul> <h3 id="connect">Make sure to share your opinion in:</h3> <ul> <li>the Assassin <a href="https://github.com/genderev/assassin/pulls">GitHub pull requests</a> </li> <li>the <a href="https://gitter.im/assassindb/community">Gitter server</a> </li> </ul> <p>And if you really want to help make Assassin better, make a <a href="https://github.com/genderev/assassin/pulls">pull request</a>! I really want to Assassin to have these things, so make a <a href="https://github.com/genderev/assassin/pulls">pull request</a> showing how to add them:</p> <ul> <li> User authentication </li> </ul> <p><strong>Assassin is open source, and always will be.</strong></p> <h3> <strong>Support me on:</strong> </h3> <ul> <li><strong><a href="https://ko-fi.com/assassindb">Ko-Fi</a></strong></li> </ul> <p>Star the repo, <a href="https://twitter.com/intent/tweet?url=https%3A%2F%2Fgithub.com%2Fgenderev%2Fassassin&text=Assassin%20works%20to%20kill%20slow%20database%20transactions.">Tweet</a>, and share among your friends, teams and contacts! </p> </article>