[riot-devel] HotSpot JVM on RIOT-OS?

Zac Harvey zharvey at pobox.com
Tue Aug 11 11:58:13 CEST 2015


Thanks for that Lejos link, Kaspar, I will definitely dig into it later 
today.

You mentioned that RIOT *targets* devices that require a small 
footprint, but you didn't state that RIOT only supports devices with 
small RAM.

What's the max size/RAM that RIOT can support, or that RIOT is 
addressable for?  What would be entailed with refactoring it to handle 
larger apps?

I ask this because to me, and for many others I'm sure, the main value 
in an RTOS (as opposed to Linux) is its deadline guarantees. When I run 
Java on Linux, the whole JVM process might come to a hault for a few 
seconds while Linux flushes some stream. Or perhaps some system-level 
utility runs for a few minutes and bogs down everything on the server 
(including my Java app). So to me, the real appeal of RIOT is:

1. Its a legitimate real-time OS when hard deadlines, task execution 
guarantees, etc.; and
2. It's an OS where I can just deploy my app and I know that *nothing 
else* besides the OS is running

So to me, if RIOT-OS can technically handle JVM apps (2GB - 4GB in 
size), then why not try to get a JVM like HotSpot to run on it? And if 
for some reason it can't handle apps that size (e.g. perhaps the largest 
integer it can handle is only 65,536, etc.), then I'm wondering what 
level of refactoring would be required to enable it to handle 
beefier/server-like apps.

Traditionally, the counter-argument here is: "Well then just write your 
apps in C."  However, in 2015, all hobbyists, commercial and open source 
organizations have an enormous amount of time & effort ($$$) invested in 
existing software systems, which may be Java-based, Python-based, 
Ruby-based, Node-based, etc.

I can't speak for anyone else, but I would argue that the ability to run 
a JVM app on a real-time OS is going to be of *enormous* utility, 
especially in this modern "Internet of Things" era we're careening 
towards.  It might also spawn up a whole subculture of getting other 
systems (again, Python, Ruby, etc.) running in an embedded context.  I'm 
just sayin'...!

Thoughts? Criticisms? Hate mail?

On 8/11/15 5:35 AM, Kaspar Schleiser wrote:
> Hey,
>
> On 08/11/15 11:13, Zac Harvey wrote:
>> Has anyone here ever heard of someone trying to run a JVM
>> (HotSpot/OpenJDK) on a RIOT-OS embedded device?
> RIOT targets devices that don't have enough RAM to run Linux.
> The official Java embedded VMs are way too fat for those devices, as
> they're just stripped-down versions of the original POSIX-based codebase.
>
> There are some specialized VMs for constrained devices which are
> probably portable to RIOT. Maybe take a look how the Lego guys did it [1].
>
> Kaspar
>
> [1] http://www.lejos.org/
> _______________________________________________
> devel mailing list
> devel at riot-os.org
> https://lists.riot-os.org/mailman/listinfo/devel



More information about the devel mailing list