Latest Posts

Topic: New notifications

kaputtnik
Avatar
Topic Opener
Joined: 2013-02-18, 20:48
Posts: 2433
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2017-05-09, 22:01

Hi all,

I did some updates to the website. For the users the most interesting changes are:

  1. Creating of new topics should be much faster now
  2. It is now possible to get an email if a new map is uploaded onto the server. Please got to the Notifications page and adjust the settings if you want to get emailed for the things you want an email notification.

Sending emails is deferred, there is a delay of max. 20 Minutes until you will receive the notifications for

  1. New topics
  2. New forum posts
  3. A new map was uploaded

Hopefully all works fine, sincerely
kaputtnik

(Post it as topic to test the speedup of creating topics face-wink.png )
(Yes its really faster face-smile.png )

Edited: 2017-05-09, 22:03

Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2017-05-09, 22:13

Faster topic creation is indeed a great feature face-smile.png

P.S.: submitting posts is also faster now!

Edited: 2017-05-09, 22:13

Busy indexing nil values

Top Quote
SirVer

Joined: 2009-02-19, 15:18
Posts: 1445
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2017-05-10, 05:54

Speed is a feature that most people do not mention, but that sub-concisely affects satisfaction with a product significantly. Great work, kaputtnik, you are truly a hero of the people!!


Top Quote
king_of_nowhere
Avatar
Joined: 2014-09-15, 18:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2017-05-12, 01:13

topic creation was already very fast, i don't see the difference. improved notifications are welcome


Top Quote
kaputtnik
Avatar
Topic Opener
Joined: 2013-02-18, 20:48
Posts: 2433
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2017-05-12, 08:21

king_of_nowhere wrote:

topic creation was already very fast, i don't see the difference.

Yes, the creation is fast, but the response took a very long time. There where some users who created two identical topics, because after clicking 'send' the users Browser-tab does not update (the tab indicates 'working') and they assume something has gone wrong. The problem on server side was that after clicking 'send' the new topic was saved very fast, but the server did not send the response back to the user immediately. The response was only send until all 'new topic subscribers' get emailed. So the more 'new topic subscribers' there are, the longer took the response and the browsers tab indicates 'working' for the user who creates the new topic.

improved notifications are welcome

I am working on some more notifications (e.g. map comments, new news), but this isn't trivial face-smile.png


Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote
einstein13
Avatar
Joined: 2013-07-29, 00:01
Posts: 1118
Ranking
One Elder of Players
Location: Poland
Posted at: 2017-05-12, 19:55

So how did you solve this? By threading? Or something else?


einstein13
calculations & maps packages: http://wuatek.no-ip.org/~rak/widelands/
backup website files: http://kartezjusz.ddns.net/upload/widelands/

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2017-05-12, 20:03

He shoved all the e-mails into a queue that will be taken care of by a chron job every 20 minutes face-smile.png

All the gory details can be read here.

Edited: 2017-05-12, 20:04

Busy indexing nil values

Top Quote
kaputtnik
Avatar
Topic Opener
Joined: 2013-02-18, 20:48
Posts: 2433
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2017-05-12, 21:03

einstein13 wrote:

So how did you solve this? By threading? Or something else?

To be honest i didn't solved it really, just used the code that was initially there. Emails are queued as pickled objects in a database table. A cron job runs every 20 minutes to unpickle the data and send the emails.

Threading was also an idea, but since the implemented solution works, i didn't look into it much.


Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote
einstein13
Avatar
Joined: 2013-07-29, 00:01
Posts: 1118
Ranking
One Elder of Players
Location: Poland
Posted at: 2017-05-12, 21:27

Nice idea! face-smile.png

I would bring celery task queued. It is working faster (a few seconds), but probably it needs more configuration face-wink.png I guess that cron is included to some linux distributions as default?

Great work, Kaputtnik!


einstein13
calculations & maps packages: http://wuatek.no-ip.org/~rak/widelands/
backup website files: http://kartezjusz.ddns.net/upload/widelands/

Top Quote
kaputtnik
Avatar
Topic Opener
Joined: 2013-02-18, 20:48
Posts: 2433
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2017-05-22, 21:49

Sorry overlooked your post face-upset.png

einstein13 wrote:

I would bring celery task queued. It is working faster (a few seconds), but probably it needs more configuration face-wink.png

Yes, celery seems to be the thing for threading. But it brings also another third party dependency to the website. With every third party dependency there is more work for maintenance.

I guess that cron is included to some linux distributions as default?

Yes, cron is default in every linux distribution (as far as i know).

Great work, Kaputtnik!

Thanks face-smile.png


Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote