Applets for the Internet of Things