On Wednesday afternoon we've landed at Aerfort Bhaile Átha Cliath for NodeDublin — technically not first but for sure exteremely well organized node.js event in Europe. We've been envious of NodeConf for a long time and finally, thanks to Cian Ó Maidín we had a chance to see most of well known and widely respected developers from node community.
The event took place in amazing (and also very Irish) Guinness Storehouse. We kicked off with keynote by Isaac — a very interesting anthropological-oriented study on software (I strongly recommend reading the blog post about it). Second keynote was presented by Mikeal — who, as most of you already know, is an amazing speaker. After this rather inspirational, but yet node related introduction we dived deep into realtime and distributed systems. While demo gods weren't so nice for Substack we had extremely interesting talks by Dominic and Paolo.
Later on Max did a case study on Gather and Joe shared some insights about creating products in node based on his own experience. Couple talks later Day One was over and we all headed to The Sugar Club for one of the most interesting afterparties I've ever experienced — a whisky tasting with some intense bag piping.
The second kicked off with one of the most (if not the most) interesting slots — core node; with libuv, v8 and DTrace. Later on we've been introduced to Persona and got some DevOps advice from my colleague from Nodejitsu — Charlie McConnell.
After some light snacks Emily surprised everyone with really entertaining, rather smoky performance about Arduino. In no time the conference was closed by outstanding, inspirational performance by Jan and very interesting and persuasive talk by Rick Falkvinge. Right after that Cian quickly took the stage to thank all fellow organizers and sponsors. Felix also appeared for couple of minutes to show off a new event he started right before JSConf.eu — NodeCopter which gained a lot of visibility during last days (mostly due to its obvious awesomeness; robots!).
All in all, NodeDublin was maybe hectically organized but extremely successfull mid-sized conference. Dublin was also very welcoming (note that Irish cab drivers are probably the most cheerful and nice people on Earth). If you want to attend a node.js event in Europe — I wouldn't hesitate next year. Thanks Cian for putting this on.
Photos: by Matthew Bergman | by me
Notes, slides and trivia links from majority of talks can be found below.
Day one
Escaping captivity: Social Apes making Software in the Wild
presented by @izs | slides | blog format
- We're here because we have technology in common. It's really the community these events are about though. Node is not a typical community.
- The pattern will continue - future communities will act like Node community.
- What are humans? We're most social creatures with most complicated social interactions.
- Our story starts a little bit ago — last common pan/homo ancestor is dated for 5 million years ago. Evolutionary speaking it's very recent.
- Anatomically modern humans are only 250,000 years old.
- Hunt. Gather. Repeat. There's no room for ownership and selfishness, people need to share.
- Agriculture pros: more calories, less moving around; population density (diseases); inheritance (hierarchical ruling class).
- Hunter-Gatherer negs: one bad season can kill you all, babies die really often (susceptible to not getting enough nutrition), sorcerers can hex you (gotta kill them), might get caused of being a sorcerer (no legal system).
- We started making shields and walls — you don't need these for hunting though. We started being offensive right about when we started farming.
- Gombe, 1960 — chimpanzees were very friendly and they worked with each other.
- Mahale, 1968 — very different type of animal. Chimps were tearing the boxes with food apart. They actually started setting up patrols around the camp. They became cannibalistic and very territorial.
- When the food is one place, chimps don't get along.
- Subsequent expeditions (to Gombe, Mahale) found that the changes were sticky, cultural. If you domesticate an animal and let it out to the wild it still stays domesticated up to some degree anyway.
- Immediate return → Agricultural → Industrial → Information
- Find it → Grow it → Use machines to make it
- It order to have revolution it needs to be disruptive. It needs to be better, so the old things will be forgotten. Disruption sometimes causes terrible problems though.
- Traditional model: programmers work for a company, company decides what to build, big apps, specs, process. Proprietary source, IP protection. Very little flexibility.
- The more freedom you give your workers, the more they get done.
- A lot of open source projects are managed by companies.
- Open development. Open community. Open Innovation.
- Node has the idea of relatively small core and noisy userland. It feels like we are wandering in the same wilderness together, trying to solve problems instead of fighting who gets blessed to implement something into the core.
- Here Comes Everybody by Clay Shirky.
- We explore with the greatest freedom we can possibly have to improve the community. We need to figure out how to share ideas without offending and bumping elbows.
Untitled
presented by @mikeal
- Why is node successful? Is it successful? Fucking robots!
- Nodecopter happened just before JSConf.eu. People were doing crazy things with parrot drones with libraries such as this or [that](Johhny 5.
- The barrier of entry for working with hardware hasn't changed over the years so significantly. The boost of Internet enabled people who weren't technical to do computing and thus hardware hacking as well.
- The callback pattern —
function (err, result) {}
- Streams — are for file descriptors, sockets; we're going to get or write data iteratively over time.
- The substack pattern —
module.exports = function () {}. So module should be so simple that it can be described by one function.
- We have all these patterns which are being reused which makes us successful.
- Logicomix
- Solutions over problems. We need to be able to move forward. Somehow node.js is incompatible with modern institutions.
Intro to Streams Programming Patterns
by @mattpodwysocki
- > McIllroy (1964) said: 'We should have some ways of connecting programs like garden hose--screw in another segment when it becomes necessary to massage data in another way. This is the way of IO also'.
- It's an abstraction of IO. It improves latency, reduces memory footprint, expands possibilities and supports realtime.
- Substack's stream handbook is a great resource.
- Kinds of streams: readable, writeable, transform and duplex.
- request, JSONstream, mux-demux, shoe, emit-stream, scuttlebutt or event-stream are all amazing tools for streams.
- Problems with readable streams (for
< 0.8): data eagerly fired whether ready or not, implement pause/resume.
Building non-trivial web apps which use websockets as the primary means of communication
presented by @socketstream
Check coverage from LXJS.
Observability for node.js and realtime software
presented by @dshaw | slides
- @enterprisestack
- Observability is hard — especially at scale.
- Realtime app prorities: scalability and observability.
- Observer tools: logging, log aggregation, health/status endpoints, REPL, monitoring, metrics, DTrace.
Distributed Systems with Node.js
presented by @hij1nx | Github repo for the project
- In software we start with abstraction. It becomes very difficult to convey difficult ideas and have people understand.
- There's a possibility that when we speak about technical things we use too much abstraction. If we are going to talk about software we should show code.
- Let's implement gossip protocol /ht @dominictarr for his talk at Reject.js.
Colouring with crayons and playing with Duplo blocks
presented by @dominictarr | stream punks group on Github
- Obviously duplo — modules
- Colouring with crayons — shallow customizations
- Studs = streams. Streams are not for fast IO. Streams are for connecting programs together.
- Old-fashioned streams: unix streams. One way stream (readable XOR writable).
- Full duplex is more interesting:
ssh, rsync, git.
- These streams involve two way communication.
ssh is a handshake to auth and exchange secret keys. then duplex stream to the shell (by default). rsync uses a duplex stream from ssh and then a handshake.
- Git is the same, although the structure of diff is different.
- Duplex pattern:
A.pipe(B).pipe(A) — some node modules with this pattern: dnonde, mud-demux, snob, scuttlebutt, crdt, repred.
- A distributed system is scaled out servers, application with multiple processes, web/mobile application.
- Instead of enforcing ordering we should be commutative, which means that order doesn't matter.
How to not write big apps!
presented by @substack
- Big applications aren't fun. If something isn't fun you're just not going to do it.
- First step:
npm install.
- Second step:
npm publish — your code will be only growing if you're dependant only on different people solutions. Also, the community helps you to develop solutions.
- Third step:
http.createServer().
Hand Crafted Artisanal JavaScript: How to start a company and use JS for everything
presented by @maxogden | slides
- A story of Gather.
- Mapbox
- We're using node as an communication system for phones.
- We don't have a web framework. We use a modular approach.
- We have two server-side templates.
- We don't care about JavaScript syntax. Flow control. Callback hell.
How to build Products in Node
presented by @joemccann | slides
- 16 195 modules available in npm.
- Gunnar app
- Dillinger.io — online markdown editor.
- PhotoPipe
- It's better to use ready modules and assemble them to make real products instead of writing new ones.
- Dillinger wasn't modular, adding new functionality and features was painful. Also it was difficult to contribute due to dependencies.
- Now it's modular, pluggable and easier to contribute.
End of day one
Day two
About Libuv Optimizations, Node.js Goals, Roadmap
presented by bnoordhuis | libuv on github
- Libuv is a C library which provides async network and file I/O. It's cross-platform. +/- 40,000 lines of code, supports epoll, queue, event ports, IOCP.
- Libuv is used by node, luvit, rust, julia and more
- GYP — has
JSON–structure, generate your projects.
V8 Performance Cost
presented by @starzi
- V8 design philosophy: fast is better than slow, hard work often pays off after time.
- Recipe: inline caching (when we compile we don't know the layout of objects, once we know how the objects look like we'll patch them), crankshaft (optimizing compiler), NewGC (incremental low-pause garbage collector).
- Garbage collection is all about dead objects (?). It's about live objects! Mark and sweep collector — marking checks what's alive in the heap; sweeping looks at the gaps between live objects (not dead ones). These two processes are atomic pause, which somehow doesn't align with node.js architecture. In GC you need to distinguish white (dead) and black (alive). In the real life we have grey in between — which are unscanned objects. When talking about connections you can't go between black and white.
- How incremental marking works? Mutator generates the graph, GC marks the step. Unfortunately then mutator changes A. Finally GC finishes marking and does sweeping.
- Sacrifice space for speed/responsiveness. Being lazy leads to steady progress.
- Best practices: try to initialise all properties in the constructor; add properties in the same order every time; avoid object layout modification of hot objects.
Observing Node Performance with DTrace
presented by @mrbruning | slides and resources
- DTrace is a tool that allows dynamical instrumentation of code from app level and into the kernel. Can be safely used on production systems.
- Uses: performance analysis, debugging, code coverage and finding out what is happening in your software.
- Available on illumos, SmartOS and other Solaris 10 derivatives as well as *BSD and Mac OSX.
Terminology:
System call request for an action by the OS.
Probe is an instrumentation point in the code; dynamic and static probes are provided and new ones can be added. A probe is specified by a 4-tuple (provide:module:function:probename[action]).
Action is executed when a probe fires.
Predicate is an optional boolean to determine whether or not to execute the action.
With DTrace you can trace events in the node engine, node.js scripts and the kernel.
- The dtrace-provider for node.js allows you to create statically defined probes (USDT) in your app.
Persona
presented by @mmayo
- Persona — is attempting to solve security problems tackled by many developers. It's a product. Browser ID is a protocol.
- How does it work? You load Javascript library, you set login and logout callbacks and add same buttons. Finally, verify proof of ownership (in JSON format).
- Supports all modern browsers (mobile included).
login.persona.org = fallback IDP.
- Why node? Javascript is in our blood, evented IO is alright, low memory footprint, interpreter is pretty quick.
- Train-based release model, full QA cycle for each train, deployment asset isn't source code, security reviews and audits, unit, regression and fund tests on each commit, full load tests on each candidate.
- Cryptography is brutally unforgiving of bugs.
- Node compute cluster and node memwatch
- Unsolved: backpressure, deployment, hitless rollouts, DB promotion still janky.
Dr. Devops, or How I Learned to Stop Worrying and Just Use More Node.js
presented by @ Av1anFlu
- Node is the best thing happened to system programming since the discovery of caffeine.
- Javascript was born in the browser, massively simpler parallelism, learning to deal with the hard parts takes weeks, not years (ie. callback hell).
- Cowboy DevOps rules: shit. must. work.; production debugging sucks; don't burn out your Ops team; deputise your tech support; eat your own dog food (to excess; use your own services and tools).
- SmartOS is pretty awesome — DTrace, ZFS. But moving production systems is extremely hard. Humans and chimps have probably more DNA in common than Linux and SmartOS have APIs in common.
Hackathon Strategies using Node.js
presented by @sarajchipps
- Reasons for participation: lots of developers, food, swag and competition.
- It's team building.
- Do it fast and simple. Do one thing, just one sweet feature.
Geekli.st and doing cool stuff with Node.js
presented by @csanz
- We're in revolution era, and we're trying figure out how to build things faster. Node is in the centre of this revolution.
- Node is a community of passionate and amazing open source developers. The enablers.
- Common trend is simplicity.
Something cool
presented by @nexxylove
- node-firmata, johnny-five, shoe, arduino uno, ultrasonic sensor, breadboard and wires.
Community and Open Source
presented by @janl
- This type of community will be disruptive outside technology itself.
- Javascript will be good enough. We have small core. We have modules.
- Node wants to be good at building network services. It doesn't try to be a framework. It focuses on doing one thing right.
- We are building the future. We can create gold out of nothing.
- We live such abstract lives and we get paid a lot of money for our work. We live in a sense of responsibility for other people.
- We're in extremely privileged position.
- Let's fork businesses the same way we fork code.
Decentralized Web: a vision for the future
presented by @falkvinge
- Make money given constrains - that's the role of an entrepreneur.
- Lulzitude.
- Catholic church had a monopoly on the truth in the past. Monks were copying books by hand. Then there came printing press. The catholic church was outraged. They couldn't understand the idea of having many voices.
- If you can dictate true from false, you wield the most power of all.
- Driver, stoker, red flag waver.
- We need a permission for everything from taking a shit to publishing a newspaper.
- It's up to us to create the future. Authority is abundant.
- Change doesn't just happen. Somebody makes it happen. Do you want to be that person?