var zetta = require('zetta');
zetta()
.name('beaglebone')
.link('http://cloud.herokuapp.com')
.listen(3000);
Run Everywhere
Zetta servers run in the cloud, on PCs and on single-board computers. With Zetta you can link Raspberry Pis, BeagleBones and PCs together with cloud platforms like Heroku to create geo-distributed networks.GET /servers/321/devices/123
Host: cloud.herokuapp.com
Accept: application/vnd.siren+json
{
"class": [
"device"
],
"properties": {
"id": "123",
"type": "arm",
"name": "Robot Arm",
"state": "standby"
},
"actions": [{
"name": "move-claw",
"method": "POST",
...
API Every Thing
Zetta turns any device into an API. Zetta servers communicate with microcontrollers like Arduino and Spark Core giving every device a REST API both locally and in the cloud. Zetta’s reactive hypermedia design marries reactive programming with Siren hypermedia APIs so that you can assemble distributed systems of devices that communicate and react via APIs.module.exports = function(server) {
var alarmQuery = server
.from('office')
.where({type: 'alarm'});
var motionDetectorQuery = server
.from('warehouse')
.where({type: 'motionDetector'});
server.observe([alarmQuery, motionDetectorQuery],
function(alarm, motionDetector) {
motionDetector.on('motion', function() {
alarm.call('activate', function() {});
});
});
}
Code with Joy
Building Internet of Things systems is complex. Zetta provides helpful abstractions for increased developer productivity while also giving direct access to underlying protocols and conventions allowing you to focus on the big picture without losing track of the details so that you joyfully transform sensors, actuators and controllers into big, creative applications.server
.observe([sound, arm, huelight],
function(sound, arm, huelight) {
var gocrazy = new GoCrazy(arm, huelight);
sound.streams.level.on('data', function(msg) {
gocrazy.notify();}
);
});
Stream Big Data
Zetta’s architecture is optimized for data-intensive, real-time applications such as bitcoin-bank which is also an autonomous trading application that is driven by an algorithm to help investors trade bitcoins effortlessly. Zetta allows you to observe and react to device and system behavior in code and using visualization tools so that you gain actionable insights and take insightful actions. You can also stream data into machine analytics platforms like Splunk.

var zetta = require('zetta');
var ConnectedCarApp = require('./apps/connected_car');
var HomeAutomationApp = require('./apps/home_automation');
var WearablesApp = require('./apps/wearables');
var MarsRoverSwarmApp = require('./apps/mars_rover_swarm');
zetta()
.name('cloud')
.use(ConnectedCarApp)
.use(HomeAutomationApp)
.use(WearablesApp)
.use(MarsRoverSwarmApp)
.listen(PORT);