| published by | Software Crafts |
|---|---|
| in blog | Software Crafts |
| original entry | django-prodserver design updates |
While at DjangoCon Europe in Athens I had a fair few conversations about prodserver and spent a lot of time thinking about it because that was the thrust of my talk as well or the artifact of my talk mainly around the API of the command itself. I especially got to chat with Jake Howard of Django Tasks fame and asked him for his consideration about what his plans are for what a worker command might look like in Django core, which in turn, then impacts some of my thinking on Django prod server.
I have been documenting my thoughts and playing around with the API in a few different branches, but currently I have landed on these changes which will land at some point in the near future into django-prodserver:
prodserver to just server. This is a mirror to Jake's desire for just a single worker command that covers both development and production.runserver, runserver_plus and daphne. These aren't just calling them, but I am reimplementing them as full developing them from scratch as backends. I will also likely depreacate devserver with this changeworker command to the package.The design is then two commands, server for web processes, worker for background workers. The open question to me is how the settings for these commands is defined. Do I have a single settings or do I split it into two (or more)?
The final bit of architectural work that I want to do is to split the package into multiple packages. The first package will just have the core commands and a single developement backend. Then there would be other packages to contain the other production & development backends. The goal here is to break out and demonstrate what is most likely to be merged into core (if that ever happens), while keeping what ought to stay separate in other packages (ideally the backends would be merged into their respective servers at some point).
After this there is still addressing the existing issues others have raised on the repository, such as sane defaults, correctly handling arguments passing and the help text, ensuring we are using system checks and more.
If you have opinions on the above, please let me know! Comment on the relevant issues and perhaps even open a PR or just comment on this post. Thanks!