amazon web services - AWS NoSQL or AWS RDS, what are the good ways to store social graph? -
recently want store social graph information our database, , user discovers new social nodes automatic "mapping" happens on server end has social graph.
background: each time new client visits, store his/her existing social nodes other sources, 1 example facebook. have list of facebook friends facebook id of client , store in database. server tries match each item in client's list of friends existing clients. if there match, means client has friends using service. server returns matched list , marks match on other side of edges. next time clients' friends come back, receive notice of done matching.
obstacles: problem mechanism requires server store complete list of clients' social graph, in example clients' complete list of facebook friends. since social graph can arbitrarily large, cannot store 1 single item, span across multiple items or rows client id , friend id pair. if store way, keys can distributed pretty unevenly means cannot use dynamodb. want explore possibilities of storing in aws nosql services gain fast access advantage.
so there ways store these data in aws nosql servers? or optimizations can put them in rds not losing efficiency?
actually, dynamodb might work quite use case... dynamodb supports multi-value fields , has maximum record size of 64k.
so create 'friends' table of 2 columns 'clientid' hashkey, , 'friendid' multi-value field.
this means need 1 record store complete friends list user (up 4,000 friends assuming guid 'friendid'). , if needed use multiple records users more 4,000 friends...
Comments
Post a Comment