DEV Community

John Napiorkowski
John Napiorkowski

Posted on

Perl PAGI Project Updates

Quick update to anyone interested in upcoming changes to the PAGI project (spiritual successor to Plack/PSGI).

1) Distribution split up: when we released PAGI, we initially released everything as one distribution. PAGI (https://metacpan.org/pod/PAGI) currently has a) the PAGI specification; b) the reference server and c) a bunch of ease of use tools, similar to the role that the Plack distribution played for PSGI. Putting everything into one place was just to make my life easier as in the early bunch of releases there was a lot of fixes and updates, most of which cut across all three parts of PAGI. Also I wanted to make it easy for people getting into PAGI to be able to explore the ecosystem. However now that code seems to be settling down having these in independent repos and releases makes more sense. Going forward the PAGI repo will only update if the spec itself changes; PAGI::Server and PAGI::Tools (where all the utilities and helpers now go) likewise. I think this will start to bring some stability to the ecosystem, especially now that PAGI::Server is functionally complete based on the goal chart I had for it initially. So I will only update it to fix bugs and security issues.

PAGI::Tools will probably continue to see evolution over the summer as I start to nail down more common use cases and identify patterns worth encapsulating.

2) Specification clarifications and updates: The PAGI specification itself will move to v0.3 in the next release and it contains mostly clarifications and fixes. Biggest change will be a more detailed mechanism for controlling streaming output, especially around handling back pressure as well as new callbacks to notice when the output buffer is getting full and when it clears. Hopefully these changes will make it easier and more reliable to do streaming in PAGI. PAGI::Server has been updated to match, and the response helper in PAGI::Tools has some updates around that as well.

Currently all this sits on Github:

https://github.com/jjn1056/pagi
https://github.com/jjn1056/PAGI-Server
https://github.com/jjn1056/PAGI-Tools

Right now I'm giving the Thunderhorse author some time to vet a handful of changes needed to be compatible and I want to review all the updates and doc tweaks one last time. This will land on CPAN before the Austin Perl Community conference first week of July (where I will be presenting on PAGI for those interested).
For people who might currently be depending on the PAGI distribution, for the near term I will have PAGI::Server and PAGI::Tools as dependencies of PAGI, that way your currently toolchains don't break. That will last a few months for transition.

Top comments (4)

Collapse
 
joel_horvath_0c470c6260a9 profile image
Joel Horvath

Nice, this is actually a pretty sane evolution of the ecosystem.
The split into spec / server / tools feels like it’s basically paying down hidden coupling that was temporarily useful early on.
Do you expect most users to ever directly depend on the spec, or will it stay more of a “read once, implement against it” thing?

Collapse
 
jjn1056 profile image
John Napiorkowski

For the moment anyone that depended on the PAGI distribution because that's how they loaded PAGI::Server and/or the utilities and helpers now in PAGI::Tools can continue to do so; PAGI will itself depend on the latest server and tools for the immediate future. That however is intended to be temporary and to give people a bit of time to update their dependency list. After that I don't think anyone will want or need to depend on the PAGI distribution itself, unless they prefer to read docs locally with 'man'. People building web frameworks on top of the spec, or building web servers that support it will likely want to watch the distribution so they can track any changes or corrections (hopefully those will be few as PAGI is based directly on ASGI which itself is a mature spec at this point).

My hope is that now that the spec seems to be settling in I can write a server test suite that server authors can use. It would be great if there was more than one server option.

Collapse
 
joel_horvath_0c470c6260a9 profile image
Joel Horvath

Got it, Myroslav.
Your post is great, and I can see you’re very experienced. Thanks again for sharing it.
I’ve been thinking about an idea for a while, and I’m looking for someone with your level of expertise to help bring it to life.
If you’re interested, let me know and we can discuss it further.

Thread Thread
 
jjn1056 profile image
John Napiorkowski

I can be reached via my Linkedin profile (linkedin.com/in/jnapiorkowski/) for anything related to my professional career. Best.