News for hackers. Stuff that matters.
Re:Ditto: Real-time sync for apps even without the internet by spyremeown on Thursday September 22, 2022 @03:00AM (#32935576)
>Ditto is designed for "peer-to-peer" synchronization where it can directly communicate with other devices even without an internet connection. In addition, Ditto automatically manages the complexity of using multiple network transports, like Bluetooth, P2P Wi-Fi, and Local Area Network, to find and connect to other devices and then synchronize any changes.[1]

This is cool! I have no idea what's the use-case behind it, but it is really awesome if properly implemented (which seems like a gigantic challenge).

[1] https://docs.ditto.live/

Re:Ditto: Real-time sync for apps even without the internet by mbalex99 on Thursday September 22, 2022 @09:51AM (#32938722)
Max, CoFounder of Ditto here.

Super cool to see us on HN! The use cases are for projects, products, enterprises to build collaborative apps that can sync with the internet but fall back to local P2P connections when internet connectivity fails. Furthermore we added offline first as an additional guard for some resiliency.

We help solve a class of apps like:

1. Desk-less worker apps for the enterprise: think people who use mobile apps for the vast majority of their work: pilots, flight attendants, construction, maintenance 2. Retail, inventory warehousing, point of sale systems where being able to communicate between kiosks, service tablets, and display systems quickly even if there are interruptions in service 3. Education: it’s very often parents give their kids phones without a data plan, so their school or learning apps need to be able to collaborate with other students or teachers regardless of connectivity 4. Robotics, agriculture technology, IoT - often these applications have hard requirements to communicate with other local devices without any dependency of the internet

I can keep going!

Again, So happy to see us on HN! Thank you!

Re:Ditto: Real-time sync for apps even without the internet by brodouevencode on Thursday September 22, 2022 @10:48AM (#32939556)
We are in the process of buying it for retail applications (just signed the paperwork) and so far so good. I would ask that you make the documentation a little easier to find from the home page. Engineers want things to be easy ya know :).

EDIT: is there ever a plan to open this as a spec?

Re:Ditto: Real-time sync for apps even without the internet by mbalex99 on Friday September 23, 2022 @06:39PM (#32957919)
Thanks!! We will make improvements.

Our replication system is very complex. I am not sure that even publishing our spec would get much usage because it’s so complex.

But maybe we can open source an API?

Re:Ditto: Real-time sync for apps even without the internet by m0meni on Thursday September 22, 2022 @11:31AM (#32940335)
One thing I don't fully understand is how KV stores like this fit into the overall architecture of an app. Is Ditto supposed to completely replace SQL or is there some Ditto DB <-> SQL DB syncing mechanism happening?
Re:Ditto: Real-time sync for apps even without the internet by bigfish24 on Thursday September 22, 2022 @02:14PM (#32942602)
Adam (Ditto cofounder) - Ditto can be used either as the primary datastore in the client app (we call these "Small Peers"), or alongside others local DBs (existing apps adopting Ditto tend to pick off key P2P features and run Ditto with others like Couchbase, SQLite, or Core Data - and we have built connectors to help with this). With regards to the backend, our server product, or "Big Peer" provides webhooks or a Kafka topic of all changes to pipe them into other systems, so it similarly can be a primary datastore or middleware.

All-in-all, the design of Ditto is to be flexible so users can add Ditto to their architecture as easy as possible.

Re:Ditto: Real-time sync for apps even without the internet by Rygian on Thursday September 22, 2022 @04:05AM (#32936045)
My vision is that all the current use of IT should work in this mode. Depending on a central server for synchronization should be the exception, not the norm.
Re:Ditto: Real-time sync for apps even without the internet by dont__panic on Thursday September 22, 2022 @09:24AM (#32938460)
Interestingly, most of the Ditto folks originally worked on Realm, an object database that eventually monetized into the "sync via a central server" space.

Of course, Realm was later acquired by MongoDB, and currently exists as some kind of Frankenstein's monster product in an attempt to drum up Atlas sales.

Interesting how the acquisition pushed some of the devs to create better tech, but they had to give up the original product along the way.

Re:Ditto: Real-time sync for apps even without the internet by mbalex99 on Friday September 23, 2022 @06:40PM (#32957937)
It’s just my cofounder Adam and I that came from Realm!

We’ve got Alumni from Pusher, Basho/Riak, Walmart Labs, Microsoft, to name a few

Re:Ditto: Real-time sync for apps even without the internet by wahnfrieden on Thursday September 22, 2022 @07:02AM (#32937232)
Agreed, and I expect it to set new standards for user expectations. Users are tired of slow and fragile server interactions on every click, or managing connectivity during use.
Re:Ditto: Real-time sync for apps even without the internet by jamil7 on Thursday September 22, 2022 @07:11AM (#32937298)
How would you handle granular permissions though?
Re:Ditto: Real-time sync for apps even without the internet by wahnfrieden on Thursday September 22, 2022 @08:19AM (#32937848)
Sync permission rules to clients, enforce in centralized authorities and peers once synced
Re:Ditto: Real-time sync for apps even without the internet by mbalex99 on Friday September 23, 2022 @06:41PM (#32957946)
We will be working on granular permissions as a top priority in 2023. We have a couple of ideas running around right now.
Re:Ditto: Real-time sync for apps even without the internet by michaelmior on Thursday September 22, 2022 @10:15AM (#32939059)
I'm not sure about latency since I haven't tried Ditto, but there's a class of in-person multiplayer games that would benefit from something like this. See Spaceteam[0] for an example.

[0] https://spaceteam.ca/

Re:Ditto: Real-time sync for apps even without the internet by nicksaroha on Thursday September 22, 2022 @03:27AM (#32935742)
One use-case comes to mind is messaging for activists and journalists wanting to keep things private.

How would this compare to https://briarproject.org/ ? Have you generalized their protocol for many other applications?

Re:Ditto: Real-time sync for apps even without the internet by wahnfrieden on Thursday September 22, 2022 @11:29AM (#32940277)
Another use case that comes to mind is US Air Force bomber drones having navigation and peer to peer capability through intermittent connectivity with central control

edit: turns out my guess was essentially correct! that general use case is indeed what the USAF is using Ditto for https://www.sbir.gov/node/1629457

Re:Ditto: Real-time sync for apps even without the internet by spaceywilly on Thursday September 22, 2022 @09:13AM (#32938340)
I’ve thought about building a messaging app the doesn’t depend on cell networks, it could be useful for example if you are on a snowboarding trip or mountain biking and need to communicate with a group of friends, but in a place with spotty cell service. I’ve played around with Apples P2P networking framework but it was pretty clunky, this looks like it would be much easier to use.