Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[paho-dev] http/mmpt bridge

I need a pattern for sending and receiving mmqt synchronously (I think that's what I want)

goal;
web server listens for a POST
data from POST is sent to mmqt server
mmqt client receives it, evaluates, publishes response
web server is subscribed to response, which becomes the 200/400 http response code to the POST.

the kicker here is the incoming POST connection is held open waiting to hear the response over mmqt. 

I can think of a few ways to structure this, but none of them feel right.

I'm playhing wiht a simple http server in python,

https://gist.github.com/CarlFK/9b9d86e06e1f13fb53b6aa60e755ca4e#file-hmb-py-L16

If someone wants to show me how to do this easier in Node, im curious about that.









--
Carl K

Back to the top