WhereYouAre: Difference between revisions
No edit summary |
No edit summary |
||
Line 20: | Line 20: | ||
[http://thedigitalmachine.com/services/recess_git/whereyouare REST API] | [http://thedigitalmachine.com/services/recess_git/whereyouare REST API] | ||
map features: | |||
touch user to open details | |||
arrow features: | |||
touch user to open details | |||
contacts features: | |||
open details... | |||
show pic, phone, ip, last timestamp | |||
adjust... | |||
track follow just this user | |||
meetup track, + use push to harass, etc. for meetup | |||
ignore do not show this user no matter what | |||
stealth show this user but prevent them from seeing me | |||
ping/msg send a push to the wya user | |||
groups change friend's groups | |||
settings features: | |||
go completely offline | |||
go completely stealth | |||
select current group | |||
manage groups including priority | |||
adjust total number of friends shown on arrows | |||
adjust total number of friends shown on map | |||
toggle [show my location] on map | |||
turn off focus (if on) | |||
turn off meetup (if on) | |||
Use cases | |||
------------- | |||
1 user starts app | |||
User gets updated friend locations | |||
User closes app | |||
2 user goes offline (in app, prevents notifications) | |||
3 user goes stealthmode | |||
4 user changes friends priority (make this easy to do!) | |||
5 user changes # tracked friends | |||
6 user sets friend to ignore on/off | |||
7 user sets friend to meetup on/off | |||
8 user sets friend to stealth on/off | |||
9 user pings friend | |||
10 user adds friend | |||
11 user deletes friend | |||
12 import friends? | |||
wya API requirements | wya API requirements | ||
Line 103: | Line 80: | ||
put "my friend" (the server only tracks phone number, no editing available) | put "my friend" (the server only tracks phone number, no editing available) | ||
any meetup or ignore state | any meetup or ignore state | ||
ignore is done by deleting friend | |||
meetup is done by client requesting pings | |||
wya server requirements | wya server requirements | ||
Line 110: | Line 87: | ||
track activeuser {phone,stealthmode,friendarray{phone,stealthed}} array | track activeuser {phone,stealthmode,friendarray{phone,stealthed}} array | ||
collect nonstealthed friend locations "by any means necessary" | collect nonstealthed friend locations "by any means necessary" | ||
priority: active app users, inactive app users, nonusers | |||
reply to API requests | reply to API requests | ||
only report locations if not stealthed | |||
only report locations if under a day old? | |||
ping app users for meetups (if not ignored or stealthmoded) | ping app users for meetups (if not ignored or stealthmoded) | ||
use TTL of 6 heartbeats, kill activeuser after that | use TTL of 6 heartbeats, kill activeuser after that | ||
Line 124: | Line 101: | ||
"ignore all" mode (similar to "logoff server") | "ignore all" mode (similar to "logoff server") | ||
(round1) | (round1) | ||
all f's of all users running app need constant location ping | all f's of all users running app need constant location ping | ||
f's must be shared with phone# as key | |||
server must track users' flist | |||
server must constantly work on getting f updates | |||
user starts up app | user starts up app | ||
user logs in to server and sends friendlist | |||
server adds user to userlist, merges friendlist into totalfriendlist (w/refcount?) | |||
server should do its best to get all friends' locations | |||
** this is a separate task from communicating with user ** | |||
user pings server with location, gets f updates | |||
ping every 15 seconds? | |||
only send updates if they have not been received by user? (how to get best performance?) | |||
user shuts down app (or times out) | |||
user is logged out of server | |||
server f location collector | server f location collector | ||
use external services to poll for location for all f that are not running app | |||
ping every 15 seconds? | |||
users that are running app are all sending locations, no need to collect them | |||
include occasional push check: | |||
if f owns app | |||
if f is not running app | |||
if f is in meetup | |||
push request to f1 | |||
Revision as of 23:17, 24 February 2010
I'm going to take an "Open-Design Software" approach to this project, please feel free to send me your two cents if you have an opinion.
Analysis
It would be useful, and should be easy, to provide an app that shows where your friends are. Many of these apps already exist, but they all break down when it comes to reaching critical mass: it's just too much trouble to get all your friends registered and receive their locations when you need them. Everyone is not going to run the app at the same time, which just leaves push communication to the phone. Can we solve this problem well enough to make an app worth having?
Requirements
- Free and easy to configure
- Quickly start to track existing friends
- Provide tracking for all, one, and groups of friends
- Make fast privacy and priority adjustments
- Obtain best-in-class location information
Design
- Map view for traditional location display
- Arrow view for sexy fun location display
- Contacts view for fast privacy/prioritization changes
Implementation
map features: touch user to open details arrow features: touch user to open details contacts features: open details... show pic, phone, ip, last timestamp adjust... track follow just this user meetup track, + use push to harass, etc. for meetup ignore do not show this user no matter what stealth show this user but prevent them from seeing me ping/msg send a push to the wya user groups change friend's groups settings features: go completely offline go completely stealth select current group manage groups including priority adjust total number of friends shown on arrows adjust total number of friends shown on map toggle [show my location] on map turn off focus (if on) turn off meetup (if on)
Use cases ------------- 1 user starts app User gets updated friend locations User closes app 2 user goes offline (in app, prevents notifications) 3 user goes stealthmode 4 user changes friends priority (make this easy to do!) 5 user changes # tracked friends 6 user sets friend to ignore on/off 7 user sets friend to meetup on/off 8 user sets friend to stealth on/off 9 user pings friend 10 user adds friend 11 user deletes friend 12 import friends?
wya API requirements ------------------------------------------ https put "my friends subscription" (on startup) https put "my location" every 15 seconds (may be "stealthmode") \ https get "my friends' locations" with ages (may be "stealthed")/ combine? https post "my new friend" with phone number and stealthstatus https put "my friend" with phone number and updated stealthstatus https delete "my friend" with phone number https put "ping this friend" with phone number https put "logoff"
NOT needed... ------------- put "i am running the app" (implied by [put my location]) put "my friend" (the server only tracks phone number, no editing available) any meetup or ignore state ignore is done by deleting friend meetup is done by client requesting pings
wya server requirements ------------------- track activeuser {phone,stealthmode,friendarray{phone,stealthed}} array collect nonstealthed friend locations "by any means necessary" priority: active app users, inactive app users, nonusers reply to API requests only report locations if not stealthed only report locations if under a day old? ping app users for meetups (if not ignored or stealthmoded) use TTL of 6 heartbeats, kill activeuser after that
wya client requirements ------------------- maintain complete friends list (even ignored) with prioritization ping server with location every 15 seconds adjust tracking to include "top n" friends "ignore all" mode (similar to "logoff server")
(round1)
all f's of all users running app need constant location ping f's must be shared with phone# as key server must track users' flist server must constantly work on getting f updates
user starts up app user logs in to server and sends friendlist server adds user to userlist, merges friendlist into totalfriendlist (w/refcount?) server should do its best to get all friends' locations ** this is a separate task from communicating with user ** user pings server with location, gets f updates ping every 15 seconds? only send updates if they have not been received by user? (how to get best performance?) user shuts down app (or times out) user is logged out of server
server f location collector use external services to poll for location for all f that are not running app ping every 15 seconds? users that are running app are all sending locations, no need to collect them
include occasional push check: if f owns app if f is not running app if f is in meetup push request to f1
<iph> <tdm_rest> <tdm_pusher> <apl> <loc_server> ----- ----- ----- ----- -----
REST Examples
- The best example I have to follow is the Twitter API. It *obviously* scales. It uses Basic Authentication, which sucks (everything is plaintext, holy shit). BETTER force it to use SSL. They are moving towards a more-robust authentication based on OAuth.
- The other excellent example is the Amazon S3 API. Authentication is brilliant - it uses a SHA1 signature of the request, which MUST include a timestamp within the last 15 minutes. There is a set of rules for turning the request URL into the request string that is signed.
Signature = Base64( HMAC-SHA1( UTF-8-Encoding-Of( YourSecretAccessKeyID, StringToSign ) ) );