Embedded JavaScript:
The skills you have in 2014 will be
all you need to make physical
devices
Tim Ryan, Co-Founder / Deve...
Tessel is a WiFi-enabled
microcontroller that runs
JavaScript.
Tim Ryan, Co-Founder / Software Developer Technical Machine
Embedded JavaScript
High-level != Developer-friendly
Open Source Hardware
2005
2014
20052003 2005
20052003 2005
~2010
Microcontrollers
8-bit 32-bit
We can today
afford the processing power
to make developers’ lives easier.
$4 @1K
$11 @1K
Why JavaScript?
JavaScript (and asynchronous
coding) is the perfect embedded
language!
JavaScript (and asynchronous
coding) is the perfect embedded
language!
—Sylvia Plath
Ethernet
TCP
HTTP
Ethernet
TCP
HTTP
(Packet-based)
(Stream-based)
(Packet-based)
Ethernet
TCP
HTTP
Websockets
(Packet-based)
(Stream-based)
(Packet-based)
(Streaming…)
def receive_packet():
buf = sock.recv()
return buf
while True:
print(receive_packet())
Future<byte[]> p =
pool.submit(new Callable<byte[]>() {
public byte[] call() {
return socket.recv();
}
}
// ... while wait...
socket.on(‘data’,
function (data) {
// handle data buffer
});
// ... other code ...
Inventing the Universe
● Chrome’s JS engine
● C++
● ~10mb memory
required for each
instance
● POSIX/Win32
environment
● Embeddable
language
● Written in C
● ~30kb memory
● Highly portable
● Embeddable
language
● Written in C
● ~30kb memory
● Highly portable
● 4x-60x slower
JS VM
HTTP Parsing
DNS
SSL
Memory management
Filesystem Tar
JSON
Unicode
TCP/IP
JS VM
HTTP Parsing
DNS
SSL
Memory management
Filesystem Tar
JSON
Unicode
TCP/IP
tessel/colony
wecing/utf8proc
lloyd/yajl
b...
(When reinventing everything,
reuse as much as possible.)
What Comes Next
It’s becoming feasible to embed in
every product a microcontroller
powerful enough to run a high level
language.
HTTP
HTTP
SPI
I2C
UART
Be bold!
Be courageous!
Be amazing!
Be bold!
Be courageous!
Be amazing!
Build robots!
Be bold!
Be courageous!
Be amazing!
Build robots!
— Sylvia Plath
tim@technical.io @technicalhumans
http://tessel.io
Embedded JavaScript (FluentConf 2014)
Embedded JavaScript (FluentConf 2014)
Embedded JavaScript (FluentConf 2014)
Embedded JavaScript (FluentConf 2014)
Embedded JavaScript (FluentConf 2014)
Embedded JavaScript (FluentConf 2014)
Embedded JavaScript (FluentConf 2014)
Embedded JavaScript (FluentConf 2014)
Embedded JavaScript (FluentConf 2014)
Embedded JavaScript (FluentConf 2014)
Embedded JavaScript (FluentConf 2014)
Embedded JavaScript (FluentConf 2014)
Embedded JavaScript (FluentConf 2014)
Embedded JavaScript (FluentConf 2014)
Embedded JavaScript (FluentConf 2014)
Embedded JavaScript (FluentConf 2014)
Embedded JavaScript (FluentConf 2014)
Embedded JavaScript (FluentConf 2014)
Embedded JavaScript (FluentConf 2014)
Embedded JavaScript (FluentConf 2014)
Embedded JavaScript (FluentConf 2014)
Embedded JavaScript (FluentConf 2014)
Embedded JavaScript (FluentConf 2014)
Upcoming SlideShare
Loading in …5
×

Embedded JavaScript (FluentConf 2014)

2,444 views

Published on

The skills you have in 2014 are all you'll need to make physical devices. Learn more at http://tessel.io

Published in: Devices & Hardware

Embedded JavaScript (FluentConf 2014)

  1. 1. Embedded JavaScript: The skills you have in 2014 will be all you need to make physical devices Tim Ryan, Co-Founder / Developer Technical Machine
  2. 2. Tessel is a WiFi-enabled microcontroller that runs JavaScript. Tim Ryan, Co-Founder / Software Developer Technical Machine
  3. 3. Embedded JavaScript
  4. 4. High-level != Developer-friendly
  5. 5. Open Source Hardware
  6. 6. 2005 2014
  7. 7. 20052003 2005
  8. 8. 20052003 2005
  9. 9. ~2010
  10. 10. Microcontrollers
  11. 11. 8-bit 32-bit
  12. 12. We can today afford the processing power to make developers’ lives easier.
  13. 13. $4 @1K $11 @1K
  14. 14. Why JavaScript?
  15. 15. JavaScript (and asynchronous coding) is the perfect embedded language!
  16. 16. JavaScript (and asynchronous coding) is the perfect embedded language! —Sylvia Plath
  17. 17. Ethernet TCP HTTP
  18. 18. Ethernet TCP HTTP (Packet-based) (Stream-based) (Packet-based)
  19. 19. Ethernet TCP HTTP Websockets (Packet-based) (Stream-based) (Packet-based) (Streaming…)
  20. 20. def receive_packet(): buf = sock.recv() return buf while True: print(receive_packet())
  21. 21. Future<byte[]> p = pool.submit(new Callable<byte[]>() { public byte[] call() { return socket.recv(); } } // ... while waiting ... p.get();
  22. 22. socket.on(‘data’, function (data) { // handle data buffer }); // ... other code ...
  23. 23. Inventing the Universe
  24. 24. ● Chrome’s JS engine ● C++ ● ~10mb memory required for each instance ● POSIX/Win32 environment
  25. 25. ● Embeddable language ● Written in C ● ~30kb memory ● Highly portable
  26. 26. ● Embeddable language ● Written in C ● ~30kb memory ● Highly portable ● 4x-60x slower
  27. 27. JS VM HTTP Parsing DNS SSL Memory management Filesystem Tar JSON Unicode TCP/IP
  28. 28. JS VM HTTP Parsing DNS SSL Memory management Filesystem Tar JSON Unicode TCP/IP tessel/colony wecing/utf8proc lloyd/yajl bagder/c-ares dsheets/axtls joyent/http-parser abbrev/fatfs colorer/dlmalloc
  29. 29. (When reinventing everything, reuse as much as possible.)
  30. 30. What Comes Next
  31. 31. It’s becoming feasible to embed in every product a microcontroller powerful enough to run a high level language.
  32. 32. HTTP
  33. 33. HTTP SPI I2C UART
  34. 34. Be bold! Be courageous! Be amazing!
  35. 35. Be bold! Be courageous! Be amazing! Build robots!
  36. 36. Be bold! Be courageous! Be amazing! Build robots! — Sylvia Plath
  37. 37. tim@technical.io @technicalhumans http://tessel.io

×