0

I am currently developing a web application. This application requires a timer for logging hours and logging breaks of employees. Now, I am searching for a way that once the user hit the

start logging hour button

or

start break button

The time will run by itself or as a background process. My current approach is using the MySQL Event Scheduler as a background process.

This event scheduler will update the tables and also it will calculate the time, like how much over break the employee taken or if the employee is late when he hit the start logging hour button. This is done when the event scheduler will call the stored procedure which where the logic taken place. This will happen "Every SECONDS".

Now, my questions:

  • Is this approach OK?
  • Does MySQL Event can handle this kind of approach?
  • What if there will be over a thousands employees logging in and breaking time? Does MySQL Event can handle the process?

One more thing.This application is currently develop using Laravel and VueJs. If you have good idea to implement this on Laravel or VueJS it will be also very helpful.

Yves Gonzaga
  • 1,038
  • 1
  • 16
  • 40
  • That approach makes no sense, it looks like you don't quite grasp what MySQL Event Scheduler does. – N.B. Mar 16 '18 at 16:31
  • Yeah, maybe enlighten me? – Yves Gonzaga Mar 16 '18 at 17:02
  • Well for start, what's the event scheduler even doing? Why would it run every second? You just mentioned `start` and `stop` buttons, then you have event scheduler running a query every second. Why? If your table records employee, start and end then what else do you need to calculate people's time whenever you want? Thousand employees logging time means nothing if you don't know: how many at once will do it, what's the server's spec because this runs on hardware and hardware **is** important. There are too many questions, it might be an idea to take this to Quora for discussion. – N.B. Mar 16 '18 at 18:18
  • So you don't recommend MySQL Event as the one who will update the record every seconds? If that's the case, what is your recommended approach? Doing it in frondt end script (VueJS)? or in Back end script (Laravel)? – Yves Gonzaga Mar 17 '18 at 14:32

0 Answers0