OL Learn

HTTP event streaming

Interesting use case I’ve just come across. I’ll be working with an external API that uses event streaming to handle data transfer. Essentially PlanetPress would need to do an HTTTP POST which creates a new event stream. Then will follow up with an HTTP GET to “subscribe” to the event stream. The external system then leaves the TCP connection open on the GET call and begins sending events (XML snippets) in realtime through that open connection. PlanetPress will need to receive those events and then process them. The TCP connection stays open until a subsequent PUT is sent closing it down.

Does the event stream seem like its something that should be handled in PlanetPress? If so how?

Or would it be best to have an external app do it and turn around and do a POST of the event data into a PlanetPress nodejs endpoint (or something similar)?

Workflow will not be able to maintain an open connection. By design, it was built to receive complete jobs and to launch a process once it has received them.

As you suggested, you will have to use some other application to receive the data and to forward it to Workflow, using any of the available input methods.