2

We are a company, developing an IoT multiprotocol gateway. Now we have to decide whether we are going to use Java or C++ as core language for the gateway. The gateway is running OpenWrt and offers JamVM as Java virtual machine.

We already made a little comparison between the two programming languages. C++: good performance (but not going to do complex calculations), error prone, lots of good libraries available, less familiar than Java. Java: (maybe less performance?), no errors with memory management, very familiar with.

We tend to use Java, because the development time is an issue and when all development environments are setup, in our opinion we can develop much faster in Java.

Some libraries/components we know we need to start with:

  • TCP/IP connections
  • UART communication
  • Bluetooth communication

The first questions that come up is, if it’s wise to use Java or can you see other issues that can be a big problem?

  1. Last update of JamVM to 2.0.0 was in july 2014? What do you think of the development? Is this a dead project or are updates not necessary because it’s using OpenJDK?
  2. Can we except support for JamVM? Is this software widely used or are better alternatives available?
  3. Does anyone have experience in terms of stability of JamVM?
  4. Are there any other pro’s and con’s for using JamVM?
1

The first questions that come up is, if it’s wise to use Java or can you see other issues that can be a big problem?

  • Performance: Java being slow and having higher memory requirement than C++ may end up being problematic at some point in future. I assume that the IoT gateway product you are building would need to be responsive in real-time. Picking up C++ would always be better to cater responsiveness which is one of the most important feature of an IoT gateway.

  • Support: In Embedded systems/IoT world, more companies and professionals would be using C, C++ than Java. Hence there will be more things supported in C/C++ than Java. Also for any issues you come across during development time, the chances are higher that the problems for C/C++ will get better support than Java. In some cases, you might be among first few people in the world to face certain issues, which would take significant time resulting in wiping away the benefit of faster development on Java against C++.

  • Portability: In future, if you need to port all or some part of your project to new platform then the chances are high that C/C++ code would be portable easily. Java would not be portable to many of the small systems. For example, if the same gateway product need to be ported on smaller device which would save BoM cost; or lets say you need to build some smaller non-gateway device with part of functionality then the Java may be wrong choice

  • You may use hybrid approach and use both C++ & Java with emphasis on C++

  1. Can we except support for JamVM? Is this software widely used or are better alternatives available?

Here are some alternatives for using Java on small systems: Embedded Oracle, ZeroVM, PTC Perc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.