Syncing a new node with an existing model index

Assuming I have an existing node which is indexing a model.

It is storing a set of documents belonging to that model and I am able to query them without issue.

If I deploy a new second node, is it possible for it to sync all of the existing documents?

I have tried making the second node index the same composite by copying & pasting the composite JSON file to the second node and running the deploy command

However just doing this did not seem to sync historical documents as I am still getting an empty list when querying the graphql interface.

Not yet! Currently a node will only sync documents that are created or updated while it is online. However! Syncing historical data is something we are actively working on right now. It is one of the main big features we hope to deliver in the next couple months, in advance of enabling ComposeDB to work on Ceramic mainnet. So stay tuned!

Hi, i am about to test this. I have two docker networks with each ceramic and ceramic-ipfs nodes. Currently the ‘non historical’ / new data do not seem to sync. This may very well be due to my docker setup. For example i am not exposing the 7007 ports to each other.

How does syncing take place? My knowledge of ceramic is in its infant stages.

Do the ceramic nodes exchange this type of info over their 7007 ports?
Or do individual ceramic nodes use the anchor service to find new stream/tile/document ids (sorry no idea ;)) and then look them up on their IPFS nodes? i.e. only the IPFS ports should be open to the internet.

Thanks, Joera

FYI latter hypothesis seems to work … (opening all ipfs ports to each other / outside)

I have a frontend that connects to one of three composedb providers … and they do sync.

One of the three does give an error though … it seems to return null for display name (see below) … while the other providers do know the name.

"{“errors”:[{“message”:“Cannot return null for non-nullable field SimpleProfile.displayName.”,“locations”:[{“line”:1,“column”:48}],“path”:[“simpleProfileIndex”,“edges”,1,“node”,“displayName”]}],“data”:{“simpleProfileIndex”:{“edges”:[{“node”:{“displayName”:"Marillin Gemalphin “,“owner”:{“id”:“did:key:z6MkhAEnwpwvRjuJvXnB7Y6vVHqVrWo1eBJNmS5AQ3b4yoD4”}}},{“node”:null}]}}}”

How does that happen?

P.S. i am almost done building a demo with a frontend that uses fluence to create decentralized access (like a distributed marketplace) to composedb. Browser only uses fluence. I have three fluence peers paired with ceramic nodes …

The IPFS nodes will need their swarm ports fully accessible. The IPFS node’s HTTP port only needs to be exposed to the Ceramic node. The Ceramic node’s HTTP port will need to be exposed to anyone interacting with that node, so usually this means leaving the HTTP port fully open to the internet so any user’s web browser can connect.

As to the error you’re seeing, it looks like your application frontend is trying to write null for a field to a document who’s Model schema expects it to be non-null. You’ll have to check your application code and figure out why it’s passing null in for that field.

Thank you! Most helpful!

FYI : i mentioned the error because it was returned by only one of the three nodes. the other two returning the correct entry. That must be an error in syncing. I have not experienced any more problems today.