Does the imp automatically wake up to receive HTTP requests when sleeping (imp.sleep)? Or do I need to wake up once in awhile to receive them? My app doesn’t do anything until receiving an HTTP request.
A request that comes in during an imp.sleep() will be queued until the imp is next idle. A request that comes in during an imp.wakeup() wait is processed straightaway (because the imp counts as idle during that time). A request that comes in during a server.sleepuntil/sleepfor wait is dropped.
…when agents are available, your incoming requests will be delivered there. The agent can then hold requests to forward to an imp that’s in server.sleepuntil/sleepfor when it next wakes up.
Hugo - can you expand on your comment? Is this future functionality?
I want to implement the case where the imp deep sleeps for 5 minutes, then wakes up and receives the latest “http in”
As I said, you need agents for this - they are in closed beta right now but will be launching soon; essentially they are squirrel VMs that run within our servers.
The agent receives the HTTP request and stores the data, then sends it to the imp when it wakes up.