Tag Info

Hot answers tagged

7

This is apples and oranges. An Event Driven system can pass messages ( messages in this context are implied immutable non-shared data ) as the events are raised. This is a purely architectural design. A Message Passing system can be driven by events that trigger the messages to be created and passed. This is a purely implementation design. The two are not ...


7

In my experience the only specific difference is that in most message passing systems, the sender of the message is aware of (and often declares) who the recipient of the message is. So instead of raising an event and anyone who is sucscribed to the event getting it, the sender defines some id of the intended recipient(s) or logical group of recipients and ...


3

In objective C, classes are objects, but what object owns the class objects? For an object to stay around it's not necessary to be owned by someone. They are just never released. The runtime of course has pointers to all classes, so in a way you could argue class objects are owned by the runtime. Where does the inheritance chain end? The ...


3

This problem has been faced may times when trying to build a reliable communication protocol on top of an unreliable one. That starts with TCP (as the underlying IP protocol is unreliable) and any protocol that uses UDP as transport mechanism. The basic idea is that each message/packet gets an identification number and the recipient sends an acknowledgment ...


3

I get what you're asking but the implementation you're describing is remote authentication, not session state. Session state doesn't care whether the user is authenticated or not. You don't want sessions to require authentication generally. Regardless, back to the question: What you are interested in is Distributed Session State. Traditionally, this is ...


3

Both are variants of dynamic dispatch (aka overloading resolved at execution time). Overloading is for me (I'm not an original, that's Cardelli and Weger classification) a kind of polymorphism. I'm not sure I understand what could be meant here. If I'm guessing correctly, your citation is making a difference between "polymorphism" which would be overloading ...


2

Much of the confusion between "message passing" and "event based" has to do with architectural vs. implementation details. I have seen (and written) event driven systems that actually use OS provided messages for their implementation. I am guessing you are really referring to architectural ideas. As many people have already pointed out "message passing" ...


2

What AProgrammer said, with one crucial addition: message passing (a la Smalltalk, Objective-C, Ruby) permits the forwarding of a message (for transparent proxies) or even the runtime generation of a method implementing that message. I'm using Smalltalk terminology, where a message is the name of the function/method being invoked. Objective-C folk would ...


2

Quick answer to the question that you haven't asked yet: the entity ID tag is like the key to a database row in a table, you query the system(s) using that key and pluck out the info you need. Yes it is theoretically slower than storing pointers away. No, it is not as slow as you would think because systems can look up that key O(1). Another quick answer ...


2

Sounds like CQRS - Command Query Responsibility Segregation Here's Martin Fowler on the subject: http://martinfowler.com/bliki/CQRS.html


2

In Objective-C, by convention, you refer to properties with dot notation. Thus, you write myAppObject.theArray instead [myAppObject theArray]. In Objective-C the default getter is the name of the variable instead getVariable. For example, writing @property NSArray *theArray; creates an instance variable _theArray and generates the following accessor: ...


1

the blocking in Invoker the protocol is in Invoker, maybe I want to switch marshalling to something else the map as mean to get the correct response for a request the SIP abstract method looks strange No error handling No timeout Your channel by design is NON-BLOCKING. Your implementation with the while() loop makes it not. Employing ...


1

Is this considered ugly and/or bad design? Yes. Should I [...] make more specific method calls - instead of passing constants that have to be interpreted with a bunch of ifs? Yes, that's exactly what you should do. Unless there is some reason not to. Given that you've already thought of this much cleaner option yourself, I suspect that there ...


1

There are several choices here, in increasing order of preference (most preferable last): Bits (flags) in an integer. Can be confusing, but allows packing a lot of them into a single int. So DO_THIS = 1 DO_THAT = 2 DO_ANOTHER = 4 DO_ZING = 5 perform(DO_THIS | DO_THAT) if (command && DO_THIS{ doThis(); } ...etc Integer commands DO_THIS = 1 ...


1

The general solution to avoid repeating boilerplate is to pull it out into its own class. In this case, you would usually create a Publisher class that handles avoiding cycles for you. var tempoPublisher = new NumericPublisher(); tempoPublisher.onTempoChange(moveTempoSliderWidget); tempoPublisher.onTempoChange(changeSequencerTempo); ...


1

Are they two very different concepts which I have misinterpreted into different implementations of same concept? They do serve essentially the same purpose. It's like the difference between nails and screws: either can fasten two boards together, but they work differently. What is the difference then? One difference lies in which objects you can ...


1

They are very, very different mechanisms that provide vastly different features. The C++ virtual dispatch mechanism is like a function pointer. The C++ compiler generates a construction function that fills a thunking table with pointers for calling functions. The lookup is as quick as calling void(*)(). This is completely static though and doesn't allow ...


1

Systems and Components are no restricted to 1:1 relationship, though that is a desired trait that allows parallel processing without requiring synchronization. Generally a system can operate on any number of components attached to a entity. For example consider the following typical setup: Components Mass Acceleration Velocity Position BoundingVolume ...


1

In my experience, the biggest difference between the two is that messages in a message-passing system are first-class objects, whereas events in event-driven systems are much simpler. Messages tend to carry information, and that information may be transformed, stored, retrieved and re-sent. Events tend to carry smaller, more focused bits of information ...



Only top voted, non community-wiki answers of a minimum length are eligible