Hi Promt me if i am wrong ........
Firstly, What i take it as from spec that NETWORK DISTANCE=2 would exclude people with NETWORK_DISTANCE <2 in the result set. The way i take it as : 1) "any path" --- No, as i am assuming that NETWORK DISTANCE=2 would exclude people with NETWORK_DISTANCE <2. 2) I take it as if am trying to find people with network distance 2 i.e. fof I would take all people who have "shortest path=2" in the graph from the origin. 3) Finally if i try and find people with NETWORK_DISTANCE=3 i would exclude "all people that have shortest distance from the origin to the entity less than 3" as they would some how fall in result set for NETWORK_DISTANCE=1 or NETWORK_DISTANCE=2. As a whole i am following orkut's pattern of defining the a friends distance from the origin which gives out the shortest path to the entity. Cheers Peeyush On Wed, Sep 3, 2008 at 2:45 AM, Louis Ryan <[EMAIL PROTECTED]> wrote: > Its not very clearly stated in the spec whether a NETWORK_DISTANCE = 2 > excludes users with a NETWORK_DISTANCE=1 from the origin. There are a > number > of different ways to define the resultant set > > 1. All related entities are included if *any path* in the graph to that > entity from the origin has a distance *less than or equal to* the specified > distance > 2. All related entities are included if the *shortest non-looping* path in > the graph to that entity from the origin has a distance *equal* to the > specified distance > 3. All related entities are included if the *the longest* non-looping path > in the graph to that entity from the origin has a distance *equal* to the > specified distance > > Given that most implementers would like to use SQL or something similar to > implement this feature. Imagine a schema with a bi-direction friend_links > table with a related_to, related_from columns of userids. Then to generate > a > NETWORK_DISTANCE=3 (friend of friend of friend) query you would have > something like > > select fofof.related_to from friend_links fofof, friend_links fof, > friend_links f > where f.related_from = origin-userid and > fof.related_from = f.related_to and > fofof.related_from = fof.related_to > > While this may look like the definition of no. 2 it is in fact no. 1 above > becuase the friend_links table is bi-directional and therefore allows for > loops. In general I had assumed that the definition of distance was no. 2 > above but clearly this needs some firming up. > > > > > On Tue, Sep 2, 2008 at 11:51 AM, Ropu <[EMAIL PROTECTED]> wrote: > > > the net distance in the spec is alway centered in the Owner or viewer > > > > and then, depending on the distance and group id you will retrieve > Friends > > (net distance = 1), friends of friends (netDistance = 2) etc. > > > > And other DIFFERENT call is networkDistance(userId1, userId2); that will > > return how many steps in the Graph separates UserId1 and 2 > > > > this last one is NOT part of the spec yet > > > > hope this helps > > > > bruno > > > > On Tue, Sep 2, 2008 at 3:28 PM, peeyush gulati <[EMAIL PROTECTED] > > >wrote: > > > > > Dear GB > > > > > > Thanks for the reply. > > > > > > I have an understanding of the same and have no doubts over distance > > 0,1,2 > > > > > > But what i asked was more from shindig prespective and he case i had > > > explained. > > > > > > The documentation on network distance in gole docs does not specify > abput > > > the case i had asked. > > > > > > Can you please re look at the case i had mentioned !!!!!! > > > > > > > > > > > > > > > On Tue, Sep 2, 2008 at 11:48 PM, Guido Barosio <[EMAIL PROTECTED]> > > wrote: > > > > > > > FYI > > > > > > > > > > > > > > > > > > http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.IdSpec.Field.NETWORK_DISTANCE > > > > > > > > Hope it clears out your doubts. > > > > > > > > GB.- > > > > > > > > On Tue, Sep 2, 2008 at 11:10 AM, peeyush gulati < > > [EMAIL PROTECTED] > > > > > > > > wrote: > > > > > Any update !!!!! > > > > > > > > > > ---------- Forwarded message ---------- > > > > > From: peeyush gulati <[EMAIL PROTECTED]> > > > > > Date: Sat, Aug 30, 2008 at 4:09 PM > > > > > Subject: Network Distance > > > > > To: [email protected] > > > > > Cc: peeyush gulati <[EMAIL PROTECTED]> > > > > > > > > > > > > > > > Hi All > > > > > > > > > > I was concerened about Network Distance feature of open social > > > > specification > > > > > 0.8 > > > > > > > > > > What i understand of network distance is the distance between 2 > > people > > > in > > > > a > > > > > social networking. > > > > > > > > > > Lets say a case is there > > > > > > > > > > (A)--->(B) " ---> INDICATES FRIEND > ' > > > > > (A)--->(C) > > > > > > > > > > (C)--->(D) > > > > > (C)--->(E) > > > > > > > > > > > > > > > (D)--->(E) > > > > > > > > > > the same has been shown in the diagram attached here. > > > > > > > > > > Now according to my understanding Network Distance between A & E > = > > 2 > > > > and > > > > > also 3 when we take person D into the path. > > > > > > > > > > So do we give a priority to the lesser one. Or would this person D > > > come > > > > up > > > > > in both the cases when finding people with network distance 2 or 3. > > > > > > > > > > > > > > > I believe Network distance is still not supported and updated into > > > > shindig. > > > > > Are we going to do the same in shindig release 1.0 or can we do it > > > > before. > > > > > Also please specify what algorithm we would follow in cases like > > above. > > > > > Implementing a algorith is not a big deal but i am skeptical about > > > > gadgets > > > > > whiich would fetch people with network distance 4,5 and above, > > keeping > > > > the > > > > > complexity of computation in place. > > > > > > > > > > > > > > > Please do correct if my understanding is wrong at any place. > > > > > > > > > > > > > > > Thanks and Regards > > > > > Peeyush > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > Thanks and Regards > > > > > Peeyush Gulati > > > > > +91-9916304135 > > > > > > > > > > > > > > > > > > > > -- > > > > > Thanks and Regards > > > > > Peeyush Gulati > > > > > +91-9916304135 > > > > > > > > > > > > > > > > > > > > > -- > > > > Guido Barosio > > > > ----------------------- > > > > http://www.globant.com > > > > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > -- > > > Thanks and Regards > > > Peeyush Gulati > > > +91-9916304135 > > > > > > > > > > > -- > > .-. --- .--. ..- > > R o p u > > > -- Thanks and Regards Peeyush Gulati +91-9916304135

