webapps on embedded bsd and the future of freenas (meetbsd california 2014)
DESCRIPTION
Watch the talk here: http://bit.ly/1zaphr7 These are the slides for Corey Vixie's talk, "Webapps on Embedded BSD", given at MeetBSD California 2014 in San Jose. Visit www.iXsystems.com or www.FreeNAS.org for more information.TRANSCRIPT
![Page 1: Webapps on Embedded BSD and the Future of FreeNAS (MeetBSD California 2014)](https://reader034.vdocuments.site/reader034/viewer/2022052621/557d605dd8b42abf3d8b50ea/html5/thumbnails/1.jpg)
Webapps on Embedded BSD
Corey Vixie, 2014
And the future of FreeNAS
![Page 2: Webapps on Embedded BSD and the Future of FreeNAS (MeetBSD California 2014)](https://reader034.vdocuments.site/reader034/viewer/2022052621/557d605dd8b42abf3d8b50ea/html5/thumbnails/2.jpg)
Where are we now?• BSD is a popular choice for embedded
applications
• Clients are very fast
• What the heck is a “webapp”?
• Design and delivery matter, especially in an enterprise space
![Page 3: Webapps on Embedded BSD and the Future of FreeNAS (MeetBSD California 2014)](https://reader034.vdocuments.site/reader034/viewer/2022052621/557d605dd8b42abf3d8b50ea/html5/thumbnails/3.jpg)
Why embed BSD?
• The GPL is getting worse
• BSD can be made super small
• Hardened, secure system
• Free software that’s actually free
![Page 4: Webapps on Embedded BSD and the Future of FreeNAS (MeetBSD California 2014)](https://reader034.vdocuments.site/reader034/viewer/2022052621/557d605dd8b42abf3d8b50ea/html5/thumbnails/4.jpg)
“Fast clients”? What?
• My phone is twice as fast as my last-gen laptop
• Webkit, Gecko, and Trident are insanely fast now
• JavaScript doesn’t suck anymore*
• *It does, but not in the ways you remember
![Page 5: Webapps on Embedded BSD and the Future of FreeNAS (MeetBSD California 2014)](https://reader034.vdocuments.site/reader034/viewer/2022052621/557d605dd8b42abf3d8b50ea/html5/thumbnails/5.jpg)
You get an app, and you get an app…
• Static websites aren’t dead
• Static websites are useless for dynamic content
• “One size fits all” is harder, easier, and more necessary than we think
![Page 6: Webapps on Embedded BSD and the Future of FreeNAS (MeetBSD California 2014)](https://reader034.vdocuments.site/reader034/viewer/2022052621/557d605dd8b42abf3d8b50ea/html5/thumbnails/6.jpg)
“‘Design’ is a word that's come to mean so much that it's also a word that has come to mean nothing.”
—Jonathan Ive
![Page 7: Webapps on Embedded BSD and the Future of FreeNAS (MeetBSD California 2014)](https://reader034.vdocuments.site/reader034/viewer/2022052621/557d605dd8b42abf3d8b50ea/html5/thumbnails/7.jpg)
FreeNAS 9
![Page 8: Webapps on Embedded BSD and the Future of FreeNAS (MeetBSD California 2014)](https://reader034.vdocuments.site/reader034/viewer/2022052621/557d605dd8b42abf3d8b50ea/html5/thumbnails/8.jpg)
Out with the old• Based on Django, Dojo, PHP, other old web
MVC frameworks
• Hard to modify, toolkit-based
• People try to make FreeNAS plugins and give up
• Build hell - 20 minutes to see your changes
![Page 9: Webapps on Embedded BSD and the Future of FreeNAS (MeetBSD California 2014)](https://reader034.vdocuments.site/reader034/viewer/2022052621/557d605dd8b42abf3d8b50ea/html5/thumbnails/9.jpg)
FreeNAS 10
![Page 10: Webapps on Embedded BSD and the Future of FreeNAS (MeetBSD California 2014)](https://reader034.vdocuments.site/reader034/viewer/2022052621/557d605dd8b42abf3d8b50ea/html5/thumbnails/10.jpg)
What do we want?• Fast UI builds with easy, automatic deployment
• A single page app that works on all devices
• Server-side rendered templates
• A single, bundled .js file with client-side routing
• Pub-Sub websocket connections instead of long-polling
• Develop on any operating system
• Deploy on an embedded BSD target
![Page 11: Webapps on Embedded BSD and the Future of FreeNAS (MeetBSD California 2014)](https://reader034.vdocuments.site/reader034/viewer/2022052621/557d605dd8b42abf3d8b50ea/html5/thumbnails/11.jpg)
What does a modern web stack look like?
![Page 12: Webapps on Embedded BSD and the Future of FreeNAS (MeetBSD California 2014)](https://reader034.vdocuments.site/reader034/viewer/2022052621/557d605dd8b42abf3d8b50ea/html5/thumbnails/12.jpg)
![Page 13: Webapps on Embedded BSD and the Future of FreeNAS (MeetBSD California 2014)](https://reader034.vdocuments.site/reader034/viewer/2022052621/557d605dd8b42abf3d8b50ea/html5/thumbnails/13.jpg)
Code from Facebook? In my open source software?
It’s more likely than you think.
![Page 14: Webapps on Embedded BSD and the Future of FreeNAS (MeetBSD California 2014)](https://reader034.vdocuments.site/reader034/viewer/2022052621/557d605dd8b42abf3d8b50ea/html5/thumbnails/14.jpg)
It’s more likely than you think
![Page 15: Webapps on Embedded BSD and the Future of FreeNAS (MeetBSD California 2014)](https://reader034.vdocuments.site/reader034/viewer/2022052621/557d605dd8b42abf3d8b50ea/html5/thumbnails/15.jpg)
How does it work?1. A source file is modified
2. The corresponding build tasks are run
3. The built app is rsynced to the BSD system
4. The webserver daemon restarts
![Page 16: Webapps on Embedded BSD and the Future of FreeNAS (MeetBSD California 2014)](https://reader034.vdocuments.site/reader034/viewer/2022052621/557d605dd8b42abf3d8b50ea/html5/thumbnails/16.jpg)
Demo time!
![Page 17: Webapps on Embedded BSD and the Future of FreeNAS (MeetBSD California 2014)](https://reader034.vdocuments.site/reader034/viewer/2022052621/557d605dd8b42abf3d8b50ea/html5/thumbnails/17.jpg)
That looked too easy! It must be staged!
• There’s currently some setup you have to do to the target:
• Volume and a dataset using Unix permissions
• rsync enabled
• ssh enabled
• Has a public key installed for the FreeNAS root user
![Page 18: Webapps on Embedded BSD and the Future of FreeNAS (MeetBSD California 2014)](https://reader034.vdocuments.site/reader034/viewer/2022052621/557d605dd8b42abf3d8b50ea/html5/thumbnails/18.jpg)
Watching and using
• This is all live on the FreeNAS github, right now - development in the open, baby!
• We’re going to release a Yeoman generator that will help you create a ‘blank’ project
• Roll your own on any BSD-based target