message-passing

chrome extension to Send Message from popup to content script

余生颓废 提交于 2019-12-04 04:17:19
I,am developing an extension in which i have to extract data from linkedin profile page when user press button on popup. I,am passing message from the popup.js page to contentscript and in response i will get data extracted from linkedin profile page by contentscript so that i can display it in popup.html. But I,am getting error when i inspected the popup.html. The error is: Port: Could not establish connection. Receiving end does not exist. lastError:29 Error in event handler for 'undefined': Cannot read property 'farewell' of undefined TypeError: Cannot read property 'farewell' of undefined

How does Erlang pass messages between processes on the same node?

谁说我不能喝 提交于 2019-12-04 03:08:58
问题 Between nodes, message are (must be) passed over TCP/IP. However, by what mechanism are they passed between processes running on the same node? Is TCP/IP used in this case as well? Unix domain sockets? What is the difference in performance between "within node" and "between node" message passing? 回答1: by what mechanism are they passed between processes running on the same node? Because Erlang processes on the same node are all running within a single native process — the BEAM emulator —

How is barrier implemented in message passing systems?

大城市里の小女人 提交于 2019-12-03 17:44:02
问题 What I understand is, that one master process sends a message to all other processes. All the other processes in return send a message to the master process. Would this be enough for a barrier to work? If not, then what more is needed? 回答1: Let's have a look at OpenMPI's implementation of barrier. While other implementations may differ slightly, the general communication pattern should be identical. First thing to note is that MPI's barrier has no setup costs: A process reaching an MPI

Java: High-performance message-passing (single-producer/single-consumer)

女生的网名这么多〃 提交于 2019-12-03 14:23:36
I initially asked this question here , but I've realized that my question is not about a while-true loop. What I want to know is, what's the proper way to do high-performance asynchronous message-passing in Java? What I'm trying to do... I have ~10,000 consumers, each consuming messages from their private queues. I have one thread that's producing messages one by one and putting them in the correct consumer's queue. Each consumer loops indefinitely, checking for a message to appear in its queue and processing it. I believe the term is "single-producer/single-consumer", since there's one

What is the difference between message-passing and method-invocation?

被刻印的时光 ゝ 提交于 2019-12-03 08:14:32
问题 Is there a difference between message-passing and method-invocation, or can they be considered equivalent? This is probably specific to the language; many languages don't support message-passing (though all the ones I can think of support methods) and the ones that do can have entirely different implementations. Also, there are big differences in method-invocation depending on the language (C vs. Java vs Lisp vs your favorite language). I believe this is language-agnostic. What can you do

What makes Erlang suitable for soft real-time applications?

一个人想着一个人 提交于 2019-12-03 06:50:32
Some background I'm working on building a programming language for digital media programming, which should support concurrency using no-sharing message passing and soft real-time (i.e. do your best to compute audio/video without losing samples or frames and with a constant throughput). It turns out that both these features are surprisingly difficult to combine, mainly because of one particular constraint: real-time code should not dynamically allocate memory. My language should make it easy to implement something like this: One thread computes audio samples based on parameters. These can be,

what are the disadvantages of RPC with respect to message passing?

我只是一个虾纸丫 提交于 2019-12-03 03:12:10
问题 what are the disadvantages of RPC with respect to message passing? 回答1: As a general rule, RPC provides a higher level of abstraction than some other means of interprocess communication. This makes it, perhaps, easier to use than lower level primitives. For this abstraction you may pay some penalty in performance due to marshaling/unmarshaling and may have to deal with added complexity in configuration for simple scenarios. You might be interested in this thesis (pdf) by Jackie Silcock which

The actor model: Why is erlang special? Or, why do you need another language for it?

元气小坏坏 提交于 2019-12-02 14:00:34
I've been looking into learning erlang, and as a result, have been reading (okay, skimming) about the actor model. From what I understand, the actor model is simply a set of functions (run within lightweight threads called "processes" in erlang), which communicate with each other only via message passing. This seems fairly trivial to implement in C++, or any other language: class BaseActor { std::queue<BaseMessage*> messages; CriticalSection messagecs; BaseMessage* Pop(); public: void Push(BaseMessage* message) { auto scopedlock = messagecs.AquireScopedLock(); messagecs.push(message); }

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

故事扮演 提交于 2019-12-02 01:29:48
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 up the way I would like. However, I can't seem to pass the dataUrl back to the content script with Message Passing: http://developer.chrome.com/extensions/messaging.html I tried JSON.stringify() but to no avail. This works perfectly fine: background.js chrome.runtime.onMessage.addListener( function(request, sender, sendResponse) { sendResponse(

PHP/Javascript passing message to another page

眉间皱痕 提交于 2019-12-01 13:14:24
So let me explain: I basically want so when you post a comment, (i use a js/jquery script to send string to insert.php which inserts to the database) you will receive 2+ points. Now i have done so you get +2 points, BUT i want to display a message like stackoverflow. I already know how to display a message like stackoverflow, but in somehow i need to send from insert.php(after you inserted), this: <div id='message' onclick="closeNotice()" style="display: none;"> Hey, <b><? echo $pusername; ?></b> - You've just got +<? echo $gpm; ?> points for your comment! <a href="#" class="close-notify"