incubator-photark-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Umashanthi Pavalanathan <umashant...@gmail.com>
Subject Re: REST integration for back-end functionality in photark-rest branch
Date Thu, 21 Jul 2011 06:43:09 GMT
On Thu, Jul 21, 2011 at 11:42 AM, Luciano Resende <luckbr1975@gmail.com>wrote:

> On Wed, Jul 20, 2011 at 10:56 PM, Umashanthi Pavalanathan
> <umashanthip@gmail.com> wrote:
> > Hi Devs,
> >
> > On Tue, Jul 12, 2011 at 2:33 AM, Umashanthi Pavalanathan <
> > umashanthip@gmail.com> wrote:
> >
> >>
> >>
> >> On Mon, Jul 11, 2011 at 9:56 AM, Umashanthi Pavalanathan <
> >> umashanthip@gmail.com> wrote:
> >>
> >>> Hi Devs,
> >>>
> >>> I have come up with the REST URI scheme for the Person and relationship
> >>> related Social concepts.
> >>> I used the PhotArk REST API [0] and the OpenSocial REST API [1] as
> >>> references for this purpose.
> >>>
> >>> The following are my initial thoughts. You feedback & suggestions are
> >>> welcomed.
> >>>
> >>> (1) Get a Person
> >>>
> >>> REST-HTTP-Method       = "GET"
> >>>
> >>> REST-URI-Fragment      = /people/{userId}/@self
> >>>
> >>>
> >>> (2) Get a Person's friends
> >>>
> >>> REST-HTTP-Method       = "GET"
> >>> REST-URI-Fragment      = /people/{userId}/@friends
> >>>
> >>>
> >>> (3) Get all Persons
> >>>
> >>> REST-HTTP-Method       = "GET"
> >>> REST-URI-Fragment      = /people
> >>>
> >>>
> >>> (4) Update a Person
> >>>
> >>> REST-HTTP-Method       = "POST"
> >>> REST-URI-Fragment      = /people/{userId}
> >>>
> >>>
> >> correction:
> >>  Update a Person
> >>  REST-HTTP-Method       = "PUT"
> >>  REST-URI-Fragment      = /people/{userId}
> >>
> >>
> >>> (5) Delete a person
> >>>
> >>> REST-HTTP-Method       = "DELETE"
> >>> REST-URI-Fragment      = /people/{userId}
> >>>
> >>>
> >>> (6) Create a Relationship request
> >>>
> >>> REST-HTTP-Method       = "POST"
> >>> REST-URI-Fragment      = "/people/realtionship/{ownerId}/{viewerId}
> >>>
> >>>
> >>> (7) Create a Relationship
> >>>
> >>> REST-HTTP-Method       = "POST"
> >>> REST-URI-Fragment      = "/people/relationship/{ownerId}/{viewerId}
> >>>
> >>>
> >>> (8) Get Relationship between two users
> >>>
> >>> REST-HTTP-Method       = "GET"
> >>> REST-URI-Fragment      = "/people/relationship/{ownerId}/{viewerId}
> >>>
> >>>
> >>> (9) Remove Relationship between two users
> >>>
> >>> REST-HTTP-Method       = "DELETE"
> >>> REST-URI-Fragment      = "/people/realtionship/{ownerId}/{viewerId}
> >>>
> >>>
> >
> > I have come up with the URI scheme for Activity and AppData related
> > concepts.
> > I would like to get your feedback & suggestions regarding this so that I
> can
> > proceed with the REST-integration of ActivityService and AppDataService.
> >
> > *Activity Related Operations:*
> >
> > (1) Save an Activity
> > REST-HTTP-Method       = "POST"
> > REST-URI-Fragment      = /people/{userId}/activities
> >
> > (2) Create an Activity
> > REST-HTTP-Method       = "GET"
> > REST-URI-Fragment      = /people/{userId}/activities
> >
> > (3) Update an Activity
> > REST-HTTP-Method       = "PUT"
> > REST-URI-Fragment      = /people/{userId}/activities
> >
> > (4) Delete an Activity
> > REST-HTTP-Method       = "DELETE"
> > REST-URI-Fragment      = people/{userId}/activities/{activityId}
> >
> > (5) Get an Activity
> > REST-HTTP-Method       = "GET"
> > REST-URI-Fragment      = /people/{userId}/activities/{activityId}
> >
> > (6) Get Activities for given activity IDs with optional filters
> >
> > (7) Get Activities for given user IDs with optional filters
> >
> > *AppData Related Operations:*
> >
> > (1) Get AppData
> > REST-HTTP-Method       = "GET"
> > REST-URI-Fragment      = /people/{userId}/appdata/{appId}
> >
> > (2) Create AppData
> > REST-HTTP-Method       = "POST"
> > REST-URI-Fragment      = /people/{userId}/appdata/{appId}
> >
> > (3) Update AppData
> > REST-HTTP-Method       = "PUT"
> > REST-URI-Fragment      = /people/{userId}/appdata/{appId}
> >
> > (4) Delete AppData
> > REST-HTTP-Method       = "DELETE"
> > REST-URI-Fragment      = /people/{userId}/appdata/{appId}
> >
> >
>
> Sounds good, and I have couple little questions :
>
> What can be an activity ?
>

Activity can be any action of a user. eg: Adding a new album, tagging a
photo, commenting on a photo, rating  etc.
So, to make use of this concept of "activity", when a user performs such
actions in PhotArk, they should be recorded as "activities" of that user.


> What can be an AppData ?
>

AppData is actually any name-value pair data we want to store for a user.
For eg if the user have done any configurations(i.e: property settings),
those details can be saved as name-value pairs. I don't see any usage of
this in PhotArk currently; but believe that this can be utilized in future.


> What's the scenario for updating a "activity" or "appdata"... just
> curious as other places such as Twitter, Facebook seem to only allow
> updates/delete and not really updates for some performance reasons.
>

Yes, true. But in the case of appdata, updating an appdata entry will be OK
I guess.

With respect to "activity" what I had in mind is updating a "comment" on a
photo or something like that. But even that can be recorded as another
"activity". So, the "update" might not be used considering performance
issues as you said; but I added it to have a complete set of operations on
"activity".

Hope I have answered the questions you had.


Thanks,
~Umashanthi


>
>
> --
> Luciano Resende
> http://people.apache.org/~lresende
> http://twitter.com/lresende1975
> http://lresende.blogspot.com/
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message