Internet Programming What are the advantages of event driven
Internet Programming. What are the advantages of event driven architecture versus threading?
Solution
threads and events
In a thread,when request comes , new child thread gets created and all the handling operations is done in that thread.
In events, when request comes ,new event gets dispatched and handler will pick up the new event
Why event driven architecture is better????
threading architecture adds additional overhead and stuation worsens and becomes hopeless,whe we have to handle many concurrent threads.
every single line of the program must follow certain programming guidelines in multi threading architecture and this is not easy,where as this problem is not there in event driven architecture
Multi -threading wasts cpu time ,if infinite loop are encountered
Multi-threaded programs sometimes lead to situations where there are many runnable threads.
