Loqisknebel: schmarty left you a message 7 hours, 7 minutes ago: i just published my WIP webmention.io receiver for static sites - https://github.com/martymcguire/morris
ZegnatThat’s pretty interesting. So basically you use wm.io as endpoint and let aaronpk worry about validation and data extraction, and then you mirror it back into your own server?
grantcodesHaha yeah npm dependencies are a fun time. Together really only has about 20 dependencies, but each one of those has its own dependencies and each one of those has its own dependencies.......
Zegnataaronpk, do you use beanstalk with PHP? Any code samples? I am looking at how I will queue my webmentions. I have some experience with Gearman and PHP, but heard about beanstalk a lot and the wiki says that’s what you use.
aaronpkbasically it pushes a class and function name and the list of parameters into beanstalk, then the worker script grabs jobs and calls whatever function is described by the job
aaronpkit doesn't take much to re-create that same mechanism, I just found myself duplicating a lot of code for every new project so turned it into a library
ancardaI never got into proper queue systems, I was just going to shove WebMentions into a MySQL table and process them with a PHP cron job... probably a bit primitive
aaronpkif you really need instant processing of the jobs on the queue, then there are various mechanisms you can use with MySQL, the filesystem, redis, beanstalk, etc.
sknebelmight be less good for sending (I remember you mentioned pretty massive send rates due to salmention etc), but for receiving you're likely limited by verification speed
ZegnatI like the idea of a job queue because that will go it as-fast-as-possible. E.g. if verification for one takes longer than usual, it’ll just keep the job processor busy a little longer. It’ll still pick up the next one as soon as it is done.
sknebelZegnat: you can get that on top of most other solutions as well, most of them have some kind of notifying mechanism. but switching to a dedicated queue system has been on my list too
sknebel(one with some monitoring tool. on the filesystem I can at least manually poke at the files, so not totally invisible, but something else might be nicer to use)
ZegnatAt work in the Netherlands we had an inotify watcher on a directory that would prod Gearman into working depending on certain filesystem triggers. Worked OK
ZegnatI guess the part that confuses me the most is where you run a PHP script and that script then tells beanstalk to run X workers. In Gearman we used to have a PHP script itself be the worker. You didn’t start workers from within PHP.
aaronpkits more like telling the php script to fork and run multiple processes that all listen to the same beanstalk queue. Lets you process jobs in parallel instead of just one at a time
ZegnatAh, yeah, just checked Caterpillar code again. I guess I didn’t know PHP could fork itself into multiple processes. Learn something new every day