Marc, How would this differ from a more generic use of the existing processors, PutTCP/ListentTCP and PutUDP/ListenUDP? I'm not sure what value is being added above these existing processors, but I'm sure I'm missing something.
There's already an ability to serialize flowfiles via MergeContent. And there's the deserialize side in UnpackContent. So a dataflow that looks like the following would seem a reasonable approach to the problem: MergeContent -> PutTCP -> {diode} -> ListentTCP -> UnpackContent I'm actually very interested in this topic, having a project that has a use case for a "diode". So I'm legitimately asking here, not trying to derail your work. Thanks in advance, Adam On Sun, Aug 1, 2021 at 12:26 PM Marc <n...@nerdfunk.net> wrote: > Greetings, > > there are companies and organizations that strictly separate their > networks for security reasons. Such companies often use diodes to achieve > this. But of course they still have to exchange data between the networks > (eg. transfer data from ‚low‘ to ‚high‘). There are at least two kinds of > diodes. Some hardware-based ones only use one fiber optic to send data (UDP > based). Others use TCP, but prevent sending in the reverse direction. > > Nifi is an amazing tool that allows data to be transferred between two > separate networks in a very flexible but also secure way. I have > implemented two processors. The first one ‚merges‘ the attributes and the > content of a flowfile and sends it to the destination. The second one > listens on a TCP port, splits attributes and content and creates a new > flowfile containing all attributes of the origin flow. You can send the > flow without attributes as well. In this case you can easily netcat a > binary file to Nifi. > > These two processors are useful if you do NOT have a bidirectional > communication between two NiFi instances and therefore the site-2-site > mechanism or http(s) cannot be used. > > We have been using these processors for a longer period of time (exactly > the version for 1.13.2) and would like to share these processors with > others. So the question to you all is: Is someone interested in these > processors or is this use case too special? > > The current source code can be found on GitHub. ( > https://github.com/nerdfunk-net/diode/ < > https://github.com/nerdfunk-net/diode/>) > > I have also implemented a UDP based version of the processor. Due to the > nature of UDP, this is more complex and these processors are now being > tested. > > Best regards > Marc