SlideShare a Scribd company logo
1 of 41
Panche Chavkovski
2018-02-06 / Jfokus
The SkopjePulse.mk case
Gluing the IoT world with Java and
LoRaWAN
Who am I?
2
Senior Software Engineer @ netcetera
jug.mk Leader
Codefu.mk administrator
Hardware & IoT enthusiast
TTN SK Initiator
http://pance.mk/ and @hsilomedus
Panche Chavkovski
3
SkopjePulse
 extremeairpollution
 Excessive urban noise
 Flash floods
No clear means for improvement
 Leverage technology
 Crowd-sourced sensor network
 Data analysis and availability
 Warnings
 Clearer insights
 Data-driven basis for action
https://skopjepulse.mk/faq
SolutionProblems
4
System overview
Analytics
Mobile
apps
Data Storage
LoRaWAN
Devices
Data Fetching
Front-end &
API
Warnings
5
!
LoRaWAN
6
LoRa & LoRaWAN
 Based on FSK & CSS, multiple channels
 Low Power
 Low Cost
 Long range
 Free ISM bands: 433, 868, 915 MHz
 Proprietary by Semtech
 MAC layer on top of LoRa
 IoT communication standard
 Standardized stack
 Driven by LoRa Alliance
Long Range Wide Area NetworkLong Range
7
Fully bi-directional
End-to-end security
Easy commisioning
Built-in positioning
Network scalability
Features
8
Limitations
Low speed (default BW)
 SF12: 250bps with the farthest distance and the longest air-time
 SF7: 5470bps with the shortest distance and the shortest air-time
Small package sizes: ~1-20bytes
Less frequent
 2-200 uplinks per day
 1-10 downlinks per day
9
LoRaWAN architecture
10
End nodes Gateway / concentrator Network server(s) Application server(s)
LoRa RF
LoRaWAN
TCP/IP SSL
LoRaWAN
TCP/IP SSL
Secure payload
AES secured payload
LoRaWAN devices
Different classes
 Class A, rare async devices (current): one uplink with two downlink windows
 Class B, always on, timed: beacon downlink windows
 Class C, always on, always listening.
Network sign on:
 Over The Air Authorization (OTAA): App EUI and Key
 Authorization By Personalization (ABP): App / Network keys and Device address
11
TheThingsNetwork
12
Global, crowdsourced Internet Of Things data network
 Community driven with local initiators and teams
 Provided network and back-end
 Free for fair use
 Can be elevated to SLA (private – public partnership)
 Multiple integration options
 LoRaWAN as base technology
https://www.thethingsnetwork.org/
How to use TTN
https://console.thethingsnetwork.org/
 Applications
 Devices
 Keys, UIDs, Credentials
 MQTT
 HTTP
 Data storage
 Amazon AWS
 Cayenne
 EVRYTHNG
IntegrationsRegistration
13
Devices
14
Microchip RN2483 (LoRaWAN stack)
Arduino (MCU)
RFM95W (LoRa transceiver)
El. Design & PCB CAD Software
The start up kit
15
KiCAD usage
16
Scheme design
PCB design
3D render and gerbers
Assembly
17
PCB fabrication
Solder and connect
3D printed enclosure
Make it work
 Arduino or other embedded code
 Restricted environment
– 32KBflash
– 2KBRAM
– 16MHzCPU
 Perpetual non-observed execution
 Select and inspect used sensors
 Test and / or calibrate
 Check for factory defects
 Plan for hardware wear-out and lifespan
 Don’t assume anything
BewareCode
18
System design
19
Rules to go by
 Data transceiver
 Data Store
 Web and API
 Analytics & processing
 Robustness
 Scaling
 Fallbacks
 Data sanity
Aim for and produceDecouple
20
Our approach
SpringBoot framework
 Self contained web server / application
 Modular
 Starter packs for needed spring pieces
 Less configuration, more conventions
 Light(er)weight
 Container and orchestrator friendly (Cloud native)
21
Data fetching
22
Communication first!
(almost) No overhead
 Use binary protocols if possible
 Always on connection
– reconnect fast
– plan for fallback
React first, store later!
Get closer to the data source.
23
Our approach
TheThingsNetwork MQTT Integration
Spring Boot + Eclipse Paho client + Gson
 @Component client implementing MqttCallback
 Connect in @PostConstruct
 @Scheduled(fixedrate = …) watchdog @Component
Details on MQTT URL, credentials and message formats:
https://www.thethingsnetwork.org/docs/applications/mqtt/api.html
24
Data storage
25
IoT data
IoT data is almost always impartial and time-series based
Use data store that is designed for sorted time-series
 Utilize recent data caches or TTLs
 Don’t hold on redundancies
 Always just append data
 Never aggregate, but process and store
 Design to live with eventual consistency
26
Our approach
Cassandra DB 3.7
Spring Boot + Cassandra Driver Core + Extras
 Cassandra Cluster wrapped in @Service
 InstantCodec for java.time interoperability
 QueryBuilder
 No data filtering.
* spring-data-cassandra seemed like a poor choice.
27
Analytics
28
Averaging data
 A lot of (impartial) data
 Observed system load
 Possible downtime
 Retroactivity
 Side-running SpringBoot microservice
 Runs a few times a day
 Checks first
 Calculates last two days, week and month
 Uses intermediary data
 Uses simple heuristic
Our approachSituation
29
Warnings
30
!
Early warning system
Keep a track on what’s happening
 Periodically fetch the recent data
 Analyze, produce and save current state
 Notify if the state has changed significantly
 Don’t spam
 Periodically cleanup
Our approach: SpringBoot + SpringSocial + Firebase
31
Front-end & API
32
Provide and visualize the data
Interactive cockpit and data
explorers
 D3js client side visualizations
 Leaflet.js + OpenStreetMap
(+ Stamen designs)
Provide open to use API
 SpringBoot + SpringMVC +
SpringSecurity
 Set rules to avoid easy DOS
 Log usage
 Circuit breakers
33
https://skopjepulse.mk/new
Control the system
SPA for device and user
management
 Angular2
 ng2-admin
System health dashboard
34
Mobile apps
35
Native Android and iOS apps
36
Extras
37
WiFi devices
Where you *really* can’t do LoRaWAN
 ESP8266 powered device
 HTTPS communication
 provision device address securely
 implement own address -> key mapping
More: http://pance.mk/index.php/securing-esp8266-communication/
38
AWS This is my architecture
39
http://tiny.cc/awsttn
40
Discussion
41
Thank you

More Related Content

What's hot

Meetup docker using software defined networks
Meetup docker   using software defined networksMeetup docker   using software defined networks
Meetup docker using software defined networksOCTO Technology
 
Firewall - Failover & Transparent Firewall
Firewall - Failover & Transparent FirewallFirewall - Failover & Transparent Firewall
Firewall - Failover & Transparent Firewall NetProtocol Xpert
 
Analysis of Security and Compliance using Oracle SPARC T-Series Servers: Emph...
Analysis of Security and Compliance using Oracle SPARC T-Series Servers: Emph...Analysis of Security and Compliance using Oracle SPARC T-Series Servers: Emph...
Analysis of Security and Compliance using Oracle SPARC T-Series Servers: Emph...Ramesh Nagappan
 
Trisul Trai compliance
Trisul Trai complianceTrisul Trai compliance
Trisul Trai compliancetrisulnsm
 
Nmap & Network sniffing
Nmap & Network sniffingNmap & Network sniffing
Nmap & Network sniffingMukul Sahu
 
Firewall and its purpose
Firewall and its purposeFirewall and its purpose
Firewall and its purposeRohit Phulsunge
 
Network traffic analysis with cyber security
Network traffic analysis with cyber securityNetwork traffic analysis with cyber security
Network traffic analysis with cyber securityKAMALI PRIYA P
 
Cisco Stealtwatch
Cisco StealtwatchCisco Stealtwatch
Cisco StealtwatchRayudu Babu
 
FIREWALL
FIREWALL FIREWALL
FIREWALL Akash R
 
Novetta Cyber Analytics Product Brochure Final_Web_4.20.2015
Novetta Cyber Analytics Product Brochure Final_Web_4.20.2015Novetta Cyber Analytics Product Brochure Final_Web_4.20.2015
Novetta Cyber Analytics Product Brochure Final_Web_4.20.2015Scott Van Valkenburgh
 
Cracking wep and wpa wireless networks
Cracking wep and wpa wireless networksCracking wep and wpa wireless networks
Cracking wep and wpa wireless networksMaghan Das
 
Network monotoring
Network monotoringNetwork monotoring
Network monotoringProgrammer
 
IRJET- Easy to Implement Searchable Encryption Scheme for Cloud-Assisted Wire...
IRJET- Easy to Implement Searchable Encryption Scheme for Cloud-Assisted Wire...IRJET- Easy to Implement Searchable Encryption Scheme for Cloud-Assisted Wire...
IRJET- Easy to Implement Searchable Encryption Scheme for Cloud-Assisted Wire...IRJET Journal
 

What's hot (20)

Meetup docker using software defined networks
Meetup docker   using software defined networksMeetup docker   using software defined networks
Meetup docker using software defined networks
 
Firewall - Failover & Transparent Firewall
Firewall - Failover & Transparent FirewallFirewall - Failover & Transparent Firewall
Firewall - Failover & Transparent Firewall
 
Types Of Firewall Security
Types Of Firewall SecurityTypes Of Firewall Security
Types Of Firewall Security
 
Analysis of Security and Compliance using Oracle SPARC T-Series Servers: Emph...
Analysis of Security and Compliance using Oracle SPARC T-Series Servers: Emph...Analysis of Security and Compliance using Oracle SPARC T-Series Servers: Emph...
Analysis of Security and Compliance using Oracle SPARC T-Series Servers: Emph...
 
Trisul Trai compliance
Trisul Trai complianceTrisul Trai compliance
Trisul Trai compliance
 
Nmap & Network sniffing
Nmap & Network sniffingNmap & Network sniffing
Nmap & Network sniffing
 
Firewall and its purpose
Firewall and its purposeFirewall and its purpose
Firewall and its purpose
 
Sdn&security
Sdn&securitySdn&security
Sdn&security
 
Network traffic analysis with cyber security
Network traffic analysis with cyber securityNetwork traffic analysis with cyber security
Network traffic analysis with cyber security
 
Gateway and firewall
Gateway and firewallGateway and firewall
Gateway and firewall
 
Cisco Stealtwatch
Cisco StealtwatchCisco Stealtwatch
Cisco Stealtwatch
 
FIREWALL
FIREWALL FIREWALL
FIREWALL
 
Novetta Cyber Analytics Product Brochure Final_Web_4.20.2015
Novetta Cyber Analytics Product Brochure Final_Web_4.20.2015Novetta Cyber Analytics Product Brochure Final_Web_4.20.2015
Novetta Cyber Analytics Product Brochure Final_Web_4.20.2015
 
Firewall
FirewallFirewall
Firewall
 
Firewall & its Services
Firewall & its ServicesFirewall & its Services
Firewall & its Services
 
Linux and firewall
Linux and firewallLinux and firewall
Linux and firewall
 
Firewall ppt
Firewall pptFirewall ppt
Firewall ppt
 
Cracking wep and wpa wireless networks
Cracking wep and wpa wireless networksCracking wep and wpa wireless networks
Cracking wep and wpa wireless networks
 
Network monotoring
Network monotoringNetwork monotoring
Network monotoring
 
IRJET- Easy to Implement Searchable Encryption Scheme for Cloud-Assisted Wire...
IRJET- Easy to Implement Searchable Encryption Scheme for Cloud-Assisted Wire...IRJET- Easy to Implement Searchable Encryption Scheme for Cloud-Assisted Wire...
IRJET- Easy to Implement Searchable Encryption Scheme for Cloud-Assisted Wire...
 

Similar to Gluing the IoT world with Java and LoRaWAN (Jfokus 2018)

Jprofessionals co create the future of your city
Jprofessionals co create the future of your cityJprofessionals co create the future of your city
Jprofessionals co create the future of your cityPance Cavkovski
 
Gluing the iot world (ICT)
Gluing the iot world (ICT)Gluing the iot world (ICT)
Gluing the iot world (ICT)Pance Cavkovski
 
Hannover Messe 2017 - Systems Federation in industrie 4.0
Hannover Messe 2017 - Systems Federation in industrie 4.0Hannover Messe 2017 - Systems Federation in industrie 4.0
Hannover Messe 2017 - Systems Federation in industrie 4.0Clemens Vasters
 
Splunk App for Stream
Splunk App for StreamSplunk App for Stream
Splunk App for StreamSplunk
 
System Architecture Exploration Training Class
System Architecture Exploration Training ClassSystem Architecture Exploration Training Class
System Architecture Exploration Training ClassDeepak Shankar
 
Open Networking through Programmability
Open Networking through ProgrammabilityOpen Networking through Programmability
Open Networking through ProgrammabilityTal Lavian Ph.D.
 
Walk Through a Software Defined Everything PoC
Walk Through a Software Defined Everything PoCWalk Through a Software Defined Everything PoC
Walk Through a Software Defined Everything PoCCeph Community
 
Why sdn
Why sdnWhy sdn
Why sdnlz1dsb
 
Akshay Sanjay Kale Resume LinkedIn
Akshay Sanjay Kale Resume LinkedInAkshay Sanjay Kale Resume LinkedIn
Akshay Sanjay Kale Resume LinkedInAkshay Kale
 
Nozomi Networks SCADAguardian - Data-Sheet
Nozomi Networks SCADAguardian - Data-SheetNozomi Networks SCADAguardian - Data-Sheet
Nozomi Networks SCADAguardian - Data-SheetNozomi Networks
 
Training manual on scada
Training manual on scadaTraining manual on scada
Training manual on scadabhavuksharma10
 
Ceph Day Melbourne - Walk Through a Software Defined Everything PoC
Ceph Day Melbourne - Walk Through a Software Defined Everything PoCCeph Day Melbourne - Walk Through a Software Defined Everything PoC
Ceph Day Melbourne - Walk Through a Software Defined Everything PoCCeph Community
 
SDN and Security: A Marriage Made in Heaven. Or Not.
SDN and Security: A Marriage Made in Heaven. Or Not.SDN and Security: A Marriage Made in Heaven. Or Not.
SDN and Security: A Marriage Made in Heaven. Or Not.Priyanka Aash
 
SDN_and_NFV_technologies_in_IoT_Networks
SDN_and_NFV_technologies_in_IoT_NetworksSDN_and_NFV_technologies_in_IoT_Networks
SDN_and_NFV_technologies_in_IoT_NetworksSrinivasa Addepalli
 
Java in the Air: A Case Study for Java-based Environment Monitoring Stations
Java in the Air: A Case Study for Java-based Environment Monitoring StationsJava in the Air: A Case Study for Java-based Environment Monitoring Stations
Java in the Air: A Case Study for Java-based Environment Monitoring StationsEurotech
 
People Counting: Internet of Things in Motion at JavaOne 2013
People Counting: Internet of Things in Motion at JavaOne 2013People Counting: Internet of Things in Motion at JavaOne 2013
People Counting: Internet of Things in Motion at JavaOne 2013Eurotech
 
IEEE HPSR 2017 Keynote: Softwarized Dataplanes and the P^3 trade-offs: Progra...
IEEE HPSR 2017 Keynote: Softwarized Dataplanes and the P^3 trade-offs: Progra...IEEE HPSR 2017 Keynote: Softwarized Dataplanes and the P^3 trade-offs: Progra...
IEEE HPSR 2017 Keynote: Softwarized Dataplanes and the P^3 trade-offs: Progra...Christian Esteve Rothenberg
 
Industrial Pioneers Days - Machine Learning
Industrial Pioneers Days - Machine LearningIndustrial Pioneers Days - Machine Learning
Industrial Pioneers Days - Machine LearningVEDLIoT Project
 

Similar to Gluing the IoT world with Java and LoRaWAN (Jfokus 2018) (20)

Jprofessionals co create the future of your city
Jprofessionals co create the future of your cityJprofessionals co create the future of your city
Jprofessionals co create the future of your city
 
Gluing the iot world (ICT)
Gluing the iot world (ICT)Gluing the iot world (ICT)
Gluing the iot world (ICT)
 
IoT meets Big Data
IoT meets Big DataIoT meets Big Data
IoT meets Big Data
 
Hannover Messe 2017 - Systems Federation in industrie 4.0
Hannover Messe 2017 - Systems Federation in industrie 4.0Hannover Messe 2017 - Systems Federation in industrie 4.0
Hannover Messe 2017 - Systems Federation in industrie 4.0
 
Splunk App for Stream
Splunk App for StreamSplunk App for Stream
Splunk App for Stream
 
System Architecture Exploration Training Class
System Architecture Exploration Training ClassSystem Architecture Exploration Training Class
System Architecture Exploration Training Class
 
Open Networking through Programmability
Open Networking through ProgrammabilityOpen Networking through Programmability
Open Networking through Programmability
 
Io t data streaming
Io t data streamingIo t data streaming
Io t data streaming
 
Walk Through a Software Defined Everything PoC
Walk Through a Software Defined Everything PoCWalk Through a Software Defined Everything PoC
Walk Through a Software Defined Everything PoC
 
Why sdn
Why sdnWhy sdn
Why sdn
 
Akshay Sanjay Kale Resume LinkedIn
Akshay Sanjay Kale Resume LinkedInAkshay Sanjay Kale Resume LinkedIn
Akshay Sanjay Kale Resume LinkedIn
 
Nozomi Networks SCADAguardian - Data-Sheet
Nozomi Networks SCADAguardian - Data-SheetNozomi Networks SCADAguardian - Data-Sheet
Nozomi Networks SCADAguardian - Data-Sheet
 
Training manual on scada
Training manual on scadaTraining manual on scada
Training manual on scada
 
Ceph Day Melbourne - Walk Through a Software Defined Everything PoC
Ceph Day Melbourne - Walk Through a Software Defined Everything PoCCeph Day Melbourne - Walk Through a Software Defined Everything PoC
Ceph Day Melbourne - Walk Through a Software Defined Everything PoC
 
SDN and Security: A Marriage Made in Heaven. Or Not.
SDN and Security: A Marriage Made in Heaven. Or Not.SDN and Security: A Marriage Made in Heaven. Or Not.
SDN and Security: A Marriage Made in Heaven. Or Not.
 
SDN_and_NFV_technologies_in_IoT_Networks
SDN_and_NFV_technologies_in_IoT_NetworksSDN_and_NFV_technologies_in_IoT_Networks
SDN_and_NFV_technologies_in_IoT_Networks
 
Java in the Air: A Case Study for Java-based Environment Monitoring Stations
Java in the Air: A Case Study for Java-based Environment Monitoring StationsJava in the Air: A Case Study for Java-based Environment Monitoring Stations
Java in the Air: A Case Study for Java-based Environment Monitoring Stations
 
People Counting: Internet of Things in Motion at JavaOne 2013
People Counting: Internet of Things in Motion at JavaOne 2013People Counting: Internet of Things in Motion at JavaOne 2013
People Counting: Internet of Things in Motion at JavaOne 2013
 
IEEE HPSR 2017 Keynote: Softwarized Dataplanes and the P^3 trade-offs: Progra...
IEEE HPSR 2017 Keynote: Softwarized Dataplanes and the P^3 trade-offs: Progra...IEEE HPSR 2017 Keynote: Softwarized Dataplanes and the P^3 trade-offs: Progra...
IEEE HPSR 2017 Keynote: Softwarized Dataplanes and the P^3 trade-offs: Progra...
 
Industrial Pioneers Days - Machine Learning
Industrial Pioneers Days - Machine LearningIndustrial Pioneers Days - Machine Learning
Industrial Pioneers Days - Machine Learning
 

More from Pance Cavkovski

Gluing the IoT world with Java and LoRaWAN
Gluing the IoT world with Java and LoRaWANGluing the IoT world with Java and LoRaWAN
Gluing the IoT world with Java and LoRaWANPance Cavkovski
 
VDB16 - DIY Java & Kubernetes
VDB16 - DIY Java & KubernetesVDB16 - DIY Java & Kubernetes
VDB16 - DIY Java & KubernetesPance Cavkovski
 
Connected hardware for Software Engineers 101
Connected hardware for Software Engineers 101Connected hardware for Software Engineers 101
Connected hardware for Software Engineers 101Pance Cavkovski
 
Hands on Java8 and RaspberryPi
Hands on Java8 and RaspberryPiHands on Java8 and RaspberryPi
Hands on Java8 and RaspberryPiPance Cavkovski
 
Micro and moblile: Java on the Raspberry Pi
Micro and moblile: Java on the Raspberry PiMicro and moblile: Java on the Raspberry Pi
Micro and moblile: Java on the Raspberry PiPance Cavkovski
 

More from Pance Cavkovski (7)

Gluing the IoT world with Java and LoRaWAN
Gluing the IoT world with Java and LoRaWANGluing the IoT world with Java and LoRaWAN
Gluing the IoT world with Java and LoRaWAN
 
VDB16 - DIY Java & Kubernetes
VDB16 - DIY Java & KubernetesVDB16 - DIY Java & Kubernetes
VDB16 - DIY Java & Kubernetes
 
DIY Java & Kubernetes
DIY Java & KubernetesDIY Java & Kubernetes
DIY Java & Kubernetes
 
Connected hardware for Software Engineers 101
Connected hardware for Software Engineers 101Connected hardware for Software Engineers 101
Connected hardware for Software Engineers 101
 
Hands on Java8 and RaspberryPi
Hands on Java8 and RaspberryPiHands on Java8 and RaspberryPi
Hands on Java8 and RaspberryPi
 
Micro and moblile: Java on the Raspberry Pi
Micro and moblile: Java on the Raspberry PiMicro and moblile: Java on the Raspberry Pi
Micro and moblile: Java on the Raspberry Pi
 
Web sockets in Java
Web sockets in JavaWeb sockets in Java
Web sockets in Java
 

Recently uploaded

Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 

Gluing the IoT world with Java and LoRaWAN (Jfokus 2018)

  • 1. Panche Chavkovski 2018-02-06 / Jfokus The SkopjePulse.mk case Gluing the IoT world with Java and LoRaWAN
  • 2. Who am I? 2 Senior Software Engineer @ netcetera jug.mk Leader Codefu.mk administrator Hardware & IoT enthusiast TTN SK Initiator http://pance.mk/ and @hsilomedus Panche Chavkovski
  • 3. 3
  • 4. SkopjePulse  extremeairpollution  Excessive urban noise  Flash floods No clear means for improvement  Leverage technology  Crowd-sourced sensor network  Data analysis and availability  Warnings  Clearer insights  Data-driven basis for action https://skopjepulse.mk/faq SolutionProblems 4
  • 7. LoRa & LoRaWAN  Based on FSK & CSS, multiple channels  Low Power  Low Cost  Long range  Free ISM bands: 433, 868, 915 MHz  Proprietary by Semtech  MAC layer on top of LoRa  IoT communication standard  Standardized stack  Driven by LoRa Alliance Long Range Wide Area NetworkLong Range 7
  • 8. Fully bi-directional End-to-end security Easy commisioning Built-in positioning Network scalability Features 8
  • 9. Limitations Low speed (default BW)  SF12: 250bps with the farthest distance and the longest air-time  SF7: 5470bps with the shortest distance and the shortest air-time Small package sizes: ~1-20bytes Less frequent  2-200 uplinks per day  1-10 downlinks per day 9
  • 10. LoRaWAN architecture 10 End nodes Gateway / concentrator Network server(s) Application server(s) LoRa RF LoRaWAN TCP/IP SSL LoRaWAN TCP/IP SSL Secure payload AES secured payload
  • 11. LoRaWAN devices Different classes  Class A, rare async devices (current): one uplink with two downlink windows  Class B, always on, timed: beacon downlink windows  Class C, always on, always listening. Network sign on:  Over The Air Authorization (OTAA): App EUI and Key  Authorization By Personalization (ABP): App / Network keys and Device address 11
  • 12. TheThingsNetwork 12 Global, crowdsourced Internet Of Things data network  Community driven with local initiators and teams  Provided network and back-end  Free for fair use  Can be elevated to SLA (private – public partnership)  Multiple integration options  LoRaWAN as base technology https://www.thethingsnetwork.org/
  • 13. How to use TTN https://console.thethingsnetwork.org/  Applications  Devices  Keys, UIDs, Credentials  MQTT  HTTP  Data storage  Amazon AWS  Cayenne  EVRYTHNG IntegrationsRegistration 13
  • 15. Microchip RN2483 (LoRaWAN stack) Arduino (MCU) RFM95W (LoRa transceiver) El. Design & PCB CAD Software The start up kit 15
  • 16. KiCAD usage 16 Scheme design PCB design 3D render and gerbers
  • 17. Assembly 17 PCB fabrication Solder and connect 3D printed enclosure
  • 18. Make it work  Arduino or other embedded code  Restricted environment – 32KBflash – 2KBRAM – 16MHzCPU  Perpetual non-observed execution  Select and inspect used sensors  Test and / or calibrate  Check for factory defects  Plan for hardware wear-out and lifespan  Don’t assume anything BewareCode 18
  • 20. Rules to go by  Data transceiver  Data Store  Web and API  Analytics & processing  Robustness  Scaling  Fallbacks  Data sanity Aim for and produceDecouple 20
  • 21. Our approach SpringBoot framework  Self contained web server / application  Modular  Starter packs for needed spring pieces  Less configuration, more conventions  Light(er)weight  Container and orchestrator friendly (Cloud native) 21
  • 23. Communication first! (almost) No overhead  Use binary protocols if possible  Always on connection – reconnect fast – plan for fallback React first, store later! Get closer to the data source. 23
  • 24. Our approach TheThingsNetwork MQTT Integration Spring Boot + Eclipse Paho client + Gson  @Component client implementing MqttCallback  Connect in @PostConstruct  @Scheduled(fixedrate = …) watchdog @Component Details on MQTT URL, credentials and message formats: https://www.thethingsnetwork.org/docs/applications/mqtt/api.html 24
  • 26. IoT data IoT data is almost always impartial and time-series based Use data store that is designed for sorted time-series  Utilize recent data caches or TTLs  Don’t hold on redundancies  Always just append data  Never aggregate, but process and store  Design to live with eventual consistency 26
  • 27. Our approach Cassandra DB 3.7 Spring Boot + Cassandra Driver Core + Extras  Cassandra Cluster wrapped in @Service  InstantCodec for java.time interoperability  QueryBuilder  No data filtering. * spring-data-cassandra seemed like a poor choice. 27
  • 29. Averaging data  A lot of (impartial) data  Observed system load  Possible downtime  Retroactivity  Side-running SpringBoot microservice  Runs a few times a day  Checks first  Calculates last two days, week and month  Uses intermediary data  Uses simple heuristic Our approachSituation 29
  • 31. Early warning system Keep a track on what’s happening  Periodically fetch the recent data  Analyze, produce and save current state  Notify if the state has changed significantly  Don’t spam  Periodically cleanup Our approach: SpringBoot + SpringSocial + Firebase 31
  • 33. Provide and visualize the data Interactive cockpit and data explorers  D3js client side visualizations  Leaflet.js + OpenStreetMap (+ Stamen designs) Provide open to use API  SpringBoot + SpringMVC + SpringSecurity  Set rules to avoid easy DOS  Log usage  Circuit breakers 33 https://skopjepulse.mk/new
  • 34. Control the system SPA for device and user management  Angular2  ng2-admin System health dashboard 34
  • 36. Native Android and iOS apps 36
  • 38. WiFi devices Where you *really* can’t do LoRaWAN  ESP8266 powered device  HTTPS communication  provision device address securely  implement own address -> key mapping More: http://pance.mk/index.php/securing-esp8266-communication/ 38
  • 39. AWS This is my architecture 39 http://tiny.cc/awsttn