Questions tagged [message-passing]

Message passing is a data transfer mechanism that is used in various forms in a number of programming languages

The basic form of data transfer in programming languages is the assignment statement. It is carried out by a (computing) agent that moves data from one part of the memory to another. The substantial difference between assignment and message passing is that message passing incorporates two active agents, a sender and a receiver. The sender has exclusive control over the source locations of the data to be transferred, while the receiver has exclusive control over the destination of the data.

Message passing can be classified by a number of criteria, the most important of which is

  • Mode of operation:

    • Synchronous (also called rendezvous or handshaking): Sender and receiver perform their transfer operations simultaneously. They may have to wait before transfer becomes possible.
    • Asynchronous: Sender is allowed to transfer data to a temporary location where it can be accessed by the receiver. Sender does not have to wait if temporary storage is available.
  • Addressing:

    • Direct: Sender and receiver refer to each other directly, by using unique IDs.
    • Indirect: There is an auxiliary object (channel) that connects the sender and the receiver, who only refer to the channel during message passing.
409 questions
4
votes
1 answer

Celery: Disable heartbeat between workers

I'm working on a data processing routine in Celery with a Redis backend and broker. Many workers (~200) interact with a broker to get tasks and execute those tasks. However, my workers are all sending heartbeat signals to one another, which…
duhaime
  • 25,611
  • 17
  • 169
  • 224
4
votes
2 answers

Python assertRaises on user-defined exceptions

The following question was triggered by the discussion in this post. Assume two files (foobar.py and foobar_unittest.py). File foobar.py contains a class (FooBar) with two functions (foo and bar). Function bar raises a built-in exception, function…
Michael Gruenstaeudl
  • 1,609
  • 1
  • 17
  • 31
4
votes
1 answer

What is a distributed messaging system? Specifically what is 'distributed' in it?

It is ubiquitously mentioned that - 'Celery is an asynchronous task queue/job queue based on distributed message passing'.Though I know how to use Celery workers and all.But deep down I dont understand the real importance and meaning of distributed…
akg
  • 670
  • 10
  • 30
4
votes
3 answers

Chrome extension: sendMessage doesn't work

I've already read the documentation from Google on 'message passing' a few times and have probably looked at over 10 other questions with the same problem and already tried quiet a few variations of most of their "solutions" and of what I have…
4
votes
3 answers

How to choose the "Key" for inter-processes communication in Linux?

Good Day... I am doing a homework which states that I have 5 processes; a server and the rest are clients. Each process is supposed to be sparked from a different executable. I am going to implement a two-way message passing solution, but the…
Khaled Alshaya
  • 94,250
  • 39
  • 176
  • 234
4
votes
1 answer

Chrome Extension API: chrome.tabs.captureVisibleTab on Background Page to Content Script

My overall goal was to take a screenshot via the background page using: http://developer.chrome.com/extensions/tabs.html#method-captureVisibleTab and pass it to the content script so I can use the page's HTML DOM to analyze the screenshot and cut it…
4
votes
1 answer

Realtime synchronization of live data over network

How do you sync data between two processes (say client and server) in real time over network? I have various documents/datasets constructed on the server, which are downloaded and displayed by clients. Once downloaded, the document receives…
4
votes
1 answer

Haskell ZeroMQ binding not working for REQ socket

So here i was, barely able to install the libzmq on a windows desktop and then zeromq-haskell with cabal. I wanted to test the api by binding a python program with a haskell program in a hello-world type application. So the most basic pattern i see…
omu_negru
  • 4,642
  • 4
  • 27
  • 38
3
votes
3 answers

Calling a subclass method on a variable typed as superclass

I have created a class named Foo: @interface Foo:NSObject{ int myInt; } @property int myInt; @end and a subclass of Foo named Bar: @interface Bar:Foo{ NSString *myString; } @property (copy) NSString *myString; @end I am trying to store…
Andrew Riebe
  • 411
  • 7
  • 17
3
votes
1 answer

Ruby programming style: Asynchronous message passing

Hopefully this is not too subjective... I am new to the idea of asynchronous message-based programming -- in other words, writing a collection of self-sufficient "mini-programs" that all run simultaneously and only act in response to messages…
themirror
  • 9,963
  • 7
  • 46
  • 79
3
votes
1 answer

Object type is lost in message passing

I'm working on a Chrome extension and I've the following problem. When a certain event happens, my background page creates a new tab (page) with chrome.tabs.create API and send an Object. The sent Object (called items) is a list of objects, having…
user278064
  • 9,982
  • 1
  • 33
  • 46
3
votes
1 answer

How to implement whileTrue control flow method with Obj-C Blocks?

Is it possible to implement something like a Smalltalk-style whileTrue: method in Objective-C using blocks? Specifically, instead of: int count = 0; while (count < 10) { NSLog(count); count++; } I'd like to be able to do (via a wrapper on the…
3
votes
0 answers

Passing mediaStream on in chrome extension

I'm building an extension that one part of it's functionality is recording the screen. after enabling record in the popup interface the background.js creates a mediaStream object successfully. I'm doing in the background script because the…
3
votes
1 answer

How to pass information to a navigation header in Android Studio

I have an activity which asks for information from the user, AskUserForDetailsActivity and I have another TabActivity (which is NOT immediately after the AskUser.. activity) which has a navigation drawer. I want to send information from AskUser.. to…
3
votes
0 answers

Android: Message Passing Between Two Devices Using Bluetooth (Two App or Same App)

I am conducting an android research study, where I will manipulate some variables from one Android App and the participant will get an update on their device. Sometimes, the receiver will get a push notification. I want to develop two apps: one for…