#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?
#sknebeland put it in a format you can use directly for building the static site
#sknebelso no need to have the user browser call out to wm.io
#ZegnatIt doesn’t really make a specific format in itself though, right? Just the jf2 it gets from wm.io?
#Zegnatisn’t yet sure if he prefers jf2 to actual mf2
#sknebelthe format in the files seems directly from the api, yes, only the structure on disk is of course it's own
#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.......
#aaronpkThat's basically how I use webmention.io too. I let it handle validating and parsing, and it sends the data to my web hook to store the comment
snarfed joined the channel
#ZegnatHmm. I prefer to store the HTML of the mention source. Can webmention.io give me that, or does it only store the jf2?
#Zegnatis playing with a PHP curl wrapper that limits allowed download size
#ZegnatThat sounds like a solid feature to use when fetching URLs
#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.
#Loqi[aaronpk] Caterpillar: Caterpillar is a PHP job queueing system based on beanstalkd
#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
#ZegnatGreat! Thanks! Not sure if I will use it or write something myself, but this is going to save me a lot of crawling the web for code samples :D
#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
#sknebelthat's similar to what I do, except it's just a while loop in a script instead of gearman ;)
#sknebelnot a fan of celery, it feels kind of weird to use to me
#sknebelprobably going to go with something on top of redis
#aaronpkcheck out the scripts/ownyourswarm.php file, and the corresponding worker classes in the lib folder
#ZegnatAnd you run scripts/ownyourswarm.php as a service or something?
#aaronpkYeah using an init script in Ubuntu. I can add that example too
#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.
#aaronpkAll it does is fork and run multiple in parallel. If you just say run one worker then it'll just run in that process
#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
#aaronpkSo the php process *is* the worker, beanstalk is still just an in/out queue
#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
bengo joined the channel
#ZegnatAlright: goal for tomorrow: get beanstalk going :D I might bother you a bit during the day, aaronpk. For now, bed.
[jeremycherfas], [dgold], tantek and [kevinmarks] joined the channel