• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Add-on Async XenForo

silence

Well-known member
#1
I'm not sure if this is a bad idea but I've been working on this add-on that moves heavy queries of XenForo to PHP CLI.

Basically for any actions that happen within XenForo, I extend the class and overwrite the method and store it into a global list, and right before XenForo finishes it sends all these tasks to a CLI script. It was originally encoding the tasks into a string but there was a limit on how long a parameter could be within Linux so I converted it to use SHMOP which is working very well.

There was also the issue of sessions where you couldn't login as it would be unable to receive the updated session data due to the forking. I got around this by building a whitelist system in that can be enabled wherever and for whatever method you want.

I've been able to get my response times down to well under 100ms on a WAN MariaDB cluster replicating synchronously in Chicago, Seattle, and Frankfurt. This is before enabling any caching solution as well (besides opcache) and with 50 add-ons loaded and over 350 classes being executed.

I'm wondering if this is a bad approach to be taking, and what implications there could be. I've been able to resolve some issues like table locking completely and the XenForo board runs without ever getting errors from these tasks.

Would anyone be interested in testing it as well?

Let me know!