Assume followings:
/mykeys/.ssh/prodserver.pem
- is a certificate file
umid
- is a user name
111.111.111.111
- is a remote host, that mongodb runs
// ------------------------------------------------------------------ | |
// Friend collection, where _id is a user.Id and Friends is a list, of user.Id. | |
// Note: friending and unfriending is a two step operation in this scheme: | |
> db.friends.find() | |
{ "_id" : 1, "friends" : [ 2, 3, 4 ] } | |
{ "_id" : 2, "friends" : [ 1, 3, 5 ] } | |
{ "_id" : 3, "friends" : [ 1, 2, 4, 5 ] } | |
{ "_id" : 4, "friends" : [ 1, 3, 5 ] } | |
{ "_id" : 5, "friends" : [ 2, 3, 4 ] } |