user4794598
user4794598

Reputation:

Java Raspberry PI Help is Vaadin the best way?

I looking to make a web app that has a login page and has 1 button and a image of a LED that will flash.

I started to do this in Vaadin and latest version is so big (32MB in Vaadin files) it take a long time on start on Raspberry PI.

Is there a better way?

Then the button is pressed in software or triggers from the hardware, the hardware could take 1min or more before doing it stuff and flasher LED.

  1. Flash good
  2. Flash's poor
  3. Flash's bad

    etc

Upvotes: 1

Views: 682

Answers (2)

Basil Bourque
Basil Bourque

Reputation: 338211

The accepted Answer by miw is correct. I'll add a bit of explanation.

Vaadin is a great tool for being able to quickly write web apps using only Java programming but rendered using regular web browser clients (no applets).

The Vaadin app actually runs on the server-side. The user-interface is rendered remotely on the client-side (web browser) but the app lives on the server and reactions to the user’s actions are executed on the server.

Image of client-side versus server-side nature of Vaadin. Published by IBM DeveloperWorks.

This server-side execution means a Vaadin web app often needs much memory, enough to maintain the current state and enable the user action-reaction executions for each user, all in the same JVM on your server. Multiplying the users means multiplying the demands upon memory and upon the CPU of the server.

Between both a JVM (Java Virtual Machine) and Vaadin, you would be placing much demands on a resource-limited computer such as Raspberry Pi. While I've not tried it, you should be able to run a relatively simple app with relatively few users. The latest Pi models with more memory (a gig) should work much better. Some competitors to the Pi come with even more memory and so might work better for Vaadin.

So, no, running a Vaadin app on a Raspberry Pi is probably not the most optimal scenario. But it would be fun to try. ;-)

Upvotes: 0

miw
miw

Reputation: 764

I assume you want to run the server portion (i.e. the application server) on the Pi? In that case, Java is not a good choice (though possible), and Vaadin certainly doesn't help as it is a server-side application framework.

Why not use a client-side solution for the UI (i.e. using Angular JS) and a python-based solution for the server-side, based on SimpleHTTPServer (https://docs.python.org/2/library/simplehttpserver.html)?

Upvotes: 2

Related Questions