abhi143
Posts: 133
Joined: Mon Oct 30, 2017 4:17 am

Which Java server is the best for raspberry Pi 3

Mon Jan 08, 2018 6:02 pm

I just want to clear some doubts. I think if I want to control gpio of raspberry using web browser then I need following things

1. Pi4j library
2. Netbeans java IDE
3. Java server

I am sure these three are enough to control gpio of Pi. I have installed rasbain jesse on raspberry Pi3.

There are some option available, Which server do you recommend for raspberry Pi 3?

mattlewis
Posts: 113
Joined: Sat Jan 12, 2013 3:05 pm
Location: UK
Contact: Website

Re: Which Java server is the best for raspberry Pi 3

Mon Jan 08, 2018 9:22 pm

There’s a huge amount of choice, I wrote a simple web app in diozero as an experiment: https://github.com/mattjlewis/diozero/t ... ero-webapp. All depends on what technologies you are comfortable with & what you are actually trying to achieve. Other options include:
MQTT. There are JavaScript libraries you can use in the browser plus I’ve also an experimental MQTT destination: https://github.com/mattjlewis/diozero/t ... erver/mqtt (I need to work on this a bit more for security plus allow addressing individual devices).
REST. Supported in diozero but I need to understand the best way to send asynchronous messages back without polling, maybe something like Server Sent Events.
You could of course implement something similar yourself using pi4j.

Current trends seem to be to write the web front end using HTML5 / JavaScript frameworks; see Angular, Vue.js or Ember.js.

Matt
http://www.diozero.com/

User avatar
clicky
Posts: 434
Joined: Thu Oct 25, 2012 7:34 am

Re: Which Java server is the best for raspberry Pi 3

Tue Jan 09, 2018 8:59 am

If your question is regarding '3.' - then you can use built in HTTP server in Oracle's JDK: https://docs.oracle.com/javase/8/docs/j ... mmary.html

If you want something more powerful/closer to industrial standards then go with Spring Bootstrap .

More lightweight and technology that has been around for couple of decades is to build simple war (maybe using Jersey for the REST) and deploy it on Tomcat or even better Jetty...

If you like something more modern and new IO funky stuff - try Vertx!

bullen
Posts: 316
Joined: Sun Apr 28, 2013 2:52 pm

Re: Which Java server is the best for raspberry Pi 3

Fri Jan 19, 2018 11:45 pm

Or why not try https://github.com/tinspin/rupy; it's the fastest, most robust and agile.
https://github.com/tinspin/rupy - A tiny Java async HTTP application server.

tutorials2learnclub
Posts: 1
Joined: Thu Jan 25, 2018 1:14 pm
Contact: Website

Re: Which Java server is the best for raspberry Pi 3

Thu Jan 25, 2018 1:17 pm

I will start with JavaFX and Pi3
https://tutorialstolearn.com

Return to “Java”