TWLan Forum
Using mysql events instead of cronjobs - Printable Version

+- TWLan Forum (https://twlan.org)
+-- Forum: Legacy (https://twlan.org/forumdisplay.php?fid=61)
+--- Forum: TWLan 1.x (DSLan) (https://twlan.org/forumdisplay.php?fid=62)
+---- Forum: Deutsche Community (https://twlan.org/forumdisplay.php?fid=65)
+----- Forum: Bugs & Feature Requests (https://twlan.org/forumdisplay.php?fid=68)
+----- Thread: Using mysql events instead of cronjobs (/showthread.php?tid=1860)



Using mysql events instead of cronjobs - hip_hop_x - 24.07.2009

I looked into dslan_start.bat also in the linux version, basic all it does it's an infinite loop wich is using allot of ressources.

This could be optimized allot with the new events from mysql 5.1.x
Instead of having a system like this
Code:
cronjob(loop) -> php -> mysql command

We could have this
Code:
events(loop inside mysql) -> mysql command

The process is very optimized because it does both processes inside mysql, doesn't have to use php or cronjob.
I hope you think about this optimization, the game ressources could be optimized allot with this thing.


RE: Using mysql events instead of cronjobs - dispy - 26.07.2009

Hi,

I just took a look at these new events ( I only had the old ones in mind ), this seems to be a quite good solution.
You could also create a new Event (dynamically) as a Cronjob in MySQL - that has the advantage that there's not always a worker running who needs resources and if many events reach their execution at the same time MySQl will simply create a couple of instances of the Eventhandler - a single worker-thread will probably lagg because it can only perform the events one by one and not parallel.

MySQl-Events are a good approach to improve the Performance of DSLan anyway ^^



MfG
dispy


RE: Using mysql events instead of cronjobs - hip_hop_x - 04.08.2009

yes, i'm using mysql events in some of my web apps


RE: Using mysql events instead of cronjobs - agrafix - 05.08.2009

The idea is pretty good, but I don't think we want to translate all the Events into mySQL - It's accutaly good that the DSLan uses lots of resources because it makes it harder to run with more than 10 users...


RE: Using mysql events instead of cronjobs - knollenmax - 05.08.2009

Könnte man den Thread mal auf Deutsch übersetzen?


RE: Using mysql events instead of cronjobs - Black Arrow - 05.08.2009

kannst du kein englisch? das meiste kann man sich doch aus dem zusammenhang erkennen. wenn du manches nicht weißt, dann übersetz es doch damit http://translate.google.de/translate_t?hl=de&sl=en&tl=de#


RE: Using mysql events instead of cronjobs - agrafix - 05.08.2009

Sagmal, müsst ihr aus jedem Thread nen Spamthread machen?


RE: Using mysql events instead of cronjobs - hip_hop_x - 07.08.2009

hmm another use for this is that ds_lan_start.bat could disapear if you can replace with mysql events. Anyway, it's a long term process


RE: Using mysql events instead of cronjobs - agrafix - 07.08.2009

(07.08.2009, 12:54)hip_hop_x Wrote: hmm another use for this is that ds_lan_start.bat could disapear if you can replace with mysql events. Anyway, it's a long term process

As I already mentioned - we are not going to do this. Not in V1, nor in V2.