I recently read an article article about my new page pipeline system. There are currently several Github projects with similar implementations, but they are all written in Php.
What is BigPipe?
BigPipe is the system with which Facebook came up with the idea that pages seem to load faster. One page is divided into small pages, so it looks like where each box is a page: 
So, the logic for loading the entire web page turns into:
- The first request to the server with the client, the html skeleton generated very quickly, has javascript with a big tube.
- When the client receives the HTML skeleton, it runs javascript BigPipe.
- As long as the connection with the server remains constant, prospectuses are discarded through the channel to the client and displayed using javascript in bigpipe format.
- HTML, CSS, and JS for each page are loaded and displayed when they are accepted, so each brochure is loaded separately, giving a faster loading experience.
Their data shows an increase in load time of 2 pages.
Problem
The main problem with implementing this in Pyramid is that I did not find a way to maintain a constant HTTP connection with the client so that it can clear these "prospectuses" through the pipe. I experimented with response.app_iter , but the generator outputs are not reset, most likely the whole response is generated, and then is reset immediately down the pipe. Is there a way to reset multiple βresponsesβ to a persistent connection with Pyramid?
source share