[erlang-questions] COWBOY loop handler issue

Mohammed mazhar uddin mohammedmazharuddin@REDACTED
Thu Sep 14 10:22:14 CEST 2017


Hello,

     I am new to cowboy and i am trying to create a web application but 
here i am having a issue with loop handler or say server sent events,

         my requirement is that i need to send a message to my loop 
handler from another module which in terms will send the message to 
clients and buttons will be rendered on the web page.

my questions are

1)How can i send message to my loop handler from another module?

2)Which process exactly spawns my loop handler.

3)Why my loop handler is dying and executing again and again after a 
specific span of time when a client is in communication with server.


The big picture of my requirement.

       -I have a Terminal and few network elements, the moment those 
elements boots up they send a registration request to my erlang module 
from where i have to send a message to my loop handler to render those 
elements in the form of buttons in my web application.

       -Here i cant even register my loop handler as every time a new 
request comes, a new process is being created.

            how do i overcome this issue?

                 please reply in the earliest.

                     Thanks in advance.


Regards,

Mazhar.




More information about the erlang-questions mailing list