Pipes and Unix pipes

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Pipes and Unix pipes

Corentin Dupont
Hi guys!
I am wondering if Pipes can interact with Unix named pipes (or FIFO).
For example, can you combine two Unix pipes into one?

Another question, can Pipes be used for managing REST API Webhooks?
As a webhook is a sort of callback, I guess that scaling them will end up in callback hell.
Why not using an event programming library to solve this?

My ultimate goal is to create a shell script that will start a REST server with netcat.
This REST server will wait for requests from several webhooks (for example github: https://developer.github.com/v3/repos/hooks/) and combine them.

Cheers
Corentin

--
Reply | Threaded
Open this post in threaded view
|

Re: Pipes and Unix pipes

Gabriel Gonzalez
I don't think there is a library that supports `pipes` integration with named pipes out of the box, but you could write one in principle

You can definitely use `pipes` for hooking into callback code.  See the `pipes-concurrency` library for an example of how to do this.  It basically just has the callback stuff data into a buffer than has a pipe read from that buffer

On Tue, May 23, 2017 at 10:50 AM, Corentin Dupont <[hidden email]> wrote:
Hi guys!
I am wondering if Pipes can interact with Unix named pipes (or FIFO).
For example, can you combine two Unix pipes into one?

Another question, can Pipes be used for managing REST API Webhooks?
As a webhook is a sort of callback, I guess that scaling them will end up in callback hell.
Why not using an event programming library to solve this?

My ultimate goal is to create a shell script that will start a REST server with netcat.
This REST server will wait for requests from several webhooks (for example github: https://developer.github.com/v3/repos/hooks/) and combine them.

Cheers
Corentin

--

--