Home > Net >  C # for advice about the difference between event-driven and message driven and use cases
C # for advice about the difference between event-driven and message driven and use cases

Time:11-21

In the project before, for data, sometimes using polling to monitor changes, then in the BBS often see sp1234 elder said asynchronous, event-driven and slowly learning, events, INotifyPropertyChanged... Gradually understand and use, the feeling on the program logic and reason are more scientific, then expand the message-driven, find the related information and the difference between event-driven and message-driven online, always feel in the clouds and fogs, there are a lot of people said no distinction, I personally feel event is the message encapsulation, specific what is still uncertain, so consult guidance of predecessors, the difference between event-driven and message driven, and where, more scientific project in which way? Thank you for the

CodePudding user response:

I personally feel, like just semantics,

As production, consumption patterns, a message out, trigger consumers subscribe to events,
The whole a message-driven or event driven, in fact, in my opinion, is no problem,

Feel it's like discussing "back" of the four kinds of writing

CodePudding user response:

New winform, drag a button, double click on the button to generate an event, click on the button, the button will perform, about the meaning of

CodePudding user response:

reference 1st floor is nu month god reply:
I personally feel, like just semantics,

As production, consumption patterns, a message out, trigger consumers subscribe to events,
The whole a message-driven or event driven, in fact, in my opinion, is no problem,

Feel it's like to discuss "back" of the four written


Oh my god, you're not the c # small master? Post bar is now occupied by generation and advertising!!

CodePudding user response:

I think the key is not the message driven or event-driven
But the difference between polling and trigger
Regardless of the event driven or message driven is triggered

CodePudding user response:

Now you can put the event driven and message-driven same as ,

Senior developer may think they are some subtle differences, such as
Events that are likely to be higher coupling, c #, may not be easily used by c + + side,
, low coupling, easy is independent of the specific implementation, messages can be a string, for example, it can be used c #, Java program can also use it,
News, tend to have a message delivery mechanisms, such as the Windows message loop, the RabbitMQ message queue protocol etc.,

CodePudding user response:

You understand a little bit yes, positive,

Reincarnation is, of course, now is another cycle, the message-driven reincarnation, as for science and not scientific don't tangle, perhaps the next reincarnation is event

On the meaning of a reincarnation, encapsulation improve productivity, after all, that s the story of an observer mice and cat, is Fried make blog garden for 7, 8 years, no simple point, they will be there. There will be north bird?
Now is the meaning of decoupling rebirth, since mass base came up, so complicated things came, and the monomer used, distributed, micro service, GRPC, two-way communication, so the demand of decoupling is came up, XXX, XXXX +=
I finally know XXX, and you must give injection to the XXX (inject the let's just say, you are sharing, injection etc), you must put your code to know XXX

So, in order to remove this coupling, using the message directly,

As for the future, who knows? Perhaps along with the evolution of the Actor model, the Actor directly put distribution event is also not clear

Don't so don't tangle what science and science, is suitable for your project

CodePudding user response:

reference Haitani reply: 3/f
Quote: refer to 1st floor is nu month god reply:

I personally feel, like just semantics,

As production, consumption patterns, a message out, trigger consumers subscribe to events,
The whole a message-driven or event driven, in fact, in my opinion, is no problem,

Feel it's like to discuss "back" of the four written


Oh my god, you're not the c # small master? Post bar is now occupied by generation and advertising!!

Yeah, so also did not go to the c #, ha, ha, ha
  •  Tags:  
  • C#
  • Related