I want to simulate social network activity. How to approach the problem?

Joined
Dec 10, 2011
Messages
6
Reaction score
0
I'm a PHP dev, and I have been doing that for 10 years. I want to challenge myself and simulate social network activity, for example, something simple: liking posts and following people. For this example let's take a case where I have 100 generated ("fake") users and 1 real user (me).

I was thinking about 2 possible approaches:

1st approach

I act on behalf of generated users. For example real user posts a picture:

- Event is dispatched

- code takes random 80 users and assigns them as followers

- code takes random 50 users and assign them as they like the picture

That is a pretty straightforward approach, where code takes actions based on events (pic posted, user registered) and assign fake users to certain actions. I could use queues and workers on the server to approach this.

2nd approach

Each fake user acts as a real user. So in my case it would be 100 users but each user programmatically acts as a real user. That would mean that I would need to have 1 worker for each fake user, and then trigger user on every event that happens, like: user registered, user posted a pic and so on.

My thoughts

For example event is "user registered" and that event is distributed:

1st approach: I assign X number of users to be followers
2nd approach: each fake user "decides" (it can be random decision true/false) to follow a user or not

2nd approach seems more natural and more user based vs 1st approach where I just manipulate with fake users and assign them actions. I know AI would be great for it, I'm opened for that suggestions also. RIght now I'm just trying to figure out how to approach the problem and what would be possible solutions.

What worries me is how do I make each fake user to react to events, that means each user needs to be ran as a new process?
 
Joined
Mar 11, 2022
Messages
226
Reaction score
32
I don't buy your 10 years experience story in PHP. Sorry. So that's fishy to me. I will help you for the truth. I hate liars. So come up with the truth and stop telling tales in here. No one is perfect in here and no one is expected to be. But that is rediculous.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,699
Latest member
AnneRosen

Latest Threads

Top