Re: [racket-users] Implications of stateless servlets & how/whether to avoid them

2020-02-20 Thread Jon Zeppieri
Okay, in that case, you really shouldn't add a content-length header. -Jon On Thu, Feb 20, 2020 at 1:13 PM Bogdan Popa wrote: > > > Jon Zeppieri writes: > > > When you stream the response, it doesn't use a chunked transfer encoding? > > -Jon > > The web server chunks all responses on HTTP/1.1 co

Re: [racket-users] Implications of stateless servlets & how/whether to avoid them

2020-02-20 Thread Bogdan Popa
Jon Zeppieri writes: > When you stream the response, it doesn't use a chunked transfer encoding? -Jon The web server chunks all responses on HTTP/1.1 connections[1]. I can confirm that the web server works great[2] for streaming uses cases like long polling! [1]: https://github.com/racket/we

Re: [racket-users] Implications of stateless servlets & how/whether to avoid them

2020-02-20 Thread Jon Zeppieri
When you stream the response, it doesn't use a chunked transfer encoding? -Jon On Thu, Feb 20, 2020 at 12:40 PM Jay McCarthy wrote: > > I assume it is not necessary to be totally accurate, but it is good to when > you can, because of the Web principle of accepting broad input and producing > sp

Re: [racket-users] Implications of stateless servlets & how/whether to avoid them

2020-02-20 Thread Jay McCarthy
I assume it is not necessary to be totally accurate, but it is good to when you can, because of the Web principle of accepting broad input and producing specific output. I don't know of any existing program (like a proxy or something) that would fail without an accurate length, but it wouldn't surp

Re: [racket-users] Implications of stateless servlets & how/whether to avoid them

2020-02-20 Thread Brian Adkins
On Monday, December 3, 2018 at 10:49:40 AM UTC-5, Jay McCarthy wrote: > > > I don't know if the Racket web server (or related libraries) currently > provide a way to stream data in the response, but that is something I'll > definitely need relatively soon (primarily for streaming large CSV/JSON

Re: [racket-users] Implications of stateless servlets & how/whether to avoid them

2018-12-03 Thread Jay McCarthy
On Fri, Nov 30, 2018 at 9:43 PM Brian Adkins wrote: > Using the lift dispatcher directly didn't feel quite right, so I'll look into > dispatch/servlet. Will dispatch/servlet spin up a thread for each request as > serve/servlet does? If so, that will save me from handling the request > threading

Re: [racket-users] Implications of stateless servlets & how/whether to avoid them

2018-11-30 Thread Brian Adkins
Jay: Thanks for taking the time to educate me a bit. I expect you are right regarding some/most of my concerns being due to misunderstandings on my part. Despite playing with Racket for a few years, it wasn't until this particular project (with a deadline) that I really began to dig in more de

Re: [racket-users] Implications of stateless servlets & how/whether to avoid them

2018-11-30 Thread Jay McCarthy
Hi Brian, I think you are misunderstanding what that section is about. It is just describing how the system is implemented. There's basically nothing in there that you need to know as user other than "It may take a while to compile." For instance, you don't worry about the fact that all tree-like

Re: [racket-users] Implications of stateless servlets & how/whether to avoid them

2018-11-30 Thread Brian Adkins
I could be misreading the information in "3.2 Usage Considerations", but it seemed like the modifications to my program were automatic, but maybe that only happens when using #lang web-server or #lang web-server/base ? Regardless, I'm wondering if maybe I should just use (serve) instead of (ser

Re: [racket-users] Implications of stateless servlets & how/whether to avoid them

2018-11-30 Thread Jay McCarthy
There's nothing wrong with ignoring the continuation support in the Web server, either the native ones or stateless ones. If you do, I recommend using something like `create-none-manager` [1] as the `#:manager` argument to `serve/servlet` so that you don't accidentally start using them. The "too f