Here are follow-up materials for my talk at SeaGL 2015.
Thank you Seth and folks on seagl_organzie for video transcoding & hosting tips!
Here are follow-up materials for my talk at SeaGL 2015.
Thank you Seth and folks on seagl_organzie for video transcoding & hosting tips!
I want to give my best talk ever, and I need your help. Knowing my audience will help me produce the most relevant, fun, and insightful content. Please spare a minute and take this survey. Submission does not guarantee admission. All questions are optional. Here’s more info on my talk (including date, time, and location).
Alternative to the Google Form above: all survey questions are repeated below. Email your response to [email protected]
I help organize a conference for Free Software enthusiasts called SeaGL. This year I’m proud to report that Shauna Gordon McKeon and Richard Stallman (aka “RMS”) are keynote speakers.
I first invited RMS to Seattle 13 years ago, and finally in 2015 it all came together. In his words:
My talks are not technical. The topics of free software, copyright vs community, and digital inclusion deal with ethical/political issues that concern all users of computers.
So please do come on down to Seattle Central College on October 23rd and 24th, 2015 for SeaGL!
I’ve heard a lot of Meteor news lately, but somehow I missed Sandstorm. Your own personal cloud. Install services easier than installing apps on your phone. Add machines and they self-organize into a cluster. This sounds just way too awesome. Looks like they use Meteor heavily. Jade Wang (formerly of the Meteor Development Group) is a co-founder.
Apps must be packaged for Sandstorm (made into “grains”). The list of ported apps is pretty inspiring. Included are: draw.io, LibreBoard, HackerSlides, Let’s Chat, Paperwork… All were new to me, several are written in Meteor, and I was able to check out all of these in seconds. I’m hooked.
sudo mv /etc/apt/sources.list.d/mongodb* /tmp/ echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list sudo apt-get update && sudo apt-get install -y mongodb-org |
And I also had to do fix my replica set in the MongoDB shell (necessary for Meteor oplog tailing):
var a = {"_id" : "rs0", "version" : 1,"members" : [{"_id" : 1, "host" : "localhost:27017"}]}; rs.reconfig(a, {force:true}); |
UPDATE 2015-10-01: Alas, one of my coworkers found even all the above wasn’t enough–he had to blow away his old MongoDB install.
sudo mv /var/lib/mongodb /tmp sudo apt-get purge mongodb-org-server sudo apt-get install -y mongodb-org-server |
We also use one-member replica sets in dev (Meteor uses the oplog), so edit /etc/mongodb.conf and include something like replSet=rs0, then restart mongo (sudo service mongodb restart). Finally, initialize the replica set:
var a = {"_id" : "rs0", "version" : 1,"members" : [{"_id" : 1, "host" : "localhost:27017"}]}; rs.initiate(a); |
It appears that collections can be restored by simply copying files like blah.0, blah.1, blah.2 and blah.ns from /tmp/mongodb to /var/lib/mongodb while the MongoDB server is stopped.
First, your TL;DR:
My work involves using crowdsourcing to assess and improve technical skill. We’re focusing on improving basic technical skills of surgeons first because—no surprise here—it matters. A more skilled surgeon means patients with less complications. Being healthy, not dying. Good stuff.
One way we gather data is a survey app where crowdworkers watch a short video of real human surgery and answer simple questions about what they saw. For example:
Turns out the crowd nails this! Think of it this way: most anyone can recognize standout performers on the basketball court or a playing a piano, even if they’re not an expert at either. Minimal training and this “gut feel” are all we need to objectively measure basic technical skill.
So, a survey app. Watch a video, answer a few questions. Pretty straightforward. We built one in-house. Meteor was a great choice here. Rapid development, easy deployment, JavaScript everywhere, decent Node.js stack out of the box, all that.
And of course we used oplog tailing right from the start because much of what read about oplog tailing made it sound like it was the only way to go. Sure, you’ll want oplog tailing for realtime (<10sec delayed) data when you have multiple apps connecting to the same MongoDB database. But if you don’t need that, you may not need it at all, and you may not want it.
Our traffic is very bursty. We publish a HIT on Amazon Mechanical Turk. Within minutes, the crowd is upon our survey app. Our app generally does fine, but folks complained of very slow survey completion times when we started hitting somewhere around 80 DDP(?) sessions in Kadira. Each DDP session in our survey app should equate to one simultaneous active user (hereafter “user”).
Here’s what we want to know:
Spoilers:
We created a stress test to get a better feel for the performance characteristics of our app.
The test uses nightwatch to emulate a turker completing a survey. Load the survey app, click radio buttons, enter comments, and throw in a few random waits. Many threads of the nightwatch test are spawned and charge on in parallel. The machine running nightwatch needs to be pretty beefy. I preferred a browser-based stress test because I noticed client-server interactions amplified the amount and frequency of DDP traffic (hello Mr. Reactivity). It was also easier to write and run nightwatch then pick the exact DDP traffic to send.
Notes on our app:
us-east-1a. Non-enterprise Modulus runs with oplog tailing disabled, and the app connects to MongoDB on a host other than localhost.I ran a series of stress tests. Ramp up traffic, capture metrics, change code and/or server configuration, repeat. Here are the results.
Takeaways:
meteorhacks:cluster.This is somewhat of an addendum, but I figured it might be useful.
Here’s what the Meteor Node.js process does when 10 users hitting our survey app running on one core.
Oplog tailing enabled:

Oplog tailing disabled:

Takeaways:
Cursor.fetch slice is about twice as big, and none of the methods causing that CPU load are ours. Perhaps this is the oplog “tailing” in action?Cursor.fetch shows us exactly what specific methods of ours are causing CPU load. Even if oplog tailing is more efficient, this level of introspection was priceless. We need this until we learn to better debug patterns in our code that lead to more CPU when oplog tailing is enabled.Further reading:
Feedback/questions/comments/corrections welcome! I’d espeically love to hear about your experiences scaling Meteor.
Does anyone know of an online video editing service where I can upload my videos and edit them? This is for a work project. Here are the basic features I need:
YouTube video editing comes really close, but I need more fine-grained control over blurring. I also need better licensing. Currently the only license and rights ownership choices are “Standard YouTube License” (they own it) or “Creative Commons – Attribution”. I want “Adam’s Private/Personal Video License”.
Adobe Premiere Express might have been perfect, were it not mothballed. Sounds like an online version of Adobe Premier.
I’ll be speaking about Meteor dev with Vim at the Seattle Meteor Meetup on Worldwide Meteor Day. Come on down!
If you’ve ever set up a machine by hand, you’ve probably had to decide how much of your disk to set aside as swap.
I’ve often wondered “why swap at all”? This quote by Nick Piggin from 2004 finally helped me answer the question.
no matter how much ram you have, swap can increase performance by allowing unused anonymous memory to be paged out, thereby increasing your maximum effective RAM
Found via this post on Hacker News, where the poster raises the point that some filesystem buffers might be extremely “hot” (frequently used), but might only fit in physical RAM (where they should be) if some swap space is available to page out other “cold” information.