Elektrine lite

← Feed

@aris@infosec.exchange

Post #1779290

2026-04-21 14:49 UTC

Sometimes I read about astronomy professionals implementing network RPC protocols and I just cringe... https://ascom-standards.org/AlpacaDeveloper/Async.htm It's en vogue to use an asynchronous operation by "spinning off a thread" in which you call the method, then repeatedly poll the completion property until it becomes "complete". Meanwhile in your main logic flow you do other things that don't require the operation to have completed. Finally you come back and look when you need to know if it has completed before you can move on. Well all that time your spun-off thread is mindlessly polling for completion before you even care! It's bad form to create traffic for the device and the net with useless polling for async completion. Would it make more sense to kick off the operation with the method call, then go on about your other business, then when you need it to be done, check to see if it has completed right there? If not, now you're stuck and can't press on anyway, so loop right there waiting for it to complete. You may end up never waiting at all. Their version of "asynchronous" is a cheap version of synchronous start and end of operations + polling + guilt-tripping devs using polling as a strategy because they designed an "asynchronous" protocol that doesn't even have callbacks. JSON over websocket would do better

Replies (0)

No replies.