librelist archives

« back to archive

[RFC] Phar requirements

[RFC] Phar requirements

From:
Loic d'Anterroches
Date:
2011-07-01 @ 11:19
Hello,

yes, I am coding a lot with and on the side of Photon at the moment. So,
from your feedback, it is ok to go without "server" but start one
process per handler and task manually. This is very good.

For the stats from each handler/task, I will implement a simple zeromq
based log. You will be able to define a log collector where every n
seconds/minutes, your handler/task will send stats. This will be
optional and thus will keep the code very simple.

Now, for the phar.

I propose that the Photon code and the application code must always be
.phar compatible. This means that the default code will work out of the
box when packaged as a .phar and that we will have a set of utilities to
write "Phar ready" applications easily.

What we need to have:

- views which can render assets from the disk and from a .phar
- file handling wrappers to load from disk and from .phar

The goal is to be able to serve from the disk as usual when developing
but also go from the .phar when in production/staging. The process to do
so should be totally painless. It should be possible to know that if you
accesss a file a given way, you are sure to be able to access it in
production or in dev, from the disk or from the .phar.

A .phar is very good in production: everything in one file.
A .phar is a pain when developing: you need to make it to use it.

So, we need a good experience for both.

loïc

--
Indefero - Project management and code hosting - http://www.indefero.net
Photon - High Performance PHP Framework - http://photon-project.com
Céondo Ltd - Web + Science = Fun - http://www.ceondo.com