New Promo Wizard Of Oz 5f9b10149e065

Transpilers, Emulators, and Containers, Oh My

Oct. 29, 2020
Catching up on several interesting developments that slipped by due to volume, here’s a look at the TeaVM translator, Nvidia’s Jetson emulator, and Ubuntu’s MicroK8s container management project.

What you’ll learn

  • How TeaVM translates Java applications to Javascript.
  • How to emulate Nvidia’s Jetson.
  • Managing containers in embedded applications with MicroK8s.

I often run across interesting projects and products and occasionally dedicate an article to them, but because there are so many, I’m usually unable to do it. So, here are a few collected together that might be of interest. The first is TeaVM, a translator that takes Java byte-code applications and turns them into Javascript applications. Just the thing for developers that need to handle the back end and front end using Java.

The second is an emulator for Nvidia’s Jetson platform. It’s a handy tool for explaining how Nvidia’s AI tools work without needing Nvidia hardware.

Finally, there’s Ubuntu’s MicroK8s project. It simplifies container management under Linux, which is ideal for embedded solutions that can take advantage of containers.

TeaVM

TeaVM converts Java byte code into Javascript, allowing a Java application to run on most browsers and other platforms that support Javascript (Fig. 1). Java never made it on the desktop or browser and Javascript was the winner on the browser, so TeaVM can be very handy for a Java developer.

There are a number of reasons why one might be interested in using Java instead of Javascript directly. One scenario is a platform that utilizes Java on the backend. Java is a major factor in the cloud and servers, so for an application that spans the server and client sides—and what doesn’t these days—it’s possible to use Java source code across the solution.

Another scenario is cross-platform support such as an application that needs to run on Android or other Java clients in addition to via a web browser. Some specific tweaks may be required when supporting a number of platforms, but TeaVM would make managing this much easier since the majority of code would remain in Java and be the same across all platforms.

Java has been used in a number of embedded applications. TeaVM would be a way to bring some of that functionality to a web browser with a native, Javascript implementation.

Nvidia Jetson Emulator

The Nvidia Jetson family encompasses a range of hardware platforms starting with the new, low-cost ($59) Jetson Nano 2GB (Fig. 2). The Jetson Nano is a platform I highly recommend, but it may not always be the best bet even at its low price. In particular, many teachers and developers would like to get their feet wet using CUDA and Nvidia’s massive AI support before purchasing some hardware, especially since some of Jetson Nano’s big brothers may be a more suitable solution even though they have a higher cost.

Tea Huang’s Jetson Emulator is an interesting alternative to first checking out the hardware. It’s an open-source project that runs the same code that would run on the Jetson, allowing teachers to create projects without requiring students to have a Jetson Nano in hand.

As with any emulator, your mileage may vary, but anyone can download and try out the software. It’s not a full system emulation; rather, it emulates the inference and utilities API for image classification, object detection, and image segmentation using imageNet, detectNet, and segNet support. It’s installed as a Python package and comes pre-configured with a simulation of two virtual HDMI displays and four virtual live-cameras.

If you haven’t picked up either of the Jetson Nanos, then check out the emulator.

Ubuntu Containers

Bare-metal programming and running on an RTOS still dominates the microcontroller space. However, higher-end embedded systems often support hypervisors and lots of cores and memory. A tool that fits this higher-end space is the container. Containers provide modularity and isolation similar to what a hypervisor does, but in a more lightweight fashion.

One of the popular container management platforms is the Linux Foundation’s Kubernetes. One of the new tools to automate Kubernetes is MicroK8s. MicroK8s can be used on any platform from embedded solutions to servers in the clouds. Check out the video:

Many may be more familiar with Kubernetes and cloud containers. For example, Google runs billions of containers every week.

Though embedded Kubernetes may not be as ambitious in the number of containers needed for an application, MicroK8s is a great way to set up and manage containers running on a system-on-chip (SoC). Many embedded systems may use a combination of containers and a hypervisor, especially where mixed critical and non-critical code is running on the same SoC.

About the Author

William G. Wong | Senior Content Director - Electronic Design and Microwaves & RF

I am Editor of Electronic Design focusing on embedded, software, and systems. As Senior Content Director, I also manage Microwaves & RF and I work with a great team of editors to provide engineers, programmers, developers and technical managers with interesting and useful articles and videos on a regular basis. Check out our free newsletters to see the latest content.

You can send press releases for new products for possible coverage on the website. I am also interested in receiving contributed articles for publishing on our website. Use our template and send to me along with a signed release form. 

Check out my blog, AltEmbedded on Electronic Design, as well as his latest articles on this site that are listed below. 

You can visit my social media via these links:

I earned a Bachelor of Electrical Engineering at the Georgia Institute of Technology and a Masters in Computer Science from Rutgers University. I still do a bit of programming using everything from C and C++ to Rust and Ada/SPARK. I do a bit of PHP programming for Drupal websites. I have posted a few Drupal modules.  

I still get a hand on software and electronic hardware. Some of this can be found on our Kit Close-Up video series. You can also see me on many of our TechXchange Talk videos. I am interested in a range of projects from robotics to artificial intelligence. 

Sponsored Recommendations

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!