Hacker News new | past | comments | ask | show | jobs | submit login

If this supported multi-user synchronous editing Google-docs style I'd be thrilled.



Sorry that's not likely. I'm a single developer, not ready to run a server. More likely (though still have many more basic features on roadmap) is automatic merging support when a Bike file is stored on something like Dropbox.

In fact that would be a pretty great service (for someone else to develop). "Dropbox", but for strutted data (xml, json, whatever) that knows how to merge trees and make use if unique ids. Maybe it wouldn't work, each merge situation needs a special case solution. But for Bike files at least I think it might work pretty well.


I think you could encode a “shelf” last-write-wins CRDT into your HTML using data attributes without exploding your file size. You would need to add a data-version attribute, and if you want to support hand-editing or editing by programs that don’t understand the CRDT, a CRC32 or other parity as data-parity so your loader can tell when a user might have edited a row without updating data-version.

Shelf is really simple - the JS implementation is tiny (https://github.com/dglittle/shelf) and a walkthrough of the algorithm here is a quick read: https://bartoszsypytkowski.com/shelf-crdt/amp/

It wouldn’t handle character level sync - but would let you merge documents at a rows/items/blocks level.


Thanks for the tip, I'll keep a reference to this. I will say that it's still unlikely that I tackle this myself anytime soon. I'm a single programmer, and not all that fast at that. Lots of more basic stuff to do on Bike, and iOS version... going to keep me busy for a while.


Simplenote survived the Moby Dick workout. It lags a little after paste, and hangs momentarily on redo. It may work better with more structured data. (I used the markdown file in the webapp; didn't test native/mobile versions.)

So https://www.simperium.com/overview/ might be a low-effort option to add syncing without managing your own server.

> - Data transparently moves across mobile, web, and desktop versions of your app

> - Your users can read and write data even when they're offline

> - Multiple users can collaborate with the same data at the same time

> Simperium persists your data for you in buckets... Every Simperium object is JSON data that is stored in a bucket.

> Simperium does some basic conflict resolution for you automatically... When two edits are made for the same field though, Simperium supports automatic resolution for strings (currently) and will merge the two edits together.


Did you have a look at [y-js](https://github.com/yjs/yjs)? They claim to be suitable for p2p collaborative editing and they have bindings for other languages as well.


Early in Bike's development I did try a few solutions, but I want Bike to work on somewhat big files. See (https://www.hogbaysoftware.com/posts/moby-dick-workout/). Anytime I loaded such a file into a sync solution everything blew up.


YJS is one of the more performant ones. Wonder how it would do with your example file.


Which other languages?




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: