jeudi 14 février 2019

Design solution for server client app in node.js and angular

I'm building my first MEAN application with socket.io and I need some advice how you would or how one would split between the server side of the application and the client side. It's an application where one can create a task which is then distributed by a dispatcher to different people who carry out the tasks. Now I'm at the part where I have to decide where to put a logic which automatically dispatches the tasks to the different people.

I was thinking putting that on the client side, where a user (the dispatcher) can push a button and tasks get assigned automatically. I know in angular I can have observers, which can watch a dataset for changes, so the automatic part of the app will always have all tasks available which have to be distributed. The automatic doesn't have to run when no one is available to carry out the tasks and the client side app will only run when the dispatcher is logged in.

On the server side, in node.js, I don't know if there is an equivalent to observers or something that can hold a dataset and watch it for changes and react on changes in the dataset.

I hope someone could give me some insight if this is the right way or a good way to implement such a feature on the client and not on the server.

thanks in advance for your suggestions

Aucun commentaire:

Enregistrer un commentaire