messaging

How to do a UDP multicast across the local network in c#?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-29 01:30:26
问题 I am trying to get some simple UDP communication working on my local network. All i want to do is do a multicast to all machines on the network Here is my sending code public void SendMessage(string message) { var data = Encoding.Default.GetBytes(message); using (var udpClient = new UdpClient(AddressFamily.InterNetwork)) { var address = IPAddress.Parse("224.100.0.1"); var ipEndPoint = new IPEndPoint(address, 8088); udpClient.JoinMulticastGroup(address); udpClient.Send(data, data.Length,

Any way to determine which object called a method?

人走茶凉 提交于 2019-11-28 23:11:53
I'm hoping that Ruby's message-passing infrastructure means there might be some clever trick for this. How do I determine the calling object -- which object called the method I'm currently in? As an option, there is a binding_of_caller gem that allows you to execute code in context of any caller on the call stack (caller, caller's caller and so on). It's useful for inspecting (read do anything at any position on the call stack ) call stack in development, as used in better_errors . Objects of class Binding encapsulate the execution context at some particular place in the code and retain this

socket.io and node.js to send message to particular client

我怕爱的太早我们不能终老 提交于 2019-11-28 21:34:48
Sending message to all client works well but I want to send message to particular username. my server.js file looks like. What it does is when http://localhost:8080 is run, the client code adds user to the object usernames as well as in socket object. And instantly returns the individual message to each of the connected client. //var io = require('socket.io').listen(8080); var app = require('http').createServer(handler) , io = require('socket.io').listen(app) , fs = require('fs') var usernames={}; app.listen(8080); // on server started we can load our client.html page function handler ( req,

Microservices: What are smart endpoints and dumb pipes?

ⅰ亾dé卋堺 提交于 2019-11-28 20:17:40
问题 I have read an article "Microservices" by Martin Fowler and find it difficult to understand smart endpoint s and dumb pipes . Please explain these terms, examples are welcome. 回答1: I didn’t read the article, so I can only speculate what he can mean exactly, but as he gives ESB as an example against microservices and ZeroMQ as an example for micro services I hope my speculation will be pretty exact: One of the ideas of Unix (and Linux) is to build small independent applications and connect

how is select() alerted to an fd becoming “ready”?

荒凉一梦 提交于 2019-11-28 18:46:19
I don't know why I'm having a hard time finding this, but I'm looking at some linux code where we're using select() waiting on a file descriptor to report it's ready. From the man page of select: select() and pselect() allow a program to monitor multiple file descriptors, waiting until one or more of the file descriptors become "ready" for some class of I/O operation So, that's great... I call select on some descriptor, give it some time out value and start to wait for the indication to go. How does the file descriptor (or owner of the descriptor) report that it's "ready" such that the select(

Lightweight JMS broker

白昼怎懂夜的黑 提交于 2019-11-28 17:52:10
I'm looking for a small and yet efficient enough lightweight JMS broker solution with no or minimum of dependencies. My messaging code should be running in the environment with a lot of dependencies I have no control of. Thus it would make ridiculous to deploy say ActiveMQ solution along with my custom bunch of classes. nixau Currently I'm investigating FFMQ solution. It's open source (GNU LGPL license), has only 4 dependencies (commons-logging, log4j, jms and jmx), and it's mature enough to accomplish my goals. Especially if you're using spring, don't count activemq out. You can also run it

Avoiding split-brain, votes and quorum [closed]

倾然丶 夕夏残阳落幕 提交于 2019-11-28 17:38:34
Suppose you have n processes, n > 2. You want to have agreement amongst them that one is to be active. So they need to vote amonst each other to determine which one is active. All processes may fail at any time, we want to have one process active if possible, but ... We must never have two active at the same time, so if they can't be sure it is better to have no-one active. (Ie. we want to avoid split brain) The only available communication mechanism between them is pub-sub messaging (not point to point). One or more databases are available, but no one database should be a single point of

Apache Camel producers and consumers

天大地大妈咪最大 提交于 2019-11-28 17:14:52
I have difficulties wrapping my head around the concept. I am trying to implement an endpoint that listens on a tcp port for incoming messages in a proprietary format, which would then transform the message and have camel take over the forwarding and routing. Did I understand correctly that that the Producer is responsible for sending messages into the Endpoint and the Consumer receives them from that endpoint? When studying the interfaces I couldn't figure out the message flow between those objects, especially on the consumer part. Consumer only defines start() and stop() methods... When

Implementing a Message Bus architecture

最后都变了- 提交于 2019-11-28 16:44:28
I'm currently doing analysis and design for a new message bus architecture in my company. I have tried MSMQ to do something like this in the past and it works well and was thinking of doing the same thing again for this project but using WCF as the API instead of using the System.Messaging API. Has anyone had experience with MSMQ in WCF? Is it easier to use then the System.Messaging API? What would be some benefits of using WCF over System.Messaging or vice versa? Mauricio Scheffer IMHO, with so many good, flexible and proven bus architectures to choose from ( NServiceBus , Mass Transit ,

Queue alternatives to MSMQ on Windows? [closed]

ε祈祈猫儿з 提交于 2019-11-28 16:44:03
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . If you want to use a queuing product for durable messaging under Windows, running .NET 2.0 and above, which alternatives to MSMQ exist today? I know of ActiveMQ (http://activemq.apache.org/), and I've seen references to WSMQ (pointing to http://wsmq.net), but the site seems to be down. Are there any other