storacha/w3name

Use POST endpoint just after creation or update of a record

Closed this issue · 1 comments

ipns-publisher rely on the WSS endpoint to propagate records after creation or update.

There are some problems with the current implementation:

  • There are frequent disconnections, resulting in ipns-publisher stopping listening for updates for 1 minute. If a user creates a record in this window, they will have to wait 24 hours before the broadcast.
[ipns-publisher] [2022-08-05 15:36:49] 2022-08-05T15:36:49.272Z ipns-pub Error: websocket connection closed: Connection dropped by remote peer.
[ipns-publisher] [2022-08-05 15:36:49] 2022-08-05T15:36:49.272Z ipns-pub 💤 Sleeping before retry
  • We can't surface any errors on the client. If we used the POST endpoint, we would be able to surface a server error.

After speaking with @alanshaw, we need to preserve broadcasting to the websocket.
The plan is to now

  1. Update w3name to POST to ipns-publisher upon record creation/updation (as well as still broadcasting to the websocket).
  2. Once deployed, remove the web socket connection in ipns-publisher