Dyalog / Jarvis

APL-based web service framework supporting JSON or REST
https://dyalog.github.io/Jarvis/
MIT License
33 stars 8 forks source link

Pipelining Causes Server Error #64

Closed PaulMansour closed 2 months ago

PaulMansour commented 3 months ago

I'm guessing pipelining is not supported by Jarvis?

If I send multiple requests off from a client on the same keep-alive connection, without waiting for a response from each one, I get:

23:VALUE ERROR: Undefined name: Req
HandleRequest[21] ns.Req.Thread←⎕TID

I'm not sure if there is much reason to support pipelining, but if Jarvis does not, it's not exactly clear to me what it should do. One option is to service the first message, and then simply close the connection, ignoring all the other incoming requests on the connection. I don't think the server can send back an error response.

bpbecker commented 3 months ago

This is an interesting issue. Can you share your example so I can try to reproduce it here? In theory I don't see why Jarvis couldn't support pipelining although there might need to be a mechanism, likely on the client side, to pair up responses to requests.

PaulMansour commented 2 months ago

Sorry for delay...

I have a little example here:

https://github.com/the-carlisle-group/Rumba/tree/feature/WebSockets/APLSource/JarvisServer-41

It requires Rumba to make the pipelining client calls to Jarvis.

I have no idea if pipelining is even used much or worth supporting. I just know it's in the spec, and I have tests for it, so was trying to get all my tests to run on Jarvis server....

bpbecker commented 2 months ago

Resolved by #68