This component
Hi Hugo,
dev3 will fetch ALL member records now.
You may control the number of fetched records (see my comments on line 35/36)
if the delay after clicking 'post' is getting too long.
Actually I'm curious how many members it will handle in a satisfying way now ... :)
One thing to note:
Since you had a look into your notification table already, you will see that all created records of type 'group:post' and 'profile:post' will be deleted when the related post has been deleted. Because that's in fact done by my component.
On the other hand that means:
will leave orphaned notification records in place pointing to posts which aren't available anymore. This wouldn't crash your site, but your members are getting these 404 pages when clicking their notification.
I made a new test from zero.
with administrator user (GUID 1) i create a post in the group.
Users from GUID 2 to GUID 10 received notification (9 users)
Then i tested with user GUID 1000 (User 0999) to make a post in the group.
Users between guid 1 to 10 received a notification (10 users)
Then i made another test with the user 0009 (GUID 10) creating a post in the group.
Users between guid 1 to 9 received a notification (9 users)
As a concept, the notifications works (for the first 9-10 members) i wanted to test what happens if the notification goes to all in the database, but i agree with you, a better mechanism like a cron job is better.
Thanks for the patience.
Thank you very much for you feedback, Hugo
Dev2 comes with notifications on group posts now.
Example below: Micha did a new post in Group One, and Honey and Botox - both members of that group got notified.
Basically working this way - but I have my concerns about the scaling on groups with thousends of members since creating a datase record for each one will take its time. So thinking in longer terms this should perhaps better handled by an asynchron cron job.
Maybe you do have the time to create a bunch of fake users and see what happens ;)
Hello Michael,
I have set up a virtual machine for testing and it works as expected.
I did a chained test.
User A > User B ✓
User B > User C ✓
User C > User A ✓
Consecutive:
User B > User A ✓
User B > User A ✓
User B > User A ✓
The user receives each corresponding notification of each new publication in the profile.
Tested in a fresh install with latest dev branch.
Thanks, i will wait when the component is ready for production with the groups notifications.