message-passing

What's the difference between the message passing and shared memory concurrency models?

眉间皱痕 提交于 2019-11-29 19:36:35
Correct me if I'm wrong, but I'm surprised this hasn't been asked before on here ... It's a pretty simple difference. In a shared memory model, multiple workers all operate on the same data. This opens up a lot of the concurrency issues that are common in parallel programming. Message passing systems make workers communicate through a messaging system. Messages keep everyone seperated, so that workers cannot modify each other's data. By analogy, lets say we are working with a team on a project together. In one model, we are all crowded around a table, with all of our papers and data layed out.

What library can I use to do simple, lightweight message passing?

♀尐吖头ヾ 提交于 2019-11-29 09:42:26
问题 I will be starting a project which requires communication between distributed nodes(the project is in C++). I need a lightweight message passing library to pass very simple messages(basically just strings of text) between nodes. The library must have the following characteristics: No external setup required. I need to be able to get everything up-and-running in my code - I don't want to require the user to install any packages or edit any configuration files(other than a list of IP addresses

TPL Dataflow, how to forward items to only one specific target block among many linked target blocks?

自作多情 提交于 2019-11-29 09:09:39
I am looking for a TPL data flow block solution which can hold more than a single item, which can link to multiple target blocks, but which has the ability to forward an item to only a specific target block that passes a filter/predicate. At no time should an item be delivered to multiple target blocks at the same time, always only to the one which matches the filter or the item can be discarded. I am not fond of BroadCastBlock because, if I understand correctly, it does not guarantee delivery (or does it?) and the filtering is done on the target block side, meaning BroadCastBlock essentially

Passing message from background.js to popup.js

独自空忆成欢 提交于 2019-11-29 01:53:10
I'm trying to implement my own chrome extension on which, on a certain event, create a browser notification and fills the popup with data calculated in background.js Here is mymanifest file : { "name": "Dummy name", "description": "Description", "manifest_version": 2, "version": "1.1.3", "icons": { "16": "icon_16.png", "48": "icon_48.png", "128": "icon_128.png", "256": "icon_256.png" }, "browser_action": { "default_icon": "icon_48.png", "default_title": "Test", "default_popup": "popup.html" }, "permissions": ["background","webRequest","webRequestBlocking","webNavigation","tabs","notifications"

what does it mean configuring MPI for shared memory?

我与影子孤独终老i 提交于 2019-11-29 01:31:02
问题 I have a bit of research related question. Currently I have finished implementation of structure skeleton frame work based on MPI (specifically using openmpi 6.3). the frame work is supposed to be used on single machine. now, I am comparing it with other previous skeleton implementations (such as scandium, fast-flow, ..) One thing I have noticed is that the performance of my implementation is not as good as the other implementations. I think this is because, my implementation is based on MPI

What's the difference between the message passing and shared memory concurrency models?

£可爱£侵袭症+ 提交于 2019-11-28 15:17:31
问题 Correct me if I'm wrong, but I'm surprised this hasn't been asked before on here ... 回答1: It's a pretty simple difference. In a shared memory model, multiple workers all operate on the same data. This opens up a lot of the concurrency issues that are common in parallel programming. Message passing systems make workers communicate through a messaging system. Messages keep everyone seperated, so that workers cannot modify each other's data. By analogy, lets say we are working with a team on a

How does Actors work compared to threads?

谁说我不能喝 提交于 2019-11-28 15:13:17
Is there any good and short explanation of how Actors works compared to threads? Can't a thread be seen as an actor and send messages to other threads? I see some difference, but it's not that clear for me. Can I use Actors in any language by using threads differently? Rob Lachlan The actor model operates on message passing. Individual processes (actors) are allowed to send messages asynchronously to each other. What distinguishes this from what we normally think of as the threading model, is that there is (in theory at least) no shared state. And if one believes (justifiably, I think) that

TPL Dataflow, how to forward items to only one specific target block among many linked target blocks?

有些话、适合烂在心里 提交于 2019-11-28 02:31:51
问题 I am looking for a TPL data flow block solution which can hold more than a single item, which can link to multiple target blocks, but which has the ability to forward an item to only a specific target block that passes a filter/predicate. At no time should an item be delivered to multiple target blocks at the same time, always only to the one which matches the filter or the item can be discarded. I am not fond of BroadCastBlock because, if I understand correctly, it does not guarantee

TPL Dataflow, whats the functional difference between Post() and SendAsync()?

孤街醉人 提交于 2019-11-27 19:58:30
I am confused about the difference between sending items through Post() or SendAsync(). My understanding is that in all cases once an item reached the input buffer of a data block, control is returned to the calling context, correct? Then why would I ever need SendAsync? If my assumption is incorrect then I wonder, on the contrary, why anyone would ever use Post() if the whole idea of using data blocks is to establish a concurrent and async environment. I understand of course the difference technically in that Post() returns a bool whereas SendAsync returns an awaitable Task of bool. But what

How to send and receive broadcast message

天大地大妈咪最大 提交于 2019-11-27 18:42:11
I am trying to pass data between two activities that are inside of tabs. I am trying to use sendBroadcast() . With breakpoints set I never reach onReceive() . Manifest: <activity android:name=".WebResults" android:label="@string/app_name"> <intent-filter> <action android:name="com.toxy.LOAD_URL" /> </intent-filter> </activity> Activity Sender: Intent intent=new Intent(getApplicationContext(),WebResults.class); intent.setAction("com.toxy.LOAD_URL"); intent.putExtra("url",uri.toString()); sendBroadcast(intent); Activity Receiver : @Override public void onCreate(Bundle savedInstanceState) { super