304 karma · joined Sep 26, 2011 (15y ago) · 34 submissions
http://couple.me
1.
Huerainbo – turn your Hue lights into a rainbow from a web app(github.com ↗)
4 points · by mpetrov · 10y ago · discuss
2.
· discuss
3.
· discuss
comment 12y ago · link · parent
comment 12y ago · link · parent
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.
comment 12y ago · link · parent
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.
comment 12y ago · link · parent
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.
comment 12y ago · link · parent
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.
15.
Show HN: live map infographic of activity in Couple using Canvas and WebSockets(map.couple.me ↗)
7 points · by mpetrov · 12y ago · 1 comment
comment 12y ago · link · parent
comment 13y ago · link · parent
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.
comment 13y ago · link · parent
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.
comment 13y ago · link · parent
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.
comment 13y ago · link · parent
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!
comment 13y ago · link · parent
comment 13y ago · link · parent
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?
comment 14y ago · link · parent
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
comment 14y ago · link · parent
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.
comment 14y ago · link · parent
30.
Pair (YC W12) is a Path for the Two of Us(techcrunch.com ↗)
212 points · by mpetrov · 14y ago · 75 comments