Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6941797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:55:54+00:00 2026-05-27T12:55:54+00:00

I’m currently implementing a web service providing the social features of a game. One

  • 0

I’m currently implementing a web service providing the social features of a game. One of this game feature is the ability to manage a friends list. The friends the user can add depends on the contacts he’s having on an external social network of his choice (currently Facebook or Twitter).

The current behavior of the system is the following:

  • The client application uses the social network (Facebook or Twitter) API to retrieve the contact list of the player.
  • Each of this contact is provided with a unique identifier (namely, the social network he’s originating from, and its identifier on this social network, for example “Tw12345”).
  • The client sends the list of all those identifiers to the game web service hosted on GAE.
  • The web service checks for each identifier if it has a user that matches in his own database.
  • It returns a list of identifiers, filtered to contains only those who also have a match in the game database.

It obviously doesn’t work well, because most users contacts list are huge. The server is spending a tremendous amount of time checking the database to filter which contact have a matching game account.

Now, I’m having a hard time figuring out how I can proceed more efficiently. As the identifiers aren’t following any given order, I can’t use integer operations to select users on the database. Also, I can’t rely on Twitter or Facebook to do the filtering on their side, because that’s not supported by their API.

I thought of a system using some kind of memcached data tree to store a list of “known” identifiers (as the query only needs to know that there’s a matching user, not which user exactly is matching), but I’m afraid of the time the cache will take to build up anytime it gets cleared.

If any of you have an experience on this kind of set-related trouble, I’ll be very happy to hear it! Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T12:55:55+00:00Added an answer on May 27, 2026 at 12:55 pm

    I assume it’s so slow because you’re doing a query for each user you’re looking up. You can avoid the need to do this with good use of key names.

    For each user in your database, insert entities with their key name set to the unique identifier for the social network. These can be the same entities you’re already using, or new ‘index’ entities created just for this purpose.

    When sent a list of identifiers, simply do a bulk get operation for all the key names of that entity to identify if they exist – eg, by doing MyKind.get_by_key_name(key_names).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I want use html5's new tag to play a wav file (currently only supported
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm interested in microtypography issues on the web. I want a tool to fix:
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.