Particle cloud function calling / retrying / timeout semantics

I have some generic questions about how the Particle Cloud server works and how it deals with retries / timeouts when you try to do a function call:

  • Does the Particle cloud actually use the spark-server and/or spark-protocol libs? Can I use those for reference for how the Particle REST API internally works? (So that I can answer questions like these without bugging yall :wink:
  • What are the timeout/retry semantics of remotely calling a Particle function (e.g. particle call device ...)? Does it just fire off a single CoAP request to the last known device IP and wait for a response within that timeout? Or does it retry a few times (I’m guessing if this were the case there’d need to be some kind of idempotent key to prevent calling a function twice - or perhaps there’s some kind of sequence number in CoAP that prevents this)?
1 Like

Followup observation: my best guess is that a function call is a Confirmable CoAP message, and the Particle cloud server handles retransmission of that message if the device doesn’t respond, and the token/sequence that the Particle server maintains is used by the client to intelligently ignore double-sends…

Is this kind of QoS stuff documented anywhere?

Ping @jeiden