Keeping an updated DataBase - problem..

1 view
Skip to first unread message

Kogan

unread,
Sep 15, 2008, 12:22:55 PM9/15/08
to Orkut Developer Forum
Hello,
We have a question:

We need to have a database of friends - so each person that has our
application, all his friends (who has our application) will be listed.

How can we keep the Database updated?
So when needed - we can retrieve each user friends' friends ?
(that is, we don't know if at some time
one of them added another friend - so we are no longer
updated...that's the problem, because if we now address
the DB it's incorrect at this present time).


Thanks,
Kogan.


Jason

unread,
Sep 16, 2008, 7:27:52 PM9/16/08
to Orkut Developer Forum
Hi Kogan. In general, you shouldn't need to recreate the social graph
in your database. Is there a reason why you can't just query orkut for
the list of friends every time a user tries to use your application?
What is your use case, exactly? orkut is not going to trigger an "add
friend" event that your application can listen for, so you should
design your app accordingly.

- Jason

Kogan

unread,
Oct 3, 2008, 5:15:48 PM10/3/08
to Orkut Developer Forum
Hello Jason,
my use case is this -

I want to save:
(*on my back end server, not using the persistence API or something
like that, that allows me a small memory space to use using Orkut
itself)
a list of lets say "items" for each user that has my application. That
is, my application lets a user add/remove items from his private
"items-list". So, I want to save this information on my server. But -
how can I keep it updated?

say a user suddenly deletes an item from his list. How can I know that
it is time to update my server? (Do I have to query about each user
and update his list of items every time I want to do something??? )


Thank you :)
Kogan



On Sep 17, 2:27 am, Jason <apija...@google.com> wrote:
> Hi Kogan. In general, you shouldn't need to recreate the social graph
> in yourdatabase. Is there a reason why you can't just query orkut for
> the list of friends every time a user tries to use your application?
> What is your use case, exactly? orkut is not going to trigger an "add
> friend" event that your application can listen for, so you should
> design your app accordingly.
>
> - Jason
>
> On Sep 15, 9:22 am, Kogan <kog...@gmail.com> wrote:
>
> > Hello,
> > We have a question:
>
> > We need to have adatabaseof friends - so each person that has our

Jason

unread,
Oct 6, 2008, 5:51:39 PM10/6/08
to Orkut Developer Forum
Hi Kogan. You can store the items in the back-end and associate them
with the user's ID. When a user tries to add an item, use a
makeRequest call to send a signed HTTP request to your back-end with
the item information. The ID of the user will be sent as a parameter
with the signed request so you can properly associate the item with
the user when you insert a new database record. Then, when the user
removes an item, you can send another makeRequest to your back-end to
delete the record.

In this way, your database will stay updated as your users interact
with your app. Does this answer your question?

- Jason

Kogan

unread,
Oct 23, 2008, 1:30:30 PM10/23/08
to Orkut Developer Forum
Hello Jason, yes it does (I realized it was rather a stupid question
as well :) )




On Oct 6, 11:51 pm, Jason <apija...@google.com> wrote:
> Hi Kogan. You can store the items in theback-endand associate them
> with the user's ID. When a user tries to add an item, use a
> makeRequest call to send a signed HTTP request to yourback-endwith
> the item information. The ID of the user will be sent as a parameter
> with the signed request so you can properly associate the item with
> the user when you insert a new database record. Then, when the user
> removes an item, you can send another makeRequest to yourback-endto
> delete the record.
>
> In this way, your database will stay updated as your users interact
> with your app. Does this answer your question?
>
> - Jason
>
> On Oct 3, 2:15 pm, Kogan <kog...@gmail.com> wrote:
>
> > Hello Jason,
> > my use case is this -
>
> > I want to save:
> > (*on mybackendserver, not using the persistence API or something
Reply all
Reply to author
Forward
0 new messages