KEMBAR78
Having fun with Raspberry and Apache projects | PDF
Having fun with Raspberry(s)
and Apache projects
Jean-Frederic Clere, Manager, Red Hat
●
Who I am
●
How does it started
●
OK now I have my demo for HTTP/2 what next.
●
Get Astro Hat and have fun.
●
Get another Hat and have another fun.
●
More serious people using Industrino
●
Questions
AGENDA
Jean-Frederic Clere
Red Hat
Years writing JAVA code and server software
Tomcat committer since 2001
Doing OpenSource since 1999
Cyclist/Runner etc
Lived 15 years in Spain (Barcelona)
Now in Neuchâtel (CH)
Who I am I?
Trying to make a demo :D
● first localhost (failed)
● remote server (failed)
● try local + configurable:
– Need a very small hardware:
– Need real OS (no Arduino)
– Fast
– With WIFI
How does it start?
● Hardware: sd card / wifi access point
● Most distributions requires for installation:
– Screen
– Keyboard
– Solution:
● mount root
● remove autostart (tricky SystemD)
● add ssh keys
● Next yum install java/openssl/gcc etc…
● Done in a few hours.
Raspberry PI3 / basics
● Fedora 24
● Drivers from https://github.com/raspberrypi/firmware
● wifi access point from (non free)
https://raw.githubusercontent.com/RPi-Distro/firmware-nonfre
e/master/
● dhcp (server)
● bind (name server to make captive portal)
● Java Openjdk version "1.8.0"
● Tomcat apache-tomcat-8.5.6 (normal well on 80)
● http://10.0.0.201/
Raspberry PI3 / basics
● HTTP/2
● Tomcat-8.5.6 (bin tar)
● Tomcat-native-1.2.10 (sources compiled on the Raspberry)
● Openssl 1.0.2j (from Fedora 24)
● http://10.0.0.239:8080/ (normal tomcat)
● http://10.0.0.239:8080/http2.html
● https://10.0.0.239:8443/http2.html https normal
● https://10.0.0.239:8002/http2.html https HTTP/2
● So play with latency:
– tc qdisc add dev eth0 delay 85ms 20ms (to get something that isn't localhost).
– tc qdisc del dev eth0 root (remove it).
– tc qdisc add dev eth0 root netem delay 185ms 120ms
Raspberry PI3 / demo
● Hats…
● lot experimentation boxes
● Use Astro Hat
● Sensors:
– Magnetometer
– Humidity sensor
– Temperature
– Accelerometer
– Joystick
– And a DISPLAY!!!
Let’s start the fun!
● Servlet
● Frame Buffer
● HTLM5 scripts
● Read the display / write / reset etc
● Note the following:
– Openjdk no JIT compiler (slow).
– Openjdk (arm version: memory map file ~ broken)
– Or frame buffer problem.
● Use RandomAccessFile
First Tomcat fun
● http://10.0.0.239:8080/demo-1.0-SNAPSHOT/FrameBuffer
First Fun demo
● Broker easy to collect information
● The Raspberry library are in Python
● Easy to make STOMP (on the PI)
– Topic to send temperature in the example.
– Queue on the PI to display a message
● Websocket STOMP on the client
– html page with java script
– jquery
– stomp
ActiveMQ fun
● First the client (java script): http://10.0.0.201/client.html
● bin/activemq console
● http://10.0.0.201:8161/admin/ (the activeMQ console
admin/admin)
● The object Raspberry have STOMP python application
running. (autostarted):
● root@localhost ROOT]# ps -ef | grep pytho
● root 371 1 0 17:28 ? 00:00:07 /usr/bin/python3 -Es
/usr/sbin/firewalld --nofork --nopid
● root 2007 1 1 18:09 ? 00:00:01 /usr/bin/python
/root/tomcatPI/python/sendtemprecvmess.py
● root 2047 745 0 18:11 pts/0 00:00:00 grep --color=auto pytho
ActiveMQ demo
● Based on Arduino but for electricians.
● Powered with 24 volts
● No OS programmed via USB
● Industrial format
● To control pumps, heaters etc
● Mesures 2 tempatures
● Displays stuff via a web page.
● Partially OpenSource /OpenHardware :-(
Serious stuff with Industruino
● Internet of Things (IoT).
● http://mynewt.apache.org/
● https://edgent.apache.org/
● Problems with hardware:
– Partially OpenSource /OpenHardware :-(
– Hard to explain to the players the Apache Way
Apache hardware?
● PI 3 + memory + power = 2 lunchs
● http://mynewt.apache.org/
● https://edgent.apache.org/
● Blog: http://jfclere.blogspot.com.es/
● Github: https://github.com/jfclere/tomcatPI
● Mail: jfclere@gmail.com
Do it your self?
●
THANK YOU!!!
Questions

Having fun with Raspberry and Apache projects

  • 1.
    Having fun withRaspberry(s) and Apache projects Jean-Frederic Clere, Manager, Red Hat
  • 2.
    ● Who I am ● Howdoes it started ● OK now I have my demo for HTTP/2 what next. ● Get Astro Hat and have fun. ● Get another Hat and have another fun. ● More serious people using Industrino ● Questions AGENDA
  • 3.
    Jean-Frederic Clere Red Hat Yearswriting JAVA code and server software Tomcat committer since 2001 Doing OpenSource since 1999 Cyclist/Runner etc Lived 15 years in Spain (Barcelona) Now in Neuchâtel (CH) Who I am I?
  • 4.
    Trying to makea demo :D ● first localhost (failed) ● remote server (failed) ● try local + configurable: – Need a very small hardware: – Need real OS (no Arduino) – Fast – With WIFI How does it start?
  • 5.
    ● Hardware: sdcard / wifi access point ● Most distributions requires for installation: – Screen – Keyboard – Solution: ● mount root ● remove autostart (tricky SystemD) ● add ssh keys ● Next yum install java/openssl/gcc etc… ● Done in a few hours. Raspberry PI3 / basics
  • 6.
    ● Fedora 24 ●Drivers from https://github.com/raspberrypi/firmware ● wifi access point from (non free) https://raw.githubusercontent.com/RPi-Distro/firmware-nonfre e/master/ ● dhcp (server) ● bind (name server to make captive portal) ● Java Openjdk version "1.8.0" ● Tomcat apache-tomcat-8.5.6 (normal well on 80) ● http://10.0.0.201/ Raspberry PI3 / basics
  • 7.
    ● HTTP/2 ● Tomcat-8.5.6(bin tar) ● Tomcat-native-1.2.10 (sources compiled on the Raspberry) ● Openssl 1.0.2j (from Fedora 24) ● http://10.0.0.239:8080/ (normal tomcat) ● http://10.0.0.239:8080/http2.html ● https://10.0.0.239:8443/http2.html https normal ● https://10.0.0.239:8002/http2.html https HTTP/2 ● So play with latency: – tc qdisc add dev eth0 delay 85ms 20ms (to get something that isn't localhost). – tc qdisc del dev eth0 root (remove it). – tc qdisc add dev eth0 root netem delay 185ms 120ms Raspberry PI3 / demo
  • 8.
    ● Hats… ● lotexperimentation boxes ● Use Astro Hat ● Sensors: – Magnetometer – Humidity sensor – Temperature – Accelerometer – Joystick – And a DISPLAY!!! Let’s start the fun!
  • 9.
    ● Servlet ● FrameBuffer ● HTLM5 scripts ● Read the display / write / reset etc ● Note the following: – Openjdk no JIT compiler (slow). – Openjdk (arm version: memory map file ~ broken) – Or frame buffer problem. ● Use RandomAccessFile First Tomcat fun
  • 10.
  • 11.
    ● Broker easyto collect information ● The Raspberry library are in Python ● Easy to make STOMP (on the PI) – Topic to send temperature in the example. – Queue on the PI to display a message ● Websocket STOMP on the client – html page with java script – jquery – stomp ActiveMQ fun
  • 12.
    ● First theclient (java script): http://10.0.0.201/client.html ● bin/activemq console ● http://10.0.0.201:8161/admin/ (the activeMQ console admin/admin) ● The object Raspberry have STOMP python application running. (autostarted): ● root@localhost ROOT]# ps -ef | grep pytho ● root 371 1 0 17:28 ? 00:00:07 /usr/bin/python3 -Es /usr/sbin/firewalld --nofork --nopid ● root 2007 1 1 18:09 ? 00:00:01 /usr/bin/python /root/tomcatPI/python/sendtemprecvmess.py ● root 2047 745 0 18:11 pts/0 00:00:00 grep --color=auto pytho ActiveMQ demo
  • 13.
    ● Based onArduino but for electricians. ● Powered with 24 volts ● No OS programmed via USB ● Industrial format ● To control pumps, heaters etc ● Mesures 2 tempatures ● Displays stuff via a web page. ● Partially OpenSource /OpenHardware :-( Serious stuff with Industruino
  • 14.
    ● Internet ofThings (IoT). ● http://mynewt.apache.org/ ● https://edgent.apache.org/ ● Problems with hardware: – Partially OpenSource /OpenHardware :-( – Hard to explain to the players the Apache Way Apache hardware?
  • 15.
    ● PI 3+ memory + power = 2 lunchs ● http://mynewt.apache.org/ ● https://edgent.apache.org/ ● Blog: http://jfclere.blogspot.com.es/ ● Github: https://github.com/jfclere/tomcatPI ● Mail: jfclere@gmail.com Do it your self?
  • 16.