SlideShare a Scribd company logo
1 of 34
Download to read offline
Ruby on Embedded
Devices
What is kinko.me
4 PGP-based email encryption
4 for your desktop and your mobiles
4 with your current email address
Also
4 comes on a dedicated device
ssshhh...
as of this afternoon we are crowdfunding.
Feel invited to check https://getkinko.com
Hardware
4 A10 1GHz Cortex-A8 ARMv7 CPU, VFPv3,
NEON, Mali 400 GPU, CedarX VPU
4 512MB DDR3 RAM memory
4 SD storage
Compared to modern machines
4 CPU: 10x
4 IO throughput: ~50x
(RAM is ok, though)
Is this good enough?
4 Compared to Intel 386: yes
4 Compared with servers: a different usage
patterns
4 low traffic volume
4 few requests to HTTPS frontend
Herding cats
Existing projects
4 nginx/dovecot: HTTP + IMAP servers (C)
4 GnuPG: PGP encryption (C)
4 imapsync: IMAP synchronization
(Python)
4 bonjour, monit (C)
4 OpenSSH: tunnelling (C/ruby)
4 roundcube webmail: Webmail (PHP)
+ not so secret sauce
4 imapsync patch (Python)
4 configuration frontend (Ruby)
4 smtp server + client (Go)
4 installer (Ruby+Shell)
4 gluing code: (Ruby, Shell, C, Flex)
Why Ruby?
4 greatest language in the world
4 good network libraries
4 platform independent, kind of
4 Sinatra rocks
Why not Ruby?
gems + bundler
gems, bundler and all that mess
4 gems are platform independent. Well,
mostly.
4 bundler: hard to manage over accounts
Performance
4 once started performance is ok:
4 ~10 to 20 pages rendered per second
4 startup performance is really bad:
4 starting a sinatra/ActiveRecord app:
~15 seconds
Performance Ruby vs C
# ~30 msecs
date
# ~150 msecs
ruby -e 'puts Time.now'
Lessons learned
4 Configuration UI in ruby/sinatra (for
now)
4 everything else: mostly not.
Tipps & Tricks
1. UN*X is your friend
UN*X is your friend
4 caching: file system cache
4 resources: cleans up after you
4 shared storage: file system
4 built-in authentication: users + groups
4 also: ulimit, chroot, etc.
... Don't rebuild it in ruby
A custom logger in ruby:
logger = Logger.new("#{Rails.root}/log/custom.log", 'daily')
logger.formatter = proc do |severity, time, _, msg|
"#{time.strftime("%B %d %H:%M:%S")} #{severity} #{msg}n"
end
config.logger = logger
... Don't rebuild it in ruby, pt. 2
A custom logger in external application:
reader, writer = IO.pipe
fork do
Process.setpgrp
STDIN.reopen reader
writer.close
exec("timestamp")
end
STDOUT.reopen writer
STDERR.reopen writer
reader.close
... Don't rebuild it in ruby, pt. 3
or simply:
rackup 2>&1 | timestamp
... Don't rebuild it
ditto:
4 daemons
4 process management
4 etc.
(Hello devops!)
2. Alternative Languages
fast and "portable": bash
#!/bin/bash
set -eu
set -o pipefail
echo "Yay!"
Commands are (sometimes) not portable:
echo -n "Is there a newline?"
small & fast: C
POSIX at your fingertips.
4 fast
4 small
4 source: somewhat portable; '#ifdef
linux' FTW!
Pattern matching: flex
Pattern matching done quickly; in portable
source code.
/* Replaces ${{NAME}} from the environment */
${{[a-zA-Z0-9_]+}} {
yytext[yyleng-2] = 0;
const char* env = yytext+3;
const char* value = getenv(env);
printf("%s", value ? value : "");
}
networking: Go
Go, the environment
4 fast, portable source
4 good networking + email libraries (even
SSH!)
4 crosscompiling: easy
Go, the language
4 terrible.
jit: Distribute scripted binaries
Use jit!
http://github.com/radiospiel/jit
4 Works with C, flex, Go
4 Compiles just in or ahead of time
4 Native speed
(Built in bash, BTW)
jit: C Example
Source:
#!/usr/bin/env jit.cc
#include <stdio.h>
void main() {
printf("Hello world!n");
}
Run:
chmod +755 hello
./hello
Links
4 flex: http://flex.sourceforge.net/
4 jit: http://github.com/radiospiel/jit
We are crowdfunding.
https://getkinko.com
Ruby on Embedded Devices for Encrypted Email

More Related Content

What's hot

Centralized Logging with syslog
Centralized Logging with syslogCentralized Logging with syslog
Centralized Logging with syslogamiable_indian
 
Using the command line on macOS
Using the command line on macOSUsing the command line on macOS
Using the command line on macOSAdamFallon4
 
Odoo Online platform: architecture and challenges
Odoo Online platform: architecture and challengesOdoo Online platform: architecture and challenges
Odoo Online platform: architecture and challengesOdoo
 
Basic command ppt
Basic command pptBasic command ppt
Basic command pptRohit Kumar
 
The Linux Command Cheat Sheet
The Linux Command Cheat SheetThe Linux Command Cheat Sheet
The Linux Command Cheat SheetTola LENG
 
Mastering JUNOS DHCP
Mastering JUNOS DHCPMastering JUNOS DHCP
Mastering JUNOS DHCPZenSekibe
 
How to Leverage Go for Your Networking Needs
How to Leverage Go for Your Networking NeedsHow to Leverage Go for Your Networking Needs
How to Leverage Go for Your Networking NeedsDigitalOcean
 
Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017
Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017
Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017Codemotion
 
Spatial MongoDB, Node.JS, and Express - server-side JS for your application
Spatial MongoDB, Node.JS, and Express - server-side JS for your applicationSpatial MongoDB, Node.JS, and Express - server-side JS for your application
Spatial MongoDB, Node.JS, and Express - server-side JS for your applicationSteven Pousty
 
HTTP::Parser::XS - writing a fast & secure XS module
HTTP::Parser::XS - writing a fast & secure XS moduleHTTP::Parser::XS - writing a fast & secure XS module
HTTP::Parser::XS - writing a fast & secure XS moduleKazuho Oku
 
Script for the geomeetup presentation
Script for the geomeetup presentationScript for the geomeetup presentation
Script for the geomeetup presentationSteven Pousty
 
Bsdtw17: mariusz zaborski: case studies of sandboxing base system with capsicum
Bsdtw17: mariusz zaborski: case studies of sandboxing base system with capsicumBsdtw17: mariusz zaborski: case studies of sandboxing base system with capsicum
Bsdtw17: mariusz zaborski: case studies of sandboxing base system with capsicumScott Tsai
 
Linux basics and commands - from lynxbee.com
Linux basics and commands - from lynxbee.comLinux basics and commands - from lynxbee.com
Linux basics and commands - from lynxbee.comGreen Ecosystem
 
Quick Guide with Linux Command Line
Quick Guide with Linux Command LineQuick Guide with Linux Command Line
Quick Guide with Linux Command LineAnuchit Chalothorn
 
MongoSF - Spatial MongoDB in OpenShift - script file
MongoSF - Spatial MongoDB in OpenShift - script fileMongoSF - Spatial MongoDB in OpenShift - script file
MongoSF - Spatial MongoDB in OpenShift - script fileSteven Pousty
 
Gsummit apis-2013
Gsummit apis-2013Gsummit apis-2013
Gsummit apis-2013Gluster.org
 
Bartosz Zaczyński (Grand Parade Poland) - WebSocket for Dummies
Bartosz Zaczyński (Grand Parade Poland) - WebSocket for DummiesBartosz Zaczyński (Grand Parade Poland) - WebSocket for Dummies
Bartosz Zaczyński (Grand Parade Poland) - WebSocket for DummiesBusiness Link Krakow
 

What's hot (20)

Centralized Logging with syslog
Centralized Logging with syslogCentralized Logging with syslog
Centralized Logging with syslog
 
Using the command line on macOS
Using the command line on macOSUsing the command line on macOS
Using the command line on macOS
 
Linux file commands
Linux file commandsLinux file commands
Linux file commands
 
Odoo Online platform: architecture and challenges
Odoo Online platform: architecture and challengesOdoo Online platform: architecture and challenges
Odoo Online platform: architecture and challenges
 
Basic command ppt
Basic command pptBasic command ppt
Basic command ppt
 
The Linux Command Cheat Sheet
The Linux Command Cheat SheetThe Linux Command Cheat Sheet
The Linux Command Cheat Sheet
 
Mastering JUNOS DHCP
Mastering JUNOS DHCPMastering JUNOS DHCP
Mastering JUNOS DHCP
 
3 technical-dns-workshop-day2
3 technical-dns-workshop-day23 technical-dns-workshop-day2
3 technical-dns-workshop-day2
 
How to Leverage Go for Your Networking Needs
How to Leverage Go for Your Networking NeedsHow to Leverage Go for Your Networking Needs
How to Leverage Go for Your Networking Needs
 
Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017
Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017
Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017
 
Spatial MongoDB, Node.JS, and Express - server-side JS for your application
Spatial MongoDB, Node.JS, and Express - server-side JS for your applicationSpatial MongoDB, Node.JS, and Express - server-side JS for your application
Spatial MongoDB, Node.JS, and Express - server-side JS for your application
 
HTTP::Parser::XS - writing a fast & secure XS module
HTTP::Parser::XS - writing a fast & secure XS moduleHTTP::Parser::XS - writing a fast & secure XS module
HTTP::Parser::XS - writing a fast & secure XS module
 
Script for the geomeetup presentation
Script for the geomeetup presentationScript for the geomeetup presentation
Script for the geomeetup presentation
 
Bsdtw17: mariusz zaborski: case studies of sandboxing base system with capsicum
Bsdtw17: mariusz zaborski: case studies of sandboxing base system with capsicumBsdtw17: mariusz zaborski: case studies of sandboxing base system with capsicum
Bsdtw17: mariusz zaborski: case studies of sandboxing base system with capsicum
 
Linux basics and commands - from lynxbee.com
Linux basics and commands - from lynxbee.comLinux basics and commands - from lynxbee.com
Linux basics and commands - from lynxbee.com
 
Dns
DnsDns
Dns
 
Quick Guide with Linux Command Line
Quick Guide with Linux Command LineQuick Guide with Linux Command Line
Quick Guide with Linux Command Line
 
MongoSF - Spatial MongoDB in OpenShift - script file
MongoSF - Spatial MongoDB in OpenShift - script fileMongoSF - Spatial MongoDB in OpenShift - script file
MongoSF - Spatial MongoDB in OpenShift - script file
 
Gsummit apis-2013
Gsummit apis-2013Gsummit apis-2013
Gsummit apis-2013
 
Bartosz Zaczyński (Grand Parade Poland) - WebSocket for Dummies
Bartosz Zaczyński (Grand Parade Poland) - WebSocket for DummiesBartosz Zaczyński (Grand Parade Poland) - WebSocket for Dummies
Bartosz Zaczyński (Grand Parade Poland) - WebSocket for Dummies
 

Viewers also liked

COXO Digital credentials
COXO Digital credentialsCOXO Digital credentials
COXO Digital credentialsCOXO
 
Munkh ts.hicheel
Munkh ts.hicheelMunkh ts.hicheel
Munkh ts.hicheelgerlee1981
 
In what ways does your media product use mag (1)
In what ways does your media product use mag (1)In what ways does your media product use mag (1)
In what ways does your media product use mag (1)darakolajo
 
Visteon final.pdf presentation
Visteon final.pdf presentationVisteon final.pdf presentation
Visteon final.pdf presentationSuzie Are
 
In what ways does your media product use
In what ways does your media product useIn what ways does your media product use
In what ways does your media product usesarahbiswell
 
Geriin daalgavaruud
Geriin daalgavaruudGeriin daalgavaruud
Geriin daalgavaruudgerlee1981
 
Research into TV Listing Guides
Research into TV Listing GuidesResearch into TV Listing Guides
Research into TV Listing GuidesHarriet Trayling
 
Social Media: Creating an Effective Digital Strategy
Social Media: Creating an Effective Digital StrategySocial Media: Creating an Effective Digital Strategy
Social Media: Creating an Effective Digital StrategyBare Knuckle Digital
 
هيا نطير الطيارة الورقية
هيا نطير الطيارة الورقيةهيا نطير الطيارة الورقية
هيا نطير الطيارة الورقيةnaila600
 
2011
20112011
2011BU052
 
Android platform
Android platformAndroid platform
Android platformmaya_slides
 
스파이럴캣츠 등급제1 수정안
스파이럴캣츠 등급제1 수정안스파이럴캣츠 등급제1 수정안
스파이럴캣츠 등급제1 수정안Geonyeong Ju
 
கிரிமினல் குற்றவாளிகளின் தந்திரங்கள் Criminal focus
கிரிமினல் குற்றவாளிகளின் தந்திரங்கள்  Criminal focusகிரிமினல் குற்றவாளிகளின் தந்திரங்கள்  Criminal focus
கிரிமினல் குற்றவாளிகளின் தந்திரங்கள் Criminal focusNarayanasamy Prasannam
 

Viewers also liked (20)

COXO Digital credentials
COXO Digital credentialsCOXO Digital credentials
COXO Digital credentials
 
Reddiar mail inside and cover
Reddiar mail inside and coverReddiar mail inside and cover
Reddiar mail inside and cover
 
Munkh ts.hicheel
Munkh ts.hicheelMunkh ts.hicheel
Munkh ts.hicheel
 
Research into TV Guides
Research into TV GuidesResearch into TV Guides
Research into TV Guides
 
In what ways does your media product use mag (1)
In what ways does your media product use mag (1)In what ways does your media product use mag (1)
In what ways does your media product use mag (1)
 
Visteon final.pdf presentation
Visteon final.pdf presentationVisteon final.pdf presentation
Visteon final.pdf presentation
 
09 sollisellalamay tamil
09 sollisellalamay tamil09 sollisellalamay tamil
09 sollisellalamay tamil
 
Evaluation q1
Evaluation q1Evaluation q1
Evaluation q1
 
In what ways does your media product use
In what ways does your media product useIn what ways does your media product use
In what ways does your media product use
 
Geriin daalgavaruud
Geriin daalgavaruudGeriin daalgavaruud
Geriin daalgavaruud
 
Saioa p54
Saioa p54Saioa p54
Saioa p54
 
Unit 4 project 2
Unit 4 project 2Unit 4 project 2
Unit 4 project 2
 
Moms tamil
Moms tamilMoms tamil
Moms tamil
 
Research into TV Listing Guides
Research into TV Listing GuidesResearch into TV Listing Guides
Research into TV Listing Guides
 
Social Media: Creating an Effective Digital Strategy
Social Media: Creating an Effective Digital StrategySocial Media: Creating an Effective Digital Strategy
Social Media: Creating an Effective Digital Strategy
 
هيا نطير الطيارة الورقية
هيا نطير الطيارة الورقيةهيا نطير الطيارة الورقية
هيا نطير الطيارة الورقية
 
2011
20112011
2011
 
Android platform
Android platformAndroid platform
Android platform
 
스파이럴캣츠 등급제1 수정안
스파이럴캣츠 등급제1 수정안스파이럴캣츠 등급제1 수정안
스파이럴캣츠 등급제1 수정안
 
கிரிமினல் குற்றவாளிகளின் தந்திரங்கள் Criminal focus
கிரிமினல் குற்றவாளிகளின் தந்திரங்கள்  Criminal focusகிரிமினல் குற்றவாளிகளின் தந்திரங்கள்  Criminal focus
கிரிமினல் குற்றவாளிகளின் தந்திரங்கள் Criminal focus
 

Similar to Ruby on Embedded Devices for Encrypted Email

Application Logging in the 21st century - 2014.key
Application Logging in the 21st century - 2014.keyApplication Logging in the 21st century - 2014.key
Application Logging in the 21st century - 2014.keyTim Bunce
 
Php through the eyes of a hoster
Php through the eyes of a hosterPhp through the eyes of a hoster
Php through the eyes of a hosterCombell NV
 
Linux Server Deep Dives (DrupalCon Amsterdam)
Linux Server Deep Dives (DrupalCon Amsterdam)Linux Server Deep Dives (DrupalCon Amsterdam)
Linux Server Deep Dives (DrupalCon Amsterdam)Amin Astaneh
 
Open erp on ubuntu
Open erp on ubuntuOpen erp on ubuntu
Open erp on ubuntuIker Coranti
 
Death matchtournament del2014
Death matchtournament del2014Death matchtournament del2014
Death matchtournament del2014Nabil Munawar
 
Nagios Conference 2014 - Rob Hassing - How To Maintain Over 20 Monitoring App...
Nagios Conference 2014 - Rob Hassing - How To Maintain Over 20 Monitoring App...Nagios Conference 2014 - Rob Hassing - How To Maintain Over 20 Monitoring App...
Nagios Conference 2014 - Rob Hassing - How To Maintain Over 20 Monitoring App...Nagios
 
Interoperable PHP
Interoperable PHPInteroperable PHP
Interoperable PHPweltling
 
Php through the eyes of a hoster phpbnl11
Php through the eyes of a hoster phpbnl11Php through the eyes of a hoster phpbnl11
Php through the eyes of a hoster phpbnl11Combell NV
 
Open Source Logging and Metrics Tools
Open Source Logging and Metrics ToolsOpen Source Logging and Metrics Tools
Open Source Logging and Metrics ToolsPhase2
 
Open Source Logging and Monitoring Tools
Open Source Logging and Monitoring ToolsOpen Source Logging and Monitoring Tools
Open Source Logging and Monitoring ToolsPhase2
 
Ngrep commands
Ngrep commandsNgrep commands
Ngrep commandsRishu Seth
 
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...Nagios
 
Talk 160920 @ Cat System Workshop
Talk 160920 @ Cat System WorkshopTalk 160920 @ Cat System Workshop
Talk 160920 @ Cat System WorkshopQuey-Liang Kao
 
Don’t turn your logs into cuneiform
Don’t turn your logs into cuneiformDon’t turn your logs into cuneiform
Don’t turn your logs into cuneiformAndrey Rebrov
 
Servers and Processes: Behavior and Analysis
Servers and Processes: Behavior and AnalysisServers and Processes: Behavior and Analysis
Servers and Processes: Behavior and Analysisdreamwidth
 
Php Inside - confoo 2011 - Derick Rethans
Php Inside -  confoo 2011 - Derick RethansPhp Inside -  confoo 2011 - Derick Rethans
Php Inside - confoo 2011 - Derick RethansBachkoutou Toutou
 
Compiling P4 to XDP, IOVISOR Summit 2017
Compiling P4 to XDP, IOVISOR Summit 2017Compiling P4 to XDP, IOVISOR Summit 2017
Compiling P4 to XDP, IOVISOR Summit 2017Cheng-Chun William Tu
 
Unraveling Docker Security: Lessons From a Production Cloud
Unraveling Docker Security: Lessons From a Production CloudUnraveling Docker Security: Lessons From a Production Cloud
Unraveling Docker Security: Lessons From a Production CloudSalman Baset
 

Similar to Ruby on Embedded Devices for Encrypted Email (20)

Application Logging in the 21st century - 2014.key
Application Logging in the 21st century - 2014.keyApplication Logging in the 21st century - 2014.key
Application Logging in the 21st century - 2014.key
 
Php through the eyes of a hoster
Php through the eyes of a hosterPhp through the eyes of a hoster
Php through the eyes of a hoster
 
Linux Server Deep Dives (DrupalCon Amsterdam)
Linux Server Deep Dives (DrupalCon Amsterdam)Linux Server Deep Dives (DrupalCon Amsterdam)
Linux Server Deep Dives (DrupalCon Amsterdam)
 
Open erp on ubuntu
Open erp on ubuntuOpen erp on ubuntu
Open erp on ubuntu
 
Death matchtournament del2014
Death matchtournament del2014Death matchtournament del2014
Death matchtournament del2014
 
Penetration Testing Boot CAMP
Penetration Testing Boot CAMPPenetration Testing Boot CAMP
Penetration Testing Boot CAMP
 
Nagios Conference 2014 - Rob Hassing - How To Maintain Over 20 Monitoring App...
Nagios Conference 2014 - Rob Hassing - How To Maintain Over 20 Monitoring App...Nagios Conference 2014 - Rob Hassing - How To Maintain Over 20 Monitoring App...
Nagios Conference 2014 - Rob Hassing - How To Maintain Over 20 Monitoring App...
 
Interoperable PHP
Interoperable PHPInteroperable PHP
Interoperable PHP
 
Php through the eyes of a hoster phpbnl11
Php through the eyes of a hoster phpbnl11Php through the eyes of a hoster phpbnl11
Php through the eyes of a hoster phpbnl11
 
Open Source Logging and Metrics Tools
Open Source Logging and Metrics ToolsOpen Source Logging and Metrics Tools
Open Source Logging and Metrics Tools
 
Open Source Logging and Monitoring Tools
Open Source Logging and Monitoring ToolsOpen Source Logging and Monitoring Tools
Open Source Logging and Monitoring Tools
 
Ngrep commands
Ngrep commandsNgrep commands
Ngrep commands
 
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
 
Talk 160920 @ Cat System Workshop
Talk 160920 @ Cat System WorkshopTalk 160920 @ Cat System Workshop
Talk 160920 @ Cat System Workshop
 
Don’t turn your logs into cuneiform
Don’t turn your logs into cuneiformDon’t turn your logs into cuneiform
Don’t turn your logs into cuneiform
 
Logstash
LogstashLogstash
Logstash
 
Servers and Processes: Behavior and Analysis
Servers and Processes: Behavior and AnalysisServers and Processes: Behavior and Analysis
Servers and Processes: Behavior and Analysis
 
Php Inside - confoo 2011 - Derick Rethans
Php Inside -  confoo 2011 - Derick RethansPhp Inside -  confoo 2011 - Derick Rethans
Php Inside - confoo 2011 - Derick Rethans
 
Compiling P4 to XDP, IOVISOR Summit 2017
Compiling P4 to XDP, IOVISOR Summit 2017Compiling P4 to XDP, IOVISOR Summit 2017
Compiling P4 to XDP, IOVISOR Summit 2017
 
Unraveling Docker Security: Lessons From a Production Cloud
Unraveling Docker Security: Lessons From a Production CloudUnraveling Docker Security: Lessons From a Production Cloud
Unraveling Docker Security: Lessons From a Production Cloud
 

Recently uploaded

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
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
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 

Recently uploaded (20)

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
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
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 

Ruby on Embedded Devices for Encrypted Email

  • 2.
  • 3. What is kinko.me 4 PGP-based email encryption 4 for your desktop and your mobiles 4 with your current email address Also 4 comes on a dedicated device
  • 4. ssshhh... as of this afternoon we are crowdfunding. Feel invited to check https://getkinko.com
  • 5. Hardware 4 A10 1GHz Cortex-A8 ARMv7 CPU, VFPv3, NEON, Mali 400 GPU, CedarX VPU 4 512MB DDR3 RAM memory 4 SD storage
  • 6. Compared to modern machines 4 CPU: 10x 4 IO throughput: ~50x (RAM is ok, though)
  • 7. Is this good enough? 4 Compared to Intel 386: yes 4 Compared with servers: a different usage patterns 4 low traffic volume 4 few requests to HTTPS frontend
  • 9. Existing projects 4 nginx/dovecot: HTTP + IMAP servers (C) 4 GnuPG: PGP encryption (C) 4 imapsync: IMAP synchronization (Python) 4 bonjour, monit (C) 4 OpenSSH: tunnelling (C/ruby) 4 roundcube webmail: Webmail (PHP)
  • 10. + not so secret sauce 4 imapsync patch (Python) 4 configuration frontend (Ruby) 4 smtp server + client (Go) 4 installer (Ruby+Shell) 4 gluing code: (Ruby, Shell, C, Flex)
  • 12. 4 greatest language in the world 4 good network libraries 4 platform independent, kind of 4 Sinatra rocks
  • 14. gems + bundler gems, bundler and all that mess 4 gems are platform independent. Well, mostly. 4 bundler: hard to manage over accounts
  • 15. Performance 4 once started performance is ok: 4 ~10 to 20 pages rendered per second 4 startup performance is really bad: 4 starting a sinatra/ActiveRecord app: ~15 seconds
  • 16. Performance Ruby vs C # ~30 msecs date # ~150 msecs ruby -e 'puts Time.now'
  • 17. Lessons learned 4 Configuration UI in ruby/sinatra (for now) 4 everything else: mostly not.
  • 19. 1. UN*X is your friend
  • 20. UN*X is your friend 4 caching: file system cache 4 resources: cleans up after you 4 shared storage: file system 4 built-in authentication: users + groups 4 also: ulimit, chroot, etc.
  • 21. ... Don't rebuild it in ruby A custom logger in ruby: logger = Logger.new("#{Rails.root}/log/custom.log", 'daily') logger.formatter = proc do |severity, time, _, msg| "#{time.strftime("%B %d %H:%M:%S")} #{severity} #{msg}n" end config.logger = logger
  • 22. ... Don't rebuild it in ruby, pt. 2 A custom logger in external application: reader, writer = IO.pipe fork do Process.setpgrp STDIN.reopen reader writer.close exec("timestamp") end STDOUT.reopen writer STDERR.reopen writer reader.close
  • 23. ... Don't rebuild it in ruby, pt. 3 or simply: rackup 2>&1 | timestamp
  • 24. ... Don't rebuild it ditto: 4 daemons 4 process management 4 etc. (Hello devops!)
  • 26. fast and "portable": bash #!/bin/bash set -eu set -o pipefail echo "Yay!" Commands are (sometimes) not portable: echo -n "Is there a newline?"
  • 27. small & fast: C POSIX at your fingertips. 4 fast 4 small 4 source: somewhat portable; '#ifdef linux' FTW!
  • 28. Pattern matching: flex Pattern matching done quickly; in portable source code. /* Replaces ${{NAME}} from the environment */ ${{[a-zA-Z0-9_]+}} { yytext[yyleng-2] = 0; const char* env = yytext+3; const char* value = getenv(env); printf("%s", value ? value : ""); }
  • 29. networking: Go Go, the environment 4 fast, portable source 4 good networking + email libraries (even SSH!) 4 crosscompiling: easy Go, the language 4 terrible.
  • 30. jit: Distribute scripted binaries Use jit! http://github.com/radiospiel/jit 4 Works with C, flex, Go 4 Compiles just in or ahead of time 4 Native speed (Built in bash, BTW)
  • 31. jit: C Example Source: #!/usr/bin/env jit.cc #include <stdio.h> void main() { printf("Hello world!n"); } Run: chmod +755 hello ./hello
  • 32. Links 4 flex: http://flex.sourceforge.net/ 4 jit: http://github.com/radiospiel/jit