SlideShare a Scribd company logo
Spacebrew
2/1/14 + 2/2/14

Spacebrew Workshop - NYU ITP - Brett Renfer
Schedule
Today
• Now-10:30: - Quick Introductions
• 10:30-12:00 - Introduction to Spacebrew
• 12-12:30 - Lunch break
• 12:30-2:00 - Spacebrew exercise
• 2:00-3:00 - Advanced Spacebrew
• 3:00-5:00 - Assignment: Brainstorm, jam session
!

Tomorrow
• 12:00-12:45 - Demos
• 12:45-1:45 - Documentation
Spacebrew Workshop - NYU ITP - Brett Renfer
Spacebrew Basics

Spacebrew Workshop - NYU ITP - Brett Renfer
Setup Time
Software Basics
• Processing
• Arduino
• a Text Editor
• openFrameworks

Spacebrew

https://github.com/Spacebrew/

•
•
•
•

Spacebrew Workshop - NYU ITP - Brett Renfer

spacebrew
spacebrewP5
ofxSpacebrew
• ofxLibwebsockets
spacebrew.js
Obligatory hype video!
Spacebrew Workshop - NYU ITP - Brett Renfer
Spacebrew…
•

is a service and toolkit for
choreographing interactive spaces
!

•

makes it easy to connect interactive
things to one another
!

•

was developed to support prototypingdriven design efforts

Spacebrew Workshop - NYU ITP - Brett Renfer
Client-Server Model
client
app

client
app
client
app

Spacebrew Workshop - NYU ITP - Brett Renfer

client
app

Each client can feature one or
more publishers and subscribers.
The server can be hosted online
or run on a local network (more
on that later).
Client-Server Model
client
app

client
app
client
app

Spacebrew Workshop - NYU ITP - Brett Renfer

client
app

Clients communicate with the
server via WebSockets. All data
is formatted as JSON
Client-Server Model
The server routes all publishers
and subscribers. Routes can be
edited via a switchboard-like
interface

Spacebrew Workshop - NYU ITP - Brett Renfer
= true or false
= 0-1023
= “some text”

Spacebrew Workshop - NYU ITP - Brett Renfer

Data Types
Three standard types allow for
quick and easy routing.
Custom types are also supported
= true or false
= 0-1023
= “some text”

Spacebrew Workshop - NYU ITP - Brett Renfer

Data Types
Each publishers and subscribers
announces its type, allowing for
automatic routing between
different apps
Libraries

JS
Spacebrew Workshop - NYU ITP - Brett Renfer

Spacebrew aims to be
implementation agnostic.

We want to use the right tools
at the right time!
Why?
•

We’ve used a lot of “glue” languages/
toolkits in the past, but there wasn’t one
that was truly cross-platform/cross-toolkit.


•

Wanted to build a toolkit with a low floor
and a high ceiling: easy for speed
prototypes, advanced enough to handle
commercial applications.

Spacebrew Workshop - NYU ITP - Brett Renfer
Using Spacebrew

Spacebrew Workshop - NYU ITP - Brett Renfer
Spacebrew Libraries
Each Spacebrew library:
• Connects to a Spacebrew server via WebSockets
• Has an API to declare its publisher(s) and
subscriber(s)
• Receives messages from Spacebrew and dispatches
events accordingly

Spacebrew Workshop - NYU ITP - Brett Renfer
Spacebrew Libraries
Connecting to Spacebrew in each Library
• Create a Spacebrew Object
• Tell your object the IP or hostname of the
Spacebrew server
• Declare any publishers and subscribers
• Connect

Spacebrew Workshop - NYU ITP - Brett Renfer
Spacebrew + Processing
•

spacebrewP5 is a Spacebrew-supported library


•

install the library at 

~/Documents/Processing/libraries 

(make the folder if it doesn’t exist!)


•

restart Processing if it was open


•

open the spacebrew_base example to get started!

Spacebrew Workshop - NYU ITP - Brett Renfer
Spacebrew + Javascript
•

spacebrew.js is a stand-alone script that can run in any
browser that supports WebSockets

•

this includes: Chrome (OS X, Windows, Android, iOS),
Safari (OS X, iOS), Firefox, Opera, IE 10


•

open the spacebrew slider example in your text editor


•

open http://bit.ly/sbslide on your smartphone


•

also try http://bit.ly/sbaccel

Spacebrew Workshop - NYU ITP - Brett Renfer
Spacebrew + openFrameworks
•

ofxSpacebrew connects to Spacebrew via
ofxLibwebsockets


•

once you have both installed, you can create
ofxSpacebrew projects via the OF project generator


•

let’s look at example_button

Spacebrew Workshop - NYU ITP - Brett Renfer
Spacebrew + Arduino
•

Two routes:

•

the easy road: use Processing + Serial


•

the road less travelled: Spacebrew Arduino lib




http://github.com/labatrockwell/spacebrew-arduino-library

•
•

Spacebrew Workshop - NYU ITP - Brett Renfer

requires Arduino Ethernet shield
notoriously difficult to debug!
Thinking About Apps
•

We try to silo apps whenever possible
• Create specialized apps that are easy to re-use
• Allows for multiple languages for each need
• Quickly and easily move between machines/
networks when necessary
• Allows for easy prototypes in the future!

Spacebrew Workshop - NYU ITP - Brett Renfer
Questions?

Spacebrew Workshop - NYU ITP - Brett Renfer
Lunch O’Clock

Spacebrew Workshop - NYU ITP - Brett Renfer
Zip! Zap! Zow!
Everybody stand up!

Spacebrew Workshop - NYU ITP - Brett Renfer
Exercise
Zip! Zap! Zow! 2.0

Spacebrew Workshop - NYU ITP - Brett Renfer
ZZZ2.0
•

use any library you wish
!

•

create an app that has one publisher and one
subscriber, both of which are range type


•

Your app must change states when it receives a
range. 


•

Your app must have a trigger to send out its value!
(e.g. mouse click, key press, sensor read)

Spacebrew Workshop - NYU ITP - Brett Renfer
Custom Types

Spacebrew Workshop - NYU ITP - Brett Renfer
Custom Types
•

Spacebrew supports arbitrary type names and data
(anything that reads as valid JSON will work)
!

•

Similar to built-in types, you can only route to
matching names (e.g. we might know that “float”
could probably route to “int”, but to Spacebrew
they’re wholly different)

Spacebrew Workshop - NYU ITP - Brett Renfer
Spacebrew Workshop - NYU ITP - Brett Renfer
Example: Ultrabook Tree
•

Each input station sent a custom “bloom” object:
• Which image (id)
• Number of laptops
• Radius
• Relative position (x,y)
• Velocity
• Rotation

Spacebrew Workshop - NYU ITP - Brett Renfer
Quick Brainstorm
•

What are some scenarios you might use
custom types for?

Spacebrew Workshop - NYU ITP - Brett Renfer
Custom Type Demo
•

JSON in spacebrew.js, ofxSpacebrew, and
spacebrewP5
!

•

Why JSON?
• It’s a simple way to send arbitrary objects
• Spacebrew uses it, so all libs have some
sort of JSON library included (if there
isn’t one built in)

Spacebrew Workshop - NYU ITP - Brett Renfer
You Got Served

Spacebrew Workshop - NYU ITP - Brett Renfer
Running Your Own Server
•

Why?

•

sandbox.spacebrew.cc is on the slowest AWS tier
!

•

Running over the internet introduces some level
of latency
!

•

Running a local server OR a remote server allows
a level of control: only people you choose can
route/reroute, break your routes, etc
!

•

Allows you to customize the server code if 

you choose!

Spacebrew Workshop - NYU ITP - Brett Renfer
Running Your Own Server
•

How?
!

•

Setup! Only needs to be done once


•

Download and install nodejs: www.nodejs.org
!

•

Install node dependencies:
!

•
•

Spacebrew Workshop - NYU ITP - Brett Renfer

npm install ws
npm install forever-monitor
Running Your Own Server
•

How?
!

•

Run! What you’ll do every time:


•

In terminal, cd to the spacebrew directory
!

•

Run: node node_server_forever.js

Spacebrew Workshop - NYU ITP - Brett Renfer
Running Your Own Server
•

How?
!

•

If you want to set up your own remote server, we
recommend this tutorial (by fellow ITPers!):

https://vimeo.com/60001410

Spacebrew Workshop - NYU ITP - Brett Renfer
Persistence
•

Another advantage of running your own server is you
can use the persistent admin
!

•

The persistent admin is a separate service that
lets you edit, save, load, and persist routes
!

•

It allows you to specify specific app routings:

coolApp -> coolPub to lameApp -> lameSub
!

•

It also allows for powerful wild card routings:

.* -> coolPub to .* -> lameSub
!

•

Spacebrew Workshop - NYU ITP - Brett Renfer

This routes any app that publishes “coolPub” to
any other app that subscribes to “lameSub”
Persistence
•

You can run the persistent admin from the spacebrew
directory:

node node_persistent_admin.js
!

•

From the command line, you can list, add, remove, load,
and save routes:
!
•

list: ls


•

add: add client1Name,pub,client2Name,sub
• use .* to create a wildcard


•

remove: remove [index]
• you can find an index after add or by listing


•

save / load (just that!)
• load is called on start automatically

Spacebrew Workshop - NYU ITP - Brett Renfer
Admin

Spacebrew Workshop - NYU ITP - Brett Renfer
The Admin API
•

You don’t just have to use our web interface!
!

•

Javascript, openFrameworks and Cinder (Processing
soon) support the Admin API

!

•

The Admin API subscribes to Spacebrew similar to a
client, firing events each time a client connects/
disconnects or changes its pub/sub map
!

•

It allows you to view, edit, and add any and all
routes in real time!
!

•

This allows for apps like the Admin Randomizer
from the Zip! Zap! Zow! exercise

Spacebrew Workshop - NYU ITP - Brett Renfer
The Admin API
•

Try it out: http://bit.ly/sbslider-admin


•

Let’s look at the Admin API in Javascript

Spacebrew Workshop - NYU ITP - Brett Renfer
Jam Session

Spacebrew Workshop - NYU ITP - Brett Renfer
Assignment
•

For tomorrow:

•

option A:
• brainstorm an interaction scenario that would
require (at least) 3 separate input/output
stations
• create a prototype using spacebrew!


•

option B:
• build a prototype that physicalizes spacebrew
routes (and uses the admin API)
• demonstrate it routing/re-routing with the built
in examples

Spacebrew Workshop - NYU ITP - Brett Renfer

More Related Content

What's hot

Introduction to Docker and all things containers, Docker Meetup at RelateIQ
Introduction to Docker and all things containers, Docker Meetup at RelateIQIntroduction to Docker and all things containers, Docker Meetup at RelateIQ
Introduction to Docker and all things containers, Docker Meetup at RelateIQ
dotCloud
 
Steelcon 2014 - Process Injection with Python
Steelcon 2014 - Process Injection with PythonSteelcon 2014 - Process Injection with Python
Steelcon 2014 - Process Injection with Python
infodox
 
Perl-Critic
Perl-CriticPerl-Critic
Perl-Critic
Jonas Brømsø
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
dotCloud
 
Monitor-Driven Development Using Ansible
Monitor-Driven Development Using AnsibleMonitor-Driven Development Using Ansible
Monitor-Driven Development Using Ansible
Itamar Hassin
 
Packers
PackersPackers
Go Faster with Ansible (PHP meetup)
Go Faster with Ansible (PHP meetup)Go Faster with Ansible (PHP meetup)
Go Faster with Ansible (PHP meetup)
Richard Donkin
 
Oscar: Rapid Iteration with Vagrant and Puppet Enterprise - PuppetConf 2013
Oscar: Rapid Iteration with Vagrant and Puppet Enterprise - PuppetConf 2013Oscar: Rapid Iteration with Vagrant and Puppet Enterprise - PuppetConf 2013
Oscar: Rapid Iteration with Vagrant and Puppet Enterprise - PuppetConf 2013
Puppet
 
Habitat Overview
Habitat OverviewHabitat Overview
Habitat Overview
Mandi Walls
 
BSides Hannover 2015 - Shell on Wheels
BSides Hannover 2015 - Shell on WheelsBSides Hannover 2015 - Shell on Wheels
BSides Hannover 2015 - Shell on Wheels
infodox
 
Devel::NYTProf v3 - 200908 (OUTDATED, see 201008)
Devel::NYTProf v3 - 200908 (OUTDATED, see 201008)Devel::NYTProf v3 - 200908 (OUTDATED, see 201008)
Devel::NYTProf v3 - 200908 (OUTDATED, see 201008)
Tim Bunce
 
Vagrant and Chef on FOSSASIA 2014
Vagrant and Chef on FOSSASIA 2014Vagrant and Chef on FOSSASIA 2014
Vagrant and Chef on FOSSASIA 2014
Michael Lihs
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer Toolbox
Pablo Godel
 
Steelcon 2015 - 0wning the internet of trash
Steelcon 2015 - 0wning the internet of trashSteelcon 2015 - 0wning the internet of trash
Steelcon 2015 - 0wning the internet of trash
infodox
 
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 -  Rock Solid Deployment of Symfony AppsSymfony Live NYC 2014 -  Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
Pablo Godel
 
Vagrant, Chef and TYPO3 - A Love Affair
Vagrant, Chef and TYPO3 - A Love AffairVagrant, Chef and TYPO3 - A Love Affair
Vagrant, Chef and TYPO3 - A Love Affair
Michael Lihs
 
Expert JavaScript Programming
Expert JavaScript ProgrammingExpert JavaScript Programming
Expert JavaScript Programming
Yoshiki Shibukawa
 
DockerCon EU 2015: Finding a Theory of the Universe with Docker and Volunteer...
DockerCon EU 2015: Finding a Theory of the Universe with Docker and Volunteer...DockerCon EU 2015: Finding a Theory of the Universe with Docker and Volunteer...
DockerCon EU 2015: Finding a Theory of the Universe with Docker and Volunteer...
Docker, Inc.
 
No Docker? No Problem: Automating installation and config with Ansible
No Docker? No Problem: Automating installation and config with AnsibleNo Docker? No Problem: Automating installation and config with Ansible
No Docker? No Problem: Automating installation and config with Ansible
Jeff Potts
 

What's hot (19)

Introduction to Docker and all things containers, Docker Meetup at RelateIQ
Introduction to Docker and all things containers, Docker Meetup at RelateIQIntroduction to Docker and all things containers, Docker Meetup at RelateIQ
Introduction to Docker and all things containers, Docker Meetup at RelateIQ
 
Steelcon 2014 - Process Injection with Python
Steelcon 2014 - Process Injection with PythonSteelcon 2014 - Process Injection with Python
Steelcon 2014 - Process Injection with Python
 
Perl-Critic
Perl-CriticPerl-Critic
Perl-Critic
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Monitor-Driven Development Using Ansible
Monitor-Driven Development Using AnsibleMonitor-Driven Development Using Ansible
Monitor-Driven Development Using Ansible
 
Packers
PackersPackers
Packers
 
Go Faster with Ansible (PHP meetup)
Go Faster with Ansible (PHP meetup)Go Faster with Ansible (PHP meetup)
Go Faster with Ansible (PHP meetup)
 
Oscar: Rapid Iteration with Vagrant and Puppet Enterprise - PuppetConf 2013
Oscar: Rapid Iteration with Vagrant and Puppet Enterprise - PuppetConf 2013Oscar: Rapid Iteration with Vagrant and Puppet Enterprise - PuppetConf 2013
Oscar: Rapid Iteration with Vagrant and Puppet Enterprise - PuppetConf 2013
 
Habitat Overview
Habitat OverviewHabitat Overview
Habitat Overview
 
BSides Hannover 2015 - Shell on Wheels
BSides Hannover 2015 - Shell on WheelsBSides Hannover 2015 - Shell on Wheels
BSides Hannover 2015 - Shell on Wheels
 
Devel::NYTProf v3 - 200908 (OUTDATED, see 201008)
Devel::NYTProf v3 - 200908 (OUTDATED, see 201008)Devel::NYTProf v3 - 200908 (OUTDATED, see 201008)
Devel::NYTProf v3 - 200908 (OUTDATED, see 201008)
 
Vagrant and Chef on FOSSASIA 2014
Vagrant and Chef on FOSSASIA 2014Vagrant and Chef on FOSSASIA 2014
Vagrant and Chef on FOSSASIA 2014
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer Toolbox
 
Steelcon 2015 - 0wning the internet of trash
Steelcon 2015 - 0wning the internet of trashSteelcon 2015 - 0wning the internet of trash
Steelcon 2015 - 0wning the internet of trash
 
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 -  Rock Solid Deployment of Symfony AppsSymfony Live NYC 2014 -  Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
 
Vagrant, Chef and TYPO3 - A Love Affair
Vagrant, Chef and TYPO3 - A Love AffairVagrant, Chef and TYPO3 - A Love Affair
Vagrant, Chef and TYPO3 - A Love Affair
 
Expert JavaScript Programming
Expert JavaScript ProgrammingExpert JavaScript Programming
Expert JavaScript Programming
 
DockerCon EU 2015: Finding a Theory of the Universe with Docker and Volunteer...
DockerCon EU 2015: Finding a Theory of the Universe with Docker and Volunteer...DockerCon EU 2015: Finding a Theory of the Universe with Docker and Volunteer...
DockerCon EU 2015: Finding a Theory of the Universe with Docker and Volunteer...
 
No Docker? No Problem: Automating installation and config with Ansible
No Docker? No Problem: Automating installation and config with AnsibleNo Docker? No Problem: Automating installation and config with Ansible
No Docker? No Problem: Automating installation and config with Ansible
 

Similar to ITP Spacebrew Workshop - Spring 2014

Spacebrew: The Overview
Spacebrew: The OverviewSpacebrew: The Overview
Spacebrew: The Overview
Brett Renfer
 
Zero mq logs
Zero mq logsZero mq logs
Zero mq logs
Tomas Doran
 
OpenStack and Ceph: the Winning Pair
OpenStack and Ceph: the Winning PairOpenStack and Ceph: the Winning Pair
OpenStack and Ceph: the Winning Pair
Red_Hat_Storage
 
ASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & dockerASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & docker
Jürgen Gutsch
 
OWASP 2013 APPSEC USA ZAP Hackathon
OWASP 2013 APPSEC USA ZAP HackathonOWASP 2013 APPSEC USA ZAP Hackathon
OWASP 2013 APPSEC USA ZAP Hackathon
Simon Bennetts
 
Perl in Teh Cloud
Perl in Teh CloudPerl in Teh Cloud
Perl in Teh Cloud
Pedro Figueiredo
 
Laravel Forge: Hello World to Hello Production
Laravel Forge: Hello World to Hello ProductionLaravel Forge: Hello World to Hello Production
Laravel Forge: Hello World to Hello Production
Joe Ferguson
 
Chaione Ember.js Training
Chaione Ember.js TrainingChaione Ember.js Training
Chaione Ember.js Training
aortbals
 
미들웨어 엔지니어의 클라우드 탐방기
미들웨어 엔지니어의 클라우드 탐방기미들웨어 엔지니어의 클라우드 탐방기
미들웨어 엔지니어의 클라우드 탐방기
jbugkorea
 
Velocity 2011 Chef OpenStack Workshop
Velocity 2011 Chef OpenStack WorkshopVelocity 2011 Chef OpenStack Workshop
Velocity 2011 Chef OpenStack Workshop
Chef Software, Inc.
 
Weaponizing Recon - Smashing Applications for Security Vulnerabilities & Profits
Weaponizing Recon - Smashing Applications for Security Vulnerabilities & ProfitsWeaponizing Recon - Smashing Applications for Security Vulnerabilities & Profits
Weaponizing Recon - Smashing Applications for Security Vulnerabilities & Profits
Harsh Bothra
 
OpenWhisk Go Runtime
OpenWhisk Go RuntimeOpenWhisk Go Runtime
OpenWhisk Go Runtime
Michele Sciabarrà
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Michael Lihs
 
Great Tools Heavily Used In Japan, You Don't Know.
Great Tools Heavily Used In Japan, You Don't Know.Great Tools Heavily Used In Japan, You Don't Know.
Great Tools Heavily Used In Japan, You Don't Know.
Junichi Ishida
 
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
Gaetano Giunta
 
Quest overview
Quest overviewQuest overview
Quest overview
Adam Pah
 
ZendCon 2015 - Laravel Forge: Hello World to Hello Production
ZendCon 2015 - Laravel Forge: Hello World to Hello ProductionZendCon 2015 - Laravel Forge: Hello World to Hello Production
ZendCon 2015 - Laravel Forge: Hello World to Hello Production
Joe Ferguson
 
Hosting a Rails App
Hosting a Rails AppHosting a Rails App
Hosting a Rails App
Josh Schramm
 
Getting Started with PureScript
Getting Started with PureScriptGetting Started with PureScript
Getting Started with PureScript
John De Goes
 
What we talk about when we talk about DevOps
What we talk about when we talk about DevOpsWhat we talk about when we talk about DevOps
What we talk about when we talk about DevOps
Ricard Clau
 

Similar to ITP Spacebrew Workshop - Spring 2014 (20)

Spacebrew: The Overview
Spacebrew: The OverviewSpacebrew: The Overview
Spacebrew: The Overview
 
Zero mq logs
Zero mq logsZero mq logs
Zero mq logs
 
OpenStack and Ceph: the Winning Pair
OpenStack and Ceph: the Winning PairOpenStack and Ceph: the Winning Pair
OpenStack and Ceph: the Winning Pair
 
ASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & dockerASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & docker
 
OWASP 2013 APPSEC USA ZAP Hackathon
OWASP 2013 APPSEC USA ZAP HackathonOWASP 2013 APPSEC USA ZAP Hackathon
OWASP 2013 APPSEC USA ZAP Hackathon
 
Perl in Teh Cloud
Perl in Teh CloudPerl in Teh Cloud
Perl in Teh Cloud
 
Laravel Forge: Hello World to Hello Production
Laravel Forge: Hello World to Hello ProductionLaravel Forge: Hello World to Hello Production
Laravel Forge: Hello World to Hello Production
 
Chaione Ember.js Training
Chaione Ember.js TrainingChaione Ember.js Training
Chaione Ember.js Training
 
미들웨어 엔지니어의 클라우드 탐방기
미들웨어 엔지니어의 클라우드 탐방기미들웨어 엔지니어의 클라우드 탐방기
미들웨어 엔지니어의 클라우드 탐방기
 
Velocity 2011 Chef OpenStack Workshop
Velocity 2011 Chef OpenStack WorkshopVelocity 2011 Chef OpenStack Workshop
Velocity 2011 Chef OpenStack Workshop
 
Weaponizing Recon - Smashing Applications for Security Vulnerabilities & Profits
Weaponizing Recon - Smashing Applications for Security Vulnerabilities & ProfitsWeaponizing Recon - Smashing Applications for Security Vulnerabilities & Profits
Weaponizing Recon - Smashing Applications for Security Vulnerabilities & Profits
 
OpenWhisk Go Runtime
OpenWhisk Go RuntimeOpenWhisk Go Runtime
OpenWhisk Go Runtime
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
 
Great Tools Heavily Used In Japan, You Don't Know.
Great Tools Heavily Used In Japan, You Don't Know.Great Tools Heavily Used In Japan, You Don't Know.
Great Tools Heavily Used In Japan, You Don't Know.
 
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
 
Quest overview
Quest overviewQuest overview
Quest overview
 
ZendCon 2015 - Laravel Forge: Hello World to Hello Production
ZendCon 2015 - Laravel Forge: Hello World to Hello ProductionZendCon 2015 - Laravel Forge: Hello World to Hello Production
ZendCon 2015 - Laravel Forge: Hello World to Hello Production
 
Hosting a Rails App
Hosting a Rails AppHosting a Rails App
Hosting a Rails App
 
Getting Started with PureScript
Getting Started with PureScriptGetting Started with PureScript
Getting Started with PureScript
 
What we talk about when we talk about DevOps
What we talk about when we talk about DevOpsWhat we talk about when we talk about DevOps
What we talk about when we talk about DevOps
 

Recently uploaded

一比一原版南安普顿索伦特大学毕业证Southampton成绩单一模一样
一比一原版南安普顿索伦特大学毕业证Southampton成绩单一模一样一比一原版南安普顿索伦特大学毕业证Southampton成绩单一模一样
一比一原版南安普顿索伦特大学毕业证Southampton成绩单一模一样
3vgr39kx
 
Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page
Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page
Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page
pmgdscunsri
 
Introduction to User experience design for beginner
Introduction to User experience design for beginnerIntroduction to User experience design for beginner
Introduction to User experience design for beginner
ellemjani
 
一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样
一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样
一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样
881evgn0
 
AHMED TALAAT ARCHITECTURE PORTFOLIO .pdf
AHMED TALAAT ARCHITECTURE PORTFOLIO .pdfAHMED TALAAT ARCHITECTURE PORTFOLIO .pdf
AHMED TALAAT ARCHITECTURE PORTFOLIO .pdf
talaatahm
 
LGBTQIA Pride Month presentation Template
LGBTQIA Pride Month presentation TemplateLGBTQIA Pride Month presentation Template
LGBTQIA Pride Month presentation Template
DakshGudwani
 
UXpert_Report (UALR Mapping Renewal 2022).pdf
UXpert_Report (UALR Mapping Renewal 2022).pdfUXpert_Report (UALR Mapping Renewal 2022).pdf
UXpert_Report (UALR Mapping Renewal 2022).pdf
anthonylin333
 
Discovering the Best Indian Architects A Spotlight on Design Forum Internatio...
Discovering the Best Indian Architects A Spotlight on Design Forum Internatio...Discovering the Best Indian Architects A Spotlight on Design Forum Internatio...
Discovering the Best Indian Architects A Spotlight on Design Forum Internatio...
Designforuminternational
 
原版制作(MDIS毕业证书)新加坡管理发展学院毕业证学位证一模一样
原版制作(MDIS毕业证书)新加坡管理发展学院毕业证学位证一模一样原版制作(MDIS毕业证书)新加坡管理发展学院毕业证学位证一模一样
原版制作(MDIS毕业证书)新加坡管理发展学院毕业证学位证一模一样
hw2xf1m
 
EASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANE
EASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANEEASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANE
EASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANE
Febless Hernane
 
一比一原版阿肯色大学毕业证(UCSF毕业证书)如何办理
一比一原版阿肯色大学毕业证(UCSF毕业证书)如何办理一比一原版阿肯色大学毕业证(UCSF毕业证书)如何办理
一比一原版阿肯色大学毕业证(UCSF毕业证书)如何办理
bo44ban1
 
SECURING BUILDING PERMIT CITY OF CALOOCAN.pdf
SECURING BUILDING PERMIT CITY OF CALOOCAN.pdfSECURING BUILDING PERMIT CITY OF CALOOCAN.pdf
SECURING BUILDING PERMIT CITY OF CALOOCAN.pdf
eloprejohn333
 
Practical eLearning Makeovers for Everyone
Practical eLearning Makeovers for EveryonePractical eLearning Makeovers for Everyone
Practical eLearning Makeovers for Everyone
Bianca Woods
 
一比一原版布兰登大学毕业证(BU毕业证书)如何办理
一比一原版布兰登大学毕业证(BU毕业证书)如何办理一比一原版布兰登大学毕业证(BU毕业证书)如何办理
一比一原版布兰登大学毕业证(BU毕业证书)如何办理
wkip62b
 
Impact of Fonts: in Web and Apps Design
Impact of Fonts:  in Web and Apps DesignImpact of Fonts:  in Web and Apps Design
Impact of Fonts: in Web and Apps Design
contactproperweb2014
 
Heuristics Evaluation - How to Guide.pdf
Heuristics Evaluation - How to Guide.pdfHeuristics Evaluation - How to Guide.pdf
Heuristics Evaluation - How to Guide.pdf
Jaime Brown
 
Graphic Design Tools and Software .pptx
Graphic Design Tools and Software   .pptxGraphic Design Tools and Software   .pptx
Graphic Design Tools and Software .pptx
Virtual Real Design
 
Timeless Principles of Good Design
Timeless Principles of Good DesignTimeless Principles of Good Design
Timeless Principles of Good Design
Carolina de Bartolo
 
CocaCola_Brand_equity_package_2012__.pdf
CocaCola_Brand_equity_package_2012__.pdfCocaCola_Brand_equity_package_2012__.pdf
CocaCola_Brand_equity_package_2012__.pdf
PabloMartelLpez
 
一比一原版肯特大学毕业证UKC成绩单一模一样
一比一原版肯特大学毕业证UKC成绩单一模一样一比一原版肯特大学毕业证UKC成绩单一模一样
一比一原版肯特大学毕业证UKC成绩单一模一样
tobbk6s8
 

Recently uploaded (20)

一比一原版南安普顿索伦特大学毕业证Southampton成绩单一模一样
一比一原版南安普顿索伦特大学毕业证Southampton成绩单一模一样一比一原版南安普顿索伦特大学毕业证Southampton成绩单一模一样
一比一原版南安普顿索伦特大学毕业证Southampton成绩单一模一样
 
Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page
Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page
Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page
 
Introduction to User experience design for beginner
Introduction to User experience design for beginnerIntroduction to User experience design for beginner
Introduction to User experience design for beginner
 
一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样
一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样
一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样
 
AHMED TALAAT ARCHITECTURE PORTFOLIO .pdf
AHMED TALAAT ARCHITECTURE PORTFOLIO .pdfAHMED TALAAT ARCHITECTURE PORTFOLIO .pdf
AHMED TALAAT ARCHITECTURE PORTFOLIO .pdf
 
LGBTQIA Pride Month presentation Template
LGBTQIA Pride Month presentation TemplateLGBTQIA Pride Month presentation Template
LGBTQIA Pride Month presentation Template
 
UXpert_Report (UALR Mapping Renewal 2022).pdf
UXpert_Report (UALR Mapping Renewal 2022).pdfUXpert_Report (UALR Mapping Renewal 2022).pdf
UXpert_Report (UALR Mapping Renewal 2022).pdf
 
Discovering the Best Indian Architects A Spotlight on Design Forum Internatio...
Discovering the Best Indian Architects A Spotlight on Design Forum Internatio...Discovering the Best Indian Architects A Spotlight on Design Forum Internatio...
Discovering the Best Indian Architects A Spotlight on Design Forum Internatio...
 
原版制作(MDIS毕业证书)新加坡管理发展学院毕业证学位证一模一样
原版制作(MDIS毕业证书)新加坡管理发展学院毕业证学位证一模一样原版制作(MDIS毕业证书)新加坡管理发展学院毕业证学位证一模一样
原版制作(MDIS毕业证书)新加坡管理发展学院毕业证学位证一模一样
 
EASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANE
EASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANEEASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANE
EASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANE
 
一比一原版阿肯色大学毕业证(UCSF毕业证书)如何办理
一比一原版阿肯色大学毕业证(UCSF毕业证书)如何办理一比一原版阿肯色大学毕业证(UCSF毕业证书)如何办理
一比一原版阿肯色大学毕业证(UCSF毕业证书)如何办理
 
SECURING BUILDING PERMIT CITY OF CALOOCAN.pdf
SECURING BUILDING PERMIT CITY OF CALOOCAN.pdfSECURING BUILDING PERMIT CITY OF CALOOCAN.pdf
SECURING BUILDING PERMIT CITY OF CALOOCAN.pdf
 
Practical eLearning Makeovers for Everyone
Practical eLearning Makeovers for EveryonePractical eLearning Makeovers for Everyone
Practical eLearning Makeovers for Everyone
 
一比一原版布兰登大学毕业证(BU毕业证书)如何办理
一比一原版布兰登大学毕业证(BU毕业证书)如何办理一比一原版布兰登大学毕业证(BU毕业证书)如何办理
一比一原版布兰登大学毕业证(BU毕业证书)如何办理
 
Impact of Fonts: in Web and Apps Design
Impact of Fonts:  in Web and Apps DesignImpact of Fonts:  in Web and Apps Design
Impact of Fonts: in Web and Apps Design
 
Heuristics Evaluation - How to Guide.pdf
Heuristics Evaluation - How to Guide.pdfHeuristics Evaluation - How to Guide.pdf
Heuristics Evaluation - How to Guide.pdf
 
Graphic Design Tools and Software .pptx
Graphic Design Tools and Software   .pptxGraphic Design Tools and Software   .pptx
Graphic Design Tools and Software .pptx
 
Timeless Principles of Good Design
Timeless Principles of Good DesignTimeless Principles of Good Design
Timeless Principles of Good Design
 
CocaCola_Brand_equity_package_2012__.pdf
CocaCola_Brand_equity_package_2012__.pdfCocaCola_Brand_equity_package_2012__.pdf
CocaCola_Brand_equity_package_2012__.pdf
 
一比一原版肯特大学毕业证UKC成绩单一模一样
一比一原版肯特大学毕业证UKC成绩单一模一样一比一原版肯特大学毕业证UKC成绩单一模一样
一比一原版肯特大学毕业证UKC成绩单一模一样
 

ITP Spacebrew Workshop - Spring 2014

  • 1. Spacebrew 2/1/14 + 2/2/14 Spacebrew Workshop - NYU ITP - Brett Renfer
  • 2. Schedule Today • Now-10:30: - Quick Introductions • 10:30-12:00 - Introduction to Spacebrew • 12-12:30 - Lunch break • 12:30-2:00 - Spacebrew exercise • 2:00-3:00 - Advanced Spacebrew • 3:00-5:00 - Assignment: Brainstorm, jam session ! Tomorrow • 12:00-12:45 - Demos • 12:45-1:45 - Documentation Spacebrew Workshop - NYU ITP - Brett Renfer
  • 3. Spacebrew Basics Spacebrew Workshop - NYU ITP - Brett Renfer
  • 4. Setup Time Software Basics • Processing • Arduino • a Text Editor • openFrameworks Spacebrew
 https://github.com/Spacebrew/
 • • • • Spacebrew Workshop - NYU ITP - Brett Renfer spacebrew spacebrewP5 ofxSpacebrew • ofxLibwebsockets spacebrew.js
  • 5. Obligatory hype video! Spacebrew Workshop - NYU ITP - Brett Renfer
  • 6. Spacebrew… • is a service and toolkit for choreographing interactive spaces ! • makes it easy to connect interactive things to one another ! • was developed to support prototypingdriven design efforts Spacebrew Workshop - NYU ITP - Brett Renfer
  • 7. Client-Server Model client app client app client app Spacebrew Workshop - NYU ITP - Brett Renfer client app Each client can feature one or more publishers and subscribers. The server can be hosted online or run on a local network (more on that later).
  • 8. Client-Server Model client app client app client app Spacebrew Workshop - NYU ITP - Brett Renfer client app Clients communicate with the server via WebSockets. All data is formatted as JSON
  • 9. Client-Server Model The server routes all publishers and subscribers. Routes can be edited via a switchboard-like interface Spacebrew Workshop - NYU ITP - Brett Renfer
  • 10. = true or false = 0-1023 = “some text” Spacebrew Workshop - NYU ITP - Brett Renfer Data Types Three standard types allow for quick and easy routing. Custom types are also supported
  • 11. = true or false = 0-1023 = “some text” Spacebrew Workshop - NYU ITP - Brett Renfer Data Types Each publishers and subscribers announces its type, allowing for automatic routing between different apps
  • 12. Libraries JS Spacebrew Workshop - NYU ITP - Brett Renfer Spacebrew aims to be implementation agnostic.
 We want to use the right tools at the right time!
  • 13. Why? • We’ve used a lot of “glue” languages/ toolkits in the past, but there wasn’t one that was truly cross-platform/cross-toolkit.
 • Wanted to build a toolkit with a low floor and a high ceiling: easy for speed prototypes, advanced enough to handle commercial applications. Spacebrew Workshop - NYU ITP - Brett Renfer
  • 14. Using Spacebrew Spacebrew Workshop - NYU ITP - Brett Renfer
  • 15. Spacebrew Libraries Each Spacebrew library: • Connects to a Spacebrew server via WebSockets • Has an API to declare its publisher(s) and subscriber(s) • Receives messages from Spacebrew and dispatches events accordingly Spacebrew Workshop - NYU ITP - Brett Renfer
  • 16. Spacebrew Libraries Connecting to Spacebrew in each Library • Create a Spacebrew Object • Tell your object the IP or hostname of the Spacebrew server • Declare any publishers and subscribers • Connect Spacebrew Workshop - NYU ITP - Brett Renfer
  • 17. Spacebrew + Processing • spacebrewP5 is a Spacebrew-supported library
 • install the library at 
 ~/Documents/Processing/libraries 
 (make the folder if it doesn’t exist!)
 • restart Processing if it was open
 • open the spacebrew_base example to get started! Spacebrew Workshop - NYU ITP - Brett Renfer
  • 18. Spacebrew + Javascript • spacebrew.js is a stand-alone script that can run in any browser that supports WebSockets
 • this includes: Chrome (OS X, Windows, Android, iOS), Safari (OS X, iOS), Firefox, Opera, IE 10
 • open the spacebrew slider example in your text editor
 • open http://bit.ly/sbslide on your smartphone
 • also try http://bit.ly/sbaccel Spacebrew Workshop - NYU ITP - Brett Renfer
  • 19. Spacebrew + openFrameworks • ofxSpacebrew connects to Spacebrew via ofxLibwebsockets
 • once you have both installed, you can create ofxSpacebrew projects via the OF project generator
 • let’s look at example_button Spacebrew Workshop - NYU ITP - Brett Renfer
  • 20. Spacebrew + Arduino • Two routes:
 • the easy road: use Processing + Serial
 • the road less travelled: Spacebrew Arduino lib
 
 http://github.com/labatrockwell/spacebrew-arduino-library
 • • Spacebrew Workshop - NYU ITP - Brett Renfer requires Arduino Ethernet shield notoriously difficult to debug!
  • 21. Thinking About Apps • We try to silo apps whenever possible • Create specialized apps that are easy to re-use • Allows for multiple languages for each need • Quickly and easily move between machines/ networks when necessary • Allows for easy prototypes in the future! Spacebrew Workshop - NYU ITP - Brett Renfer
  • 22. Questions? Spacebrew Workshop - NYU ITP - Brett Renfer
  • 23. Lunch O’Clock Spacebrew Workshop - NYU ITP - Brett Renfer
  • 24. Zip! Zap! Zow! Everybody stand up! Spacebrew Workshop - NYU ITP - Brett Renfer
  • 25. Exercise Zip! Zap! Zow! 2.0 Spacebrew Workshop - NYU ITP - Brett Renfer
  • 26. ZZZ2.0 • use any library you wish ! • create an app that has one publisher and one subscriber, both of which are range type
 • Your app must change states when it receives a range. 
 • Your app must have a trigger to send out its value! (e.g. mouse click, key press, sensor read) Spacebrew Workshop - NYU ITP - Brett Renfer
  • 27. Custom Types Spacebrew Workshop - NYU ITP - Brett Renfer
  • 28. Custom Types • Spacebrew supports arbitrary type names and data (anything that reads as valid JSON will work) ! • Similar to built-in types, you can only route to matching names (e.g. we might know that “float” could probably route to “int”, but to Spacebrew they’re wholly different) Spacebrew Workshop - NYU ITP - Brett Renfer
  • 29. Spacebrew Workshop - NYU ITP - Brett Renfer
  • 30. Example: Ultrabook Tree • Each input station sent a custom “bloom” object: • Which image (id) • Number of laptops • Radius • Relative position (x,y) • Velocity • Rotation Spacebrew Workshop - NYU ITP - Brett Renfer
  • 31. Quick Brainstorm • What are some scenarios you might use custom types for? Spacebrew Workshop - NYU ITP - Brett Renfer
  • 32. Custom Type Demo • JSON in spacebrew.js, ofxSpacebrew, and spacebrewP5 ! • Why JSON? • It’s a simple way to send arbitrary objects • Spacebrew uses it, so all libs have some sort of JSON library included (if there isn’t one built in) Spacebrew Workshop - NYU ITP - Brett Renfer
  • 33. You Got Served Spacebrew Workshop - NYU ITP - Brett Renfer
  • 34. Running Your Own Server • Why?
 • sandbox.spacebrew.cc is on the slowest AWS tier ! • Running over the internet introduces some level of latency ! • Running a local server OR a remote server allows a level of control: only people you choose can route/reroute, break your routes, etc ! • Allows you to customize the server code if 
 you choose! Spacebrew Workshop - NYU ITP - Brett Renfer
  • 35. Running Your Own Server • How? ! • Setup! Only needs to be done once
 • Download and install nodejs: www.nodejs.org ! • Install node dependencies: ! • • Spacebrew Workshop - NYU ITP - Brett Renfer npm install ws npm install forever-monitor
  • 36. Running Your Own Server • How? ! • Run! What you’ll do every time:
 • In terminal, cd to the spacebrew directory ! • Run: node node_server_forever.js Spacebrew Workshop - NYU ITP - Brett Renfer
  • 37. Running Your Own Server • How? ! • If you want to set up your own remote server, we recommend this tutorial (by fellow ITPers!):
 https://vimeo.com/60001410 Spacebrew Workshop - NYU ITP - Brett Renfer
  • 38. Persistence • Another advantage of running your own server is you can use the persistent admin ! • The persistent admin is a separate service that lets you edit, save, load, and persist routes ! • It allows you to specify specific app routings:
 coolApp -> coolPub to lameApp -> lameSub ! • It also allows for powerful wild card routings:
 .* -> coolPub to .* -> lameSub ! • Spacebrew Workshop - NYU ITP - Brett Renfer This routes any app that publishes “coolPub” to any other app that subscribes to “lameSub”
  • 39. Persistence • You can run the persistent admin from the spacebrew directory:
 node node_persistent_admin.js ! • From the command line, you can list, add, remove, load, and save routes: ! • list: ls
 • add: add client1Name,pub,client2Name,sub • use .* to create a wildcard
 • remove: remove [index] • you can find an index after add or by listing
 • save / load (just that!) • load is called on start automatically Spacebrew Workshop - NYU ITP - Brett Renfer
  • 40. Admin Spacebrew Workshop - NYU ITP - Brett Renfer
  • 41. The Admin API • You don’t just have to use our web interface! ! • Javascript, openFrameworks and Cinder (Processing soon) support the Admin API ! • The Admin API subscribes to Spacebrew similar to a client, firing events each time a client connects/ disconnects or changes its pub/sub map ! • It allows you to view, edit, and add any and all routes in real time! ! • This allows for apps like the Admin Randomizer from the Zip! Zap! Zow! exercise Spacebrew Workshop - NYU ITP - Brett Renfer
  • 42. The Admin API • Try it out: http://bit.ly/sbslider-admin
 • Let’s look at the Admin API in Javascript Spacebrew Workshop - NYU ITP - Brett Renfer
  • 43. Jam Session Spacebrew Workshop - NYU ITP - Brett Renfer
  • 44. Assignment • For tomorrow:
 • option A: • brainstorm an interaction scenario that would require (at least) 3 separate input/output stations • create a prototype using spacebrew!
 • option B: • build a prototype that physicalizes spacebrew routes (and uses the admin API) • demonstrate it routing/re-routing with the built in examples Spacebrew Workshop - NYU ITP - Brett Renfer