Nit, on the API

server.sleepfor(Float)
server.sleepuntil(Integer, Integer)

seem imp oriented, not sever (although as a side effect, server communications will be suspended). Should these be methods under the imp class? Deprecate them and move them over?

IMHO, they are different enough from imp.sleep in their deep sleep that I might have called them server.deepSleep() (well, imp.deepSleep() and imp.deepSleepUntil()) and also so as not to have name clashed with imp.sleep(), which is closer to what a sleep might be.

They’re called server.xxx because they tell the server that you’re going away, and for how long (so it can work out if you’ve missed a check-in). The server-side imp code coming soon will get notified when your imp goes to sleep.

imp.sleep is totally local.

ahh, ok, that explains a bit more. So I take it then that the server side vimps(?) can then stop pumping out data to your imp during that time and you can (re)start the server consumer type nodes on the way back up.

We’re still working out whether we call them vimps or not (virtual imps) :slight_smile:

Yes, they can queue messages for the imp during that time, and also let external services know that the imp has gone to sleep… the vimps also will be notified if the connection appears to have died to an imp, as the server polls periodically to check connections are up.