I am trying to simulate a realistic social network (Facebook). I am a graduate student in computer science, so I understand the basic data structures and algorithms.
Idea:
I started this project in java. My idea is to create several user areas. Each user in this area will have a random number of friends with a normal distribution for this tool. Each User will have a large percentage or group of "Friends" from the Area to which they belong. The rest of their “Friends” will be smaller clusters from several different random areas.
Initial structure
I wanted to create an ArrayList of regions
ArrayList<Area> areas
With each region where the ArrayList of users is located
ArrayList<User> users
And each user has an ArrayList "Friends"
ArrayList<User> friends
From there I can go through each Region and each User in this region and provide this user with most of my friends from this Region, as well several friends from several random areas. It is simple enough as long as my dataset remains small.
:
, OutOfMemoryError - . , , , , 30 Area 1 200 . 2gb 1 Area... . , , "" . . , "", .
:
, . , . , , , .
:
1. / . User- > Friends. "Area" - .
2. . , , Lucene, Hadoop .., Java ... , - .
3. ? , java . , .
, , , . , , / .