"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
Appenginejs (old presentation)
1. appenginejs
JavaScript on Google App Engine
Blog example downloads:
http://tinyurl.com/appenginejs-sdk
http://tinyurl.com/appenginejs-example
This presentation:
http://tinyurl.com/appenginejs-talk
2. Why JavaScript?
The World's Most Popular Programming Language
The World's Most Misunderstood Programming Language
Dynamic, Functional, Prototypal
Event loop instead of threads
Engine explosion: v8, SquirrelFish Extreme, TraceMonkey,
Rhino, Chakra, Carakan
JavaScript on the server: Helma/Ringo, Persevere/Pintura,
Jaxer, Joyent Smart, Node and many others.
3. Standardization
Common API for JavaScript applications
Analogous to stdlib/stdio
Implementations exist for most engines
Specifications: modules, packages, system, binary,
encodings, filesystem, console, promises, testing and more
http://commonjs.org/
4. Script in JavaScript
var File = require("fs");
var csv = File.open("invitations.csv");
var out = File.open("invitations2.csv", "w");
for (var i = 1; i<33421; i++) {
var line = csv.readLine();
var comma = line.indexOf(',');
var newline = '"' + i + '"' + line.substring(comma);
out.write(newline);
}
out.flush();
5. Smash hit
Evented non-blocking I/O server
Every API rewritten from scratch as async
JavaScript is perfect for event loop architectures
Uses v8, the fastest engine
http://nodejs.org
6. Google App Engine
Run your web apps on Google's infrastructure
Excellent scalability
Free for low traffic apps
Zero admin
Officially supported languages: Python, Java
Unofficial implementations: Clojure, PHP, Groovy,
JavaScript
http://code.google.com/appengine/
9. Rhino
JavaScript for Java
Works both ways
Ships with the default JDK
Used to be the fastest JavaScript VM
Still very performant for long-running processes
http://www.mozilla.org/rhino/
15. Jack/JSGI
JSGI is a web server interface specification for JavaScript
Jack is the first implementation
Similar to Ruby's Rack and Python's WSGI
Simpler than Java Servlets
http://jackjs.org/
16. Hello World
function(env) {
return {
status : 200,
headers : {"Content-Type":"text/plain"},
body : ["Hello world!"]
};
}