That's a crap-ton of computer and the sysadmin that goes with it to flip a switch. I don't have a beef with programming the 'net of things in java or lua or even pascal. What I'm saying is that that's way too much computing too far down the stack. The closer we get to the GPIO pin, the less computer, expense, and electrical requirements there should be.
I'm just saying that the thing that should be hitched to the actual GPIO pin ought to look and function more like an RFID tag and less like a mini rack server.