Note that there are some explanatory texts on larger screens.

plurals
  1. POImplementing news feed on GAE - Should I use Prospective Search?
    primarykey
    data
    text
    <p>I have an issue i'm struggling with for some time now. Im trying to implement a news feed feature in my app using GAE cloud endpoints and java. The common concept is of followers and followees, where an action of a followee can be seen by his followers. A new follower should also see his followees past actions, not only from the time he started following.</p> <p>I made a few tries with the following components. Each try worked great but was lacking something:</p> <ol> <li>On each user action i added a 'log' entity into the datastore with the user id included. When a user was displaying his news feed i just queried for all those entities by their user ids according to the user's followees list. Everything was fine until i realized that a 'IN' query cannot be cursored. So this option was gone.</li> <li>On this try, which is also the current state of the application, im using the Search API. Upon every user action im not storing a 'log' entity into the datastore anymore but a document into a search index. Complex queries can be cursored here and the world is smiling again. But... im not too sure that, billing wise, this is a smart descision. It seems that the costs of searching/adding/deleting documents along side the <a href="https://developers.google.com/appengine/docs/java/search/#Java_Search_API_quotas_and_pricing" rel="nofollow noreferrer">documented </a>daily limitations is making the whole thing a bit too sketchy.</li> <li>The next try should be Prospective Search API. From what i'm reading in the <a href="https://developers.google.com/appengine/docs/java/prospectivesearch/" rel="nofollow noreferrer">documents</a> it seems the right component to pick for that purpose. Unfortunately, the documentation is really poor and give very little examples. Also the billing information is unclear.</li> </ol> <p>So im asking for the advice of the stackoverflow community. Can you please advise me about this matter ? and if Prospective Search is the right option to choose, can you please provide some clear sample java code that uses cloud endpoints?</p> <p><strong>EDIT :</strong> Just to emphasize the main design requirement here - The news feed feature need to have the ability to fetch sorted followees actions using a cursor (in order avoid querying the whole batch).</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload