unix-socket

Reading a file in real-time using Node.js

自古美人都是妖i 提交于 2019-11-28 06:33:49
I need to work out the best way to read data that is being written to a file, using node.js, in real time. Trouble is, Node is a fast moving ship which makes finding the best method for addressing a problem difficult. What I Want To Do I have a java process that is doing something and then writing the results of this thing it does to a text file. It typically takes anything from 5 mins to 5 hours to run, with data being written the whole time, and can get up to some fairly hefty throughput rates (circa. 1000 lines/sec). I would like to read this file, in real time, and then, using node

Where to place Unix Domain (AF_UNIX) sockets' end points (files)?

僤鯓⒐⒋嵵緔 提交于 2019-11-27 10:17:39
问题 Is there a convention where to place the 'files' representing the end points to Unix domain sockets? I tend to put them to /tmp/some-application-specific-subdir-name/ , but I wonder if there is a more common place. The background is, that POSIX is not clear about the maximum path length to access such 'files': The size of sun_path has intentionally been left undefined. This is because different implementations use different sizes. For example, 4.3 BSD uses a size of 108, and 4.4 BSD uses a

Reading a file in real-time using Node.js

╄→尐↘猪︶ㄣ 提交于 2019-11-27 04:24:27
问题 I need to work out the best way to read data that is being written to a file, using node.js, in real time. Trouble is, Node is a fast moving ship which makes finding the best method for addressing a problem difficult. What I Want To Do I have a java process that is doing something and then writing the results of this thing it does to a text file. It typically takes anything from 5 mins to 5 hours to run, with data being written the whole time, and can get up to some fairly hefty throughput

UNIX socket implementation for Java?

大城市里の小女人 提交于 2019-11-26 20:04:46
I realize that since UNIX sockets are platform-specific, there has to be some non-Java code involved. Specifically, we're interested in using JDBC to connect to a MySQL instance which only has UNIX domain sockets enabled. It doesn't look like this is supported, but from what I've read it should be at least possible to write a SocketFactory for JDBC based on UNIX sockets if we can find a decent implementation of UNIX sockets for Java. Has anyone tried this? Does anyone know of such an implementation? njsf Checkout the JUDS library. It is a Java Unix Domain Socket library... https://github.com