304 karma · joined September 26, 2011
http://couple.me
We kept the design simple, otherwise a "batching" mechanism could be introduced that would replay a single batch of 50 messages but that would make everything a second delayed. However, part of the map allows you to login and see your messages live on the screen as you're sending them to your partner and for that the real time streaming is pretty critical.
I would do significant load testing for each use case before using it (or socket.io for that matter). I needed to push 30-50 messages per second to each connected client and faye started choking as soon as there were more than 20-30 clients. socket.io would choke at around 50-100 connected clients. Raw websockets were able to reach closer to 100 clients but performed more or less similar to socket.io.
We had two issues with sticky load balancing:
1. AWS ELB had to run in TCP mode (for websockets) which meant no stickiness
2. Within each instance we have a node-cluster running to utilize multiple CPUs and putting haproxy with stickiness there increased complexity
We could avoid using the ELB but then you lose the ability to use an EC2 Auto Scaling group, introducing significant admin overhead.
Ultimately we didn't need the nodes communicating between each other (it's a one way stream from us to the client) so raw websockets ended up being the simplest solution.
Also if you look at big cities (LA, NYC, SF) you'll see a continuous stream of circles flashing without lines. So the data just overlaps a lot.
Let me know if I can elaborate on any of the tech behind this visualization.
Combine that with a custom SSL certificate at all the edge nodes ($600/month) and this is a pretty compelling dynamic CDN offering.
Can't wait to try it out for our API.
By the way, in general this isn't a reboot specific bug, the most secure setting is actually not the "allow after unlock" one but the one that gives no access to keychain if your phone is locked at any time. I noticed that keychain starts refusing access 15 seconds after you lock the phone but most apps keep their credentials in memory after they're read and the problem appears at reboots only.
Just pause the startup process of the app (in a non-blocking way) if accessing the keychain fails at startup. Then during applicationDidBecomeActive the startup continues with access to the keychain data. That way we don't weaken the security of our customers.
1. Add lock code to your phone
2. Open the app without a debugger attached and start monitoring for significant location changes
3. Minimize app
4. Turn off iPhone
5. Turn iPhone back on.
Now if you wait 3-5 minutes in the same spot, your app will be woken up and will get a significant location change. Much simpler than driving and easily reproducible in the office.
Now to know when the app actually wakes up while you're in the lock screen, I added a local notification as part of the startup process. Now we just keep the phone locked for a few minutes until it shows the local notification, then you unlock it and see the logout problem.
Hope that helps everyone else!
I researched this a few months back and was not able to find a clean way to add TFA to a key based login. Any suggestions from other HN readers?
Either this is a weird device specific bug or perhaps the author of the post launched Safari in a different orientation on one of the devices and then rotated (and Safari cached a different "screen" size).
This is complete speculation and I don't have a device next to me to test, but the 20px difference suggests that it's referring to the black status bar at the top.
Edit: looks like it might be related to tabs: http://stackoverflow.com/a/13380055/552710
One lesson though: do not use interface builder for table view cells, just don't. Cell reuse is tricky to get right as is and you should take the time upfront to make it all work programmatically.
https://gist.github.com/807e81ad64c4e84a7770 (SPOILERS)
https://gist.github.com/1899389 (SPOILERS!)
That being said, your tmp folder permissions theory is much more interesting though and that would be a brilliant way keep everyone else from catching up. :)