In face of the high number of different hardware platforms we need to program with Internet-of-Things (IoT), virtual machines (VMs) pose as a promising technology to allow a program once, deploy everywhere strategy. Unfortunately, existing VMs are either too heavy or use a stripped-down version to work on resource-constrained IoT devices. We present COISA, a compact virtual platform that relies on OpenISA, an instruction set architecture (ISA) that strives for easy emulation, to allow a single program to be deployed on many platforms, including tiny microcontrollers. By exploring the benefits of using a concrete ISA as our VM language, our experimental results indicate that COISA is easily portable and is capable of running unmodified guest applications in highly heterogeneous host platforms, including one with only 2 kB of RAM. For time-critical IoT applications on constrained platforms where extracting performance is of paramount importance, we propose the use of cloud-assisted translations, which employ static binary translation to deliver a binary fully converted to the native ISA used in the IoT device.HANDLING IOT PLATFORM HETEROGENEITY WITH COISA Our previous experience with ISA emulation and design [9,33,34] have shown us that a clean ISA, similar to MIPS, allows us to build a high-performance emulator capable of emulating guest