Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

Does this depend on proprietary server tech hosted by Firebase?


Yes, it does.

"Firepad has no server dependencies and instead relies on Firebase [hosted service] for real-time data synchronization."

So the front-end editor portion of it is open source, but the data sync between connected clients happens via Firebase.

You can find more info at the bottom of this page: http://www.firepad.io/


Thanks. Seems cool, I just wasn't sure, and phrasing like "Firepad has no server dependencies" had me picturing some advanced WebRTC-based peer syncing or something, which is pretty far-fetched but you never know these days...


Technically, the whole point of OT is to allow for "some advanced [...] peer syncing or something"; any OT peer can actually synchronize state against any other peer. The original OT applications were all peer-to-peer apps. It's very similar to git, actually: everyone is on a particular commit[1], where each commit has another commit as its parent; clients can create regular commits, and thus move apart in state-space; and then they can accept others' commits to move back together (creating a merge commit in the process.) Very decentralized.

Ever since Etherpad/Google Wave/Google Docs, though, OT has been consistently mangled into a hub-and-spoke design, where there's a server who keeps a canonical state, and the OT tie-breaking algorithm is always decided in the server's favor.

Used in this fashion, it's not much different (actually a bit higher-overhead than) just having the server arbitrarily accept and temporally-order input operations in a way it likes, and then send back a single overwriting transformation to all clients to move them from their last server-known commits to the new server-canonical commit. (In other words, what any multiplayer game's logic server does.)

[1] One major difference is that OT "commits" are referred to by their vector-clock, instead of by their SHA. Cryptographic hashes are nice, and would give OT even cooler properties if it could use them, but they're a bit too slow for something that gets regenerated with every character typed. CRCs might be fast enough, but in an actually-distributed peer-to-peer system you'll get real collisions fast.


That's exactly the whole point of Operational Transformation. It's the "algorithm" that powers Google Docs, and stores data as a sequence of transformations that can be applied ("can operate") on a previous document state to build a new one.


Do you know of any JS OT framework that supports peer to peer?


I don't know the state of the project, but while researching OT stuff for Firepad, I came across https://github.com/sveith/jinfinote. It looks like a peer-to-peer OT implementation (I think it requires a server to set up the initial session, but after that, everything could be peer-to-peer [as implemented, the server just relays messages with no processing]).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: