How to make two clients using the same account seed in sync

Hi,

I have two peers using the same account seed, I expect that both of them will see the same threads, but they don’t:

  • #1 is running with Android SDK
  • #2 is running on AWS with a local daemon (Cafe.Host.Open is false)

My steps are

  1. #1 creates a private thread (type: private, sharing: not_shared)

  2. #2 is initialized by #1’s account seed

    $ mkdir -p repo/android
    $ textile init -r repo/android <account-seed>
    $ textile daemon -r repo/android
    
  3. #2 runs account sync , but will not get snapshots

    $ textile account sync
    No snapshots were found
    
  4. #2 runs thread list , but will get an empty list

    $ textile thread list
    {
        "items": []
    }
    

Thanks in advance for any suggestion!

Hey Bofu,

Thanks for the detailed question. While what you’re doing could work in theory, it is quite unlikely given the network topology. Mobile clients always run in client mode, meaning reaching them over gossippub (the snapshot search mechanism is unlikely).

The approach we take here in Textile Photos is:

  1. Mobile client registers with a remote cafe peer
  2. Mobile client pushes thread snapshots to that peer
  3. Now, other clients (mobile/desktop/server) that are initialized with the first client’s account can find snapshots via the cafe peer, which is always “on” and can more easily be found over gossippub.

Relatedly, any kind of search that happens from a cafe-registered client will likely reach a wider swath of the network, assuming the cafe has a public IP address and is always “on”. This is because the cafe will proxy the the client’s gossippub search request. So, if the other clients in the flow above were also registered with a cafe (the same one or different), you might have even more luck.

1 Like