One Possible Framework for a distributed twitter
Twitter Ground Rules
- A user can "follow" (n) number of users
- A user can have (n) number of followers
- Messages posted by users are limited to 140 characters
Proposed Software Infrastructure
"Ping" server #1
- User Identity Lookup
- Last Message ID
- In Memory Hashtable
"Ping" Server Registry
- List of all available ping servers
"Twitter" Server
- "Twitter" server is constantly communicating with "Ping" server
- All "clients" speak with their "twitter" server using already defined Twitter API
- Client software needs to be able to support different servers
Must have
- OpenID Authentication
- Twitter API
User Archtypes
| Name |
Following |
Followers |
| Scoble |
4 |
4 |
| Dave |
1 |
4 |
| Joshua |
4 |
1 |
| Public Timeline |
4 |
0 |
Following List ("In Memory Hashtable)
| User |
lastMessageGUIID |
"Twitter" Server |
| User 1 |
2 |
1 |
| User 2 |
4 |
1 |
| User 3 |
23 |
2 |
| User 4 |
46 |
2 |
| User 5 |
201 |
3 |
Twitter Server Update Check
Actors
- User 1 (Scoble Arch Type)
- "Twitter" server #1
- "Twitter" server #2
- "Ping" server #1
[Every (n) seconds]
User 1 to Twitter Server #1
(via Twitter API) I'd like to update please!
[Every (y) seconds]
"Twitter" server #1 to Ping Server #1
I've got User 1. His lastMessageGUID was 201
I've got User 2. His lastMessageGUID was 42
I have external subscriptions for User 3 & User 4. Can you give me their lastMessageGUID's?
Ping Server #1 to "Twitter" Server #1
Sure!
User #3 lastMessageGUID is 63. His Twitter Server is 2
User #4 lastMessageGUID is 76. His Twitter Server is 2
"Twitter" Server #1 to "Twitter" Server #2
My message history for User #3 & User $ is out of date
(RSS) Can you give me messages 61 through 63 for User #3
(RSS) Can you give me messages 75 through 76 for User #4
Twitter Subscription Process
User #1 visits "profile" page for User #5 (hosted on Twitter Server #3)
User #1 authenticates with "Twitter" server #3 with OpenID
User #1 clicks "follow"
"Twitter" server #3 notifies "Twitter" server #1 ("Twitter" server #3 knows about "Twitter" server #1 because of the authentication process)
User #1 would like to follow my User #3
For your information, I update Ping Server #1
Questions
What 3rd party cloud service (thinking Amazon Web Services) offers SMS messaging? What are the costs involved?
Comments (0)
You don't have permission to comment on this page.