Node.JS Appliances on Embedded Linux Devices. Mehmet Fatih Karagöz & Cevahir Turgut



Similar documents
Building A Self-Hosted WebRTC Project

PROFESSIONAL. Node.js BUILDING JAVASCRIPT-BASED SCALABLE SOFTWARE. Pedro Teixeira WILEY. John Wiley & Sons, Inc.

STLinux Software development environment

ICON UK 2015 node.js for Domino developers. Presenter: Matt White Company: LDC Via

Streaming Media System Requirements and Troubleshooting Assistance

ANDROID DEVELOPER TOOLS TRAINING GTC Sébastien Dominé, NVIDIA

StruxureWare TM Data Center Expert

Embedded Software Development

DOCUMENT REFERENCE: SQ EN. SAMKNOWS TEST METHODOLOGY Web-based Broadband Performance White Paper. July 2015

Eddy Integrated Development Environment, LemonIDE for Embedded Software System Development

Extending Tizen Native Framework with Node.js

Microsoft Windows Apple Mac OS X

Five standard procedures for building the android system. Figure1. Procedures for building android embedded systems

Microsoft Windows Apple Mac OS X

Recording. Smart recording (depending on the camera models)

Prototyping Connected-Devices for the Internet of Things. Angus Wong

Rally Installation Guide

StruxureWare TM Center Expert. Data

Embedded Linux RADAR device

Introduction to Android

Getting Started Guide with WIZ550web

MEAN/Full Stack Web Development - Training Course Package

Workshop on Android and Applications Development

Web Application s Performance Testing

Open Source SCADA. A Framework for the Connected World. Remote Monitoring and Control 2014 SCADA Technology Summit. Presented by:

Drupal Performance Tuning

INUVIKA OPEN VIRTUAL DESKTOP FOUNDATION SERVER

StruxureWare Data Center Expert Release Notes

Getting Started Android + Linux. February 27 th, 2014

StruxureWare Data Center Expert Release Notes

Introduction to TIZEN SDK

PANDORA FMS NETWORK DEVICES MONITORING

INSTALLATION GUIDE ENTERPRISE DYNAMICS 9.0

REDCENTRIC UNITY SOFTWARE MINIMUM REQUIREMENTS

TEGRA X1 DEVELOPER TOOLS SEBASTIEN DOMINE, SR. DIRECTOR SW ENGINEERING

Digitale Signalverarbeitung mit FPGA (DSF) Soft Core Prozessor NIOS II Stand Mai Jens Onno Krah

PANDORA FMS NETWORK DEVICE MONITORING

Notes and terms of conditions. Vendor shall note the following terms and conditions/ information before they submit their quote.

mydlink One-bay Standalone NVR

CYCLOPE let s talk productivity

Load and Performance Load Testing. RadView Software October

Content Distribution Management

Example of Standard API

Mobile App Testing Process INFLECTICA TECHNOLOGIES (P) LTD

Client requirements. Engagement Situation

Multi-touch app development with modern web tools. David Reagan, Advanced Visualization Lab

Mirtrak 6 Powered by Cyclope

SeeTec ExpansionPackage

NoSQL web apps. w/ MongoDB, Node.js, AngularJS. Dr. Gerd Jungbluth, NoSQL UG Cologne,

Network Probe User Guide

Cisco Enhanced Device Interface 2.2

Programación de Sistemas Empotrados y Móviles (PSEM)

Virtualization and Other Tricks.

MODERN WEB APPLICATION DEVELOPMENT WORKFLOW

Linux for Embedded and Real-Time Systems

VMware vsphere 4.1 with ESXi and vcenter

SNOW LICENSE MANAGER (7.X)... 3

The Monitis Monitoring Agent ver. 1.2

Informatica Data Director Performance

Building Internet of Things applica5ons with COMPOSE and JavaScript Charalampos

FROM BANNER 8 TO BANNER XE. What s the story?

Programming IoT Gateways With macchina.io

Reminders. Lab opens from today. Many students want to use the extra I/O pins on

Citrix XenServer 5.6 OpenSource Xen 2.6 on RHEL 5 OpenSource Xen 3.2 on Debian 5.0(Lenny)

Getting Started with Tizen SDK : How to develop a Web app. Hong Gyungpyo 洪 競 杓 Samsung Electronics Co., Ltd

Kaseya IT Automation Framework

Network Licensing. White Paper 0-15Apr014ks(WP02_Network) Network Licensing with the CRYPTO-BOX. White Paper

AXIS 262+ Network Video Recorder

An Inside Look at the Architecture of NodeJS

FileMaker Server 7. Administrator s Guide. For Windows and Mac OS

Continuous Integration and Delivery. manage development build deploy / release

A Transport Protocol for Multimedia Wireless Sensor Networks

MAXPRO. NVR Software. NETWORK VIDEO RECORDING SOLUTION

Customer Site Requirements for incontact Workforce Optimization

Corporate VPN Using Mikrotik Cloud Feature. By SOUMIL GUPTA BHAYA Mikortik Certified Trainer

Deepak Patil (Technical Director) iasys Technologies Pvt. Ltd.

H0/H2/H4 -ECOM100 DHCP & HTML Configuration. H0/H2/H4--ECOM100 DHCP Disabling DHCP and Assigning a Static IP Address Using HTML Configuration

Remote Desktop Access Through Android Mobile Phones and Reverse

Uila SaaS Installation Guide

SECURE YOUR NETWORK WITH FIREWALL BUILDER

Use Cases for Target Management Eclipse DSDP-Target Management Project

2 x 3.5-inch SATA 6Gb/s, SATA 3Gb/s hard drive. 1. The standard system is shipped without HDD. 2. For the HDD compatibility list, please

Technical Requirements

4-CH Hybrid Digital Video Recorder

JavaScript Programming

Table of Contents. Chapter1. Introduction Before Installation System Requirements... 1

Network Security Platform 7.5

Thingsquare Technology

Setting Up a Development Server

TABLE OF CONTENTS NETWORK SECURITY 2...1

Performance Optimization and Debug Tools for mobile games with PlayCanvas

SNOW LICENSE MANAGER (7.X)... 3

Scholastic Education Technology Programs

Lindenbaum Web Conference

Performance of Host Identity Protocol on Nokia Internet Tablet

Embedded Development Tools

How to Integrate Camera Live View into Web Application?

New Features in XE8. Marco Cantù RAD Studio Product Manager

SysAidTM Freeware Installation Guide

VS-4112U-RP Pro+ Hardware Spec.

Transcription:

Node.JS Appliances on Embedded Linux Devices Mehmet Fatih Karagöz & Cevahir Turgut 1

Outline Introduction to Node.js Cross-compiling Node.js and Node Package Manager(NPM) Development environment Scripting samples in embedded devices Development story of a surveillance application Demo Questions 2

Outline Introduction to Node.js Cross-compiling Node.js and NPM Development environment Scripting samples in embedded devices Development story of a surveillance application Demo Questions 3

Introduction to Node.js What is Node.js? Node.js is a platform built on Chrome's JavaScript runtime (V8) for easily building fast, scalable network applications. Event-Driven Non-Blocking I/O Lightweight Efficient HW Usage 4

Introduction to Node.js Advantages Open source HW Efficiency Learning Curve Development Time Javascript / No Compile NPM Package Manager Disadvantages Small Developer Pool Bad at CPU Bound Jobs Asynchronous Debugging 5

Introduction to Node.js What is learning curve? Node.JS uses Javascript Most web developers are familiar with the language You can get started with building very basic application in less than one hour (that includes installation time!) 6

Introduction to Node.js NPM (Node Packaged Modules) NodeJS package management system Install modules very easily even on embedded "npm install express Installs dependant modules too Global install option "npm install -g express" 7

Introduction to Node.js Popular Modules Express Request Async Grunt socket.io Mocha Underscore Mongoose Redis Connect 8

Outline Introduction to Node.js Cross-compiling Node.js and NPM Development environment Scripting samples in embedded devices Development story of a surveillance application Demo Questions 9

Cross-compiling Node.js and NPM Where is Node.js? Download http://nodejs.org/download Git git clone git://github.com/joyent/node.git cd node git checkout v0.10 Node.js is released under the MIT license. 10

Cross-compiling Node.js and NPM Configuration Options Usage: configure [options] Options: --without-npm --without-ssl --without-snapshot Don't install the bundled npm package manager Build without SSL Build without snapshotting V8 libraries. You might want to set this for cross-compiling. --dest-cpu=dest_cpu CPU architecture to build for. Valid values are: arm, ia32, x64 --dest-os=dest_os Operating system to build for. Valid values are: win, mac, solaris, freebsd, openbsd, linux, android 11

Cross-compiling Node.js and NPM How to make and install export AR=arm-linux-gnueabihf-ar export CC=arm-linux-gnueabihf-gcc export CXX=arm-linux-gnueabihf-g++ export LINK=arm-linux-gnueabihf-g++./configure --without-snapshot --dest-cpu=arm --dest-os=linux make make install DESTDIR=~/node-armhf/ 12

Outline Introduction to Node.js Cross-compiling Node.js and NPM Development environment Scripting samples in embedded devices Development story of a surveillance application Demo Questions 13

Development Environment Suitable Editors Vim Gedit Webstorm Eclipse / Nodeclipse Plugin Cloud9 (Cloud based editor) 14

Development Environment node debug myscript.js Debugging Options cont, c - Continue execution next, n - Step next step, s - Step in out, o - Step out pause - Pause running code (like pause button in Developer Tools) setbreakpoint(), sb() - Set breakpoint on current line setbreakpoint(line), sb(line) - Set breakpoint on specific line setbreakpoint('fn()'), sb(...) - Set breakpoint on a first statement in functions body setbreakpoint('script.js', 1), sb(...) - Set breakpoint on first line of script.js clearbreakpoint, cb(...) - Clear breakpoint backtrace, bt - Print backtrace of current execution frame list(5) - List scripts source code with 5 line context (5 lines before and after) watch(expr) - Add expression to watch list unwatch(expr) - Remove expression from watch list watchers - List all watchers and their values (automatically listed on each breakpoint) repl - Open debugger's repl for evaluation in debugging script's context 15

Outline Introduction to Node.js Cross-compiling Node.js and NPM Development environment Scripting samples in embedded devices Development story of a surveillance application Demo Questions 16

Scripting Samples in Embedded Devices GPIO/LED on/off var exec = require( child_process ).exec; 17

Scripting Samples in Embedded Devices CPU / Memory Usage var os = require( os ); 18

Scripting Samples in Embedded Devices Timers 19

Scripting Samples in Embedded Devices Ini Parser config.ini: ;sample config ini file name = Iniparser Demo version = 0.1 npm install iniparser 20

Outline Introduction to Node.js Cross-compiling Node.js and NPM Development environment Scripting samples in embedded devices Development story of a surveillance application Demo Questions 21

Development Story of a Surveillance Application - Overview Main Purpose Demonstrate usage scenario of Node.js in real world app Give more information about network classes of Node.js Run complete Node.js app in embedded platform Example Surveillance System Smart IP Cameras to detect motion, etc. Server PC at Command Control Center monitoring cameras, their alarms, etc. 22

Development Story of a Surveillance Application - Overview Deployment Model of Example System 23

Development Story of a Surveillance Application - Overview Used Components IGEPv2 Boards DM3730 Texas Instruments processor ARM Cortex A8 1GHz Camera ISP 512 Megabytes RAM / 512 Megabytes FLASH Ethernet 10/100 MB BaseT And more (C64+ DSP 800MHz, 3D Accelerator SGX530 @ 200 MHz,...) Kernel 2.6.37 Compiler: GCC version 4.6.3 24

Development Story of a Surveillance Application - Overview Component Diagram 25

Development Story of a Surveillance Application - Overview Component Diagram (with messages) 26

Development Story of a Surveillance Application - Overview Deployment Model of Example System 27

Development Story of a Surveillance Application - Video App Video App Fake Applicaton to simulate motion detection Written using Boost CPP Libraries Connected to Camera System App with TCP Produces periodic alarm messages Receives configuration messages 28

Development Story of a Surveillance Application - Video App 29

Development Story of a Surveillance Application - Camera SystemMgr App Camera SystemMgr App Written using Node.js Manages other software elements running on camera through IPC Store configurations Connection interface of camera to server Includes 2 TCP servers and 1 UDP client 1 TCP Server for IPC with VideoApp 1 TCP Server to get configuration messages from Server to send alarm messages to Server 1 UDP broadcaster to send heartbeat 30

Camera SystemMgr App 31

Camera SystemMgr App 32

Camera SystemMgr App 33

Development Story of a Surveillance Application - Server App Server App Connection with online cameras Camera discovery by listening Broadcast/UDP heartbeat messages Connecting TCP port of cameras Configuring cameras Collects alarms from cameras Serve all information to web interface Static Content Serving Express and Socket.io modules of Node.js Handles user inputs from web interface Management of all cameras Handling multi-client/multi-camera systems 34

Server App 35

Server App 36

Server App 37

Server App 38

Server App 39

Development Story of a Surveillance Application - Web Interface Web Interface HTML5/Javascript Web Sockets Socket.io Angular.js Ajax Based No need to refresh Browser Compatibility IE9, Firefox, Chrome tested 40

Web Interface WebSocket Code Samples From http://socket.io/#how-to-use 41

Web Interface WebSocket Code Samples 42

Web Interface WebSocket Code Samples 43

Outline Introduction to Node.js Cross-compiling Node.js and NPM Development environment Scripting samples in embedded devices Development story of a surveillance application Demo Questions 44

Questions Demo Codes github.com/mfkaragoz/elce2013demo Thank You! Mehmet Fatih KARAGOZ mfatihkaragoz@yahoo.com Cevahir TURGUT cevahir.turgut@gmail.com 45