As we already have the necessary requirements to move forward with this algorithm, we will start developing it.
The main idea is comparing between all nearby users, but since for now we won’t care about distance when developing this, just consider all users in the DB previously added. These users will be compared with the current user in two ways:
Compare the base artists : This will be a comparison that checks if another user is currently listening to one of the current user’s top artists. If this happens, we return a positive result and would trigger in the Front End a notification.
Compare the similar artists : This follows the same guideline as the previous point, check what others are currently listening to, and check if that falls within the current user’s similar artists, then send a different notification in the Front End.
As you can see, the basis of the comparison is getting the current user’s sets, and checking if anyone else is currently listening to something within those sets.
As we already have the necessary requirements to move forward with this algorithm, we will start developing it.
The main idea is comparing between all nearby users, but since for now we won’t care about distance when developing this, just consider all users in the DB previously added. These users will be compared with the current user in two ways:
Compare the base artists : This will be a comparison that checks if another user is currently listening to one of the current user’s top artists. If this happens, we return a positive result and would trigger in the Front End a notification.
Compare the similar artists : This follows the same guideline as the previous point, check what others are currently listening to, and check if that falls within the current user’s similar artists, then send a different notification in the Front End.
As you can see, the basis of the comparison is getting the current user’s sets, and checking if anyone else is currently listening to something within those sets.