Communication between two separate Java desktop applications

To show how easy it is to let two applications communicate with each other, check out this network-clipboard demo using JGroups. Just start two instances and begin dropping files into one of them. The second instance will instantly show the same files. import java.io.Serializable; import java.awt.*; import java.awt.datatransfer.*; import javax.swing.*; import org.jgroups.*; public class JGroupsTest … Read more

How do I use mqueue in a c program on a Linux based system?

The following is a simple example of a server that receives messages from clients until it receives an “exit” message telling it to stop. The code for the server: #include <stdlib.h> #include <stdio.h> #include <string.h> #include <sys/stat.h> #include <sys/types.h> #include <errno.h> #include <mqueue.h> #include “common.h” int main(int argc, char **argv) { mqd_t mq; struct mq_attr … Read more

Interprocess communication for Windows in C# (.NET 2.0)

IPC in .Net can be achieved using: WCF using named pipes requires .Net 3.0 and above. Code example The WCF class NetNamedPipeBinding can be used for interprocess communication on the same machine. The MSDN documentaion for this class includes a code sample covering this scenario http://msdn.microsoft.com/en-us/library/system.servicemodel.netnamedpipebinding.aspx Remoting The original IPC framework released with .Net 1.0. … Read more

IPC Mechanisms in C# – Usage and Best Practices

Most recent Microsoft’s stuff in IPC is Windows Communication Foundation. Actually there is nothing new in the lower level (tcp, upd, named pipes etc) But WCF simplifies IPC development greatly. Useful resource: Interprocess Communication with WCF on Dr. Dobb’s portal WCF Communication Options in the .NET Framework 3.5 and of course MSDN on WCF

Does OS X have an equivalent to /dev/shm?

You can create and mount a ram based disk as follows: Create a disk hdiutil attach -nomount ram://$((2 * 1024 * SIZE_IN_MB)) hdiutil will return the name of the ramdisk. Format and mount the disk diskutil eraseVolume HFS+ RAMDisk NAME_OF_DISK Access the disk under /Volumes/<diskname> cd /Volumes/RAMDisk && touch testfile.txt && ls Creating a 100MB … Read more

How to implement inter-process communication in Go?

Go has a built-in RPC system (http://golang.org/pkg/rpc/) for easy communication between Go processes. Another option is to send gob-encoded data (http://blog.golang.org/2011/03/gobs-of-data.html) via network connection. You shouldn’t dismiss local networking without benchmarking. For example Chrome uses named pipes for IPC and they transfer a lot of data (e.g. rendered bitmaps) between processes: Our main inter-process communication … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)