Retrieving "friends" from my REST highscore webservice, a perfomance question
Hi mates!
I have one problem. My game uses facebook connect to retrieve player's facebook id (and his/her friends), then I save his highscore in my REST web server (using POST on http://www.example.com/highscore).
Retrieving all highscores is easy, just send GET to that address, but my problem is retrieving friend's highscores. The only way I think is retrieving friend's scores one-to-one, and if player has 300 friends, this means sending 300 GET requests to my server.
I don't know if this is the correct way, probably not, but no idea how to do this in a different way using a REST web service.
Do you know how Doodle Jump or Spider solves this problem?
What do you think?
Thanks in advance!
I have one problem. My game uses facebook connect to retrieve player's facebook id (and his/her friends), then I save his highscore in my REST web server (using POST on http://www.example.com/highscore).
Retrieving all highscores is easy, just send GET to that address, but my problem is retrieving friend's highscores. The only way I think is retrieving friend's scores one-to-one, and if player has 300 friends, this means sending 300 GET requests to my server.
I don't know if this is the correct way, probably not, but no idea how to do this in a different way using a REST web service.
Do you know how Doodle Jump or Spider solves this problem?
What do you think?
Thanks in advance!
GET http://www.example.com/friendscores?user=me
or if you prefer...
GET http://www.example.com/friendscores/me
or if you prefer...
GET http://www.example.com/friendscores/me
OneSadCookie Wrote:GET http://www.example.com/friendscores?user=me
or if you prefer...
GET http://www.example.com/friendscores/me
Thanks, but the problem is that I have to send all friends id of current player to my server, in order to know how of them have a highscore in my server. Do you understand me?
Can you store the user's friend ids on the server? If so, OSC's solution is by far the easiest.
If you send the user's id to the server, it could query facebook directly for the friends also.
Does this help clarify?
If you send the user's id to the server, it could query facebook directly for the friends also.
Does this help clarify?
KB Productions, Car Care for iPhone/iPod Touch
@karlbecker_com
All too often, art is simply the loss of practicality.
funkboy Wrote:Can you store the user's friend ids on the server? If so, OSC's solution is by far the easiest.
If you send the user's id to the server, it could query facebook directly for the friends also.
Does this help clarify?
So, you mean, apart from using facebook connect in my game, use also facebook in my server side to avoid those 300 requests, isn't it?
riruilo Wrote:So, you mean, apart from using facebook connect in my game, use also facebook in my server side to avoid those 300 requests, isn't it?That's one way to do it, and would reduce hitting the server so much.
KB Productions, Car Care for iPhone/iPod Touch
@karlbecker_com
All too often, art is simply the loss of practicality.
funkboy Wrote:That's one way to do it, and would reduce hitting the server so much.
There is one problem.
User uses facebook connect dialog inside my game, where he/she writes his/her password and login. But using that dialog, I don't know his password, so I cannot send ti to my server, and if my server doesn't have that password, it cannot interact with facebook.
What do you think?
Possibly Related Threads...
Thread: | Author | Replies: | Views: | Last Post | |
Saving scores for facebook users to compare with their friends | roguekiwi | 4 | 14,522 |
Sep 13, 2011 09:01 PM Last Post: roguekiwi |
|
persistent highscore after updates | Newbrof | 1 | 3,247 |
Feb 2, 2010 02:35 AM Last Post: Newbrof |
|
Perfomance (FPS) problems in OpenGL and SDL. Help. | riruilo | 12 | 8,813 |
Oct 15, 2009 06:58 PM Last Post: AnotherJake |
|
How can I share my game with my friends? | riruilo | 16 | 12,376 |
Apr 10, 2009 06:21 AM Last Post: Fred9000 |