I am not terribly familiar with the lastest in PHP.
One concept I am considering is a way to keep the state current on the server for the webmail user. Currently the PHP code is only run when there is a request, but it would be helpful to have something running on the server continually which can respond to events in real-time.
Here is the idea.
A user logs into the system and that updates a timestamp for their date of last activity. Each time the RC webmail client looks for new messages it would update this timestamp. The service running on the server would be away of active sessions and watch their related IMAP accounts for new activity.
When a new message does arrive it can pull the summary data and place it into the MySQL database so that when the webmail client looks for an update it can just query the database and not MySQL.
And when it does pull the updates from the server it will also just hit the database for the summary data and only use the IMAP server when pulling the full message.
Has anyone seen PHP run on the server-side continually as a service? How would we go about implementing that?
Also, what facilities would PHP have to monitor a directory of files for updates? Will it just have to poll the directories and files for the last update date? Since PHP is largely just meant for web applications I doubt it has a file system monitoring feature.