Best practice for architecture


#1

Hello,

i am building a indsutrie app in node and i want to use adonis (server and websocket) for the hmi (web ui) part and eventually lucid for database. There is a lot of communication with other systems like siemens s7 and so on.

My question is how to optimally integrate adonis in my app?

As an example:
Thers is a machine layer how manages communication with the hardware. Hardeware sends a telegram to an open node tcp socket or it got an event from opcua server et cetera. now it should update the ui and save the request to database and so on.

Should i use Events for comunication between adonis and my app?
Must i wrap all my classes in ioc containers that emit websocket messages or fire events?

I have no idea how to start and do not want to make an architectural mistake right at the beginning.
The prototype works but is not at all handsome.

I hope I have expressed myself clearly and the adonis cummunity can help me to find the best approach.

THX
Mario