I really miss the simplicity of CodeIgniter sometimes -- and the raw speed of it. I still have legacy projects I have to update from time to time. My oldest apps are now approaching 14 years old and still running. I am now at the point of stuff being complex where Laravel saves a bunch of time with the built ins but would not hesitate to reach for CI for a quick POC or simple site.
It really depends. I currently have one queue with nearly 70,000 items in it and those queue items have serialized models that are probably worth a few hundred kilobytes a piece... it can add up quickly.
I have worked on platforms that had 120GB+ of cached data in Redis and RAM disks where anytime someone wanted to use a memory cache it had to go through a whole process to get approval.
This is a really long article to say you cached your static HTML.... You could have done this without Varnish added to the stack. Nginx is more than capable and often used for this exact purpose.
For me it is like posting Part 4 of a 5 part series and telling everyone go watch the other series and then come back to this.... a quick 30 second 10 mile high view of generics would have went a long way.
I look at it more like hooks in the pipeline where you have opportunities to modify the request or output before the response is flushed back to the user.
Your framework typically controls where in the pipeline you are able to hook into. It is not always a straight line as the hooks can be in multiple places (like built into the ORM).
What you really want is a full picture of your frameworks request / response lifecycle laid out in a linear manner, and then seeing which of those processes have hooks for middleware to run.
I recently found myself asking the question of how all of my personal sites are being found -- this makes sense. I guess if you want to be as hard as possible to find online you have to issue your own SSL and use the IP address.
Plan for 99% of your traffic, not for surge traffic else you will make it worse for 99% of your traffic
Not sure that actually makes any sense. It is more like 99% of your traffic will never know your server can handle a surge (or care).
The biggest reason I use CloudFlare is to stop unwanted traffic going to the server at all. AI scrapers, bots, DoS --- you have that layer before the traffic hits your actual server not to mention the ability to load balance, offload or fail over.
I am not sure PHP has really ever been the slowest part, I/O operations always seem to be the bigger bottleneck be it disk or network ops. I have mostly experienced the biggest gains caching between PHP and the database server or using state machines or registers filled out of band.
I could have sworn when I was working on that project it was a browser limitation -- not a server limitation. I think Opera at the time allowed up to 20 connections, Firefox was like 10. Chrome was the only browser that had a very low connection limit.
What we really need is a better front end scaffolding / boilerplate. There are some limitations of SSE that probably do not affect everyone, but do affect a great number of "dashboard" like applications, the kind where someone has more than a few tabs of the site open at the same time. There are limitations that the browsers impose on the number of connections to a site. With Chrome (last time I messed with SSE) the limit was six. So when the person opens that fifth tab stuff starts to not load. You need to have a front end that assigns a single worker (using the lock API) to handle the SSE connection for ALL tabs. So that same worker re-distributes the messages as events or otherwise handles putting them in a global queue.
I am excited for all new things --- but I do not use AI to write code. I feel like I have to know what my code is doing and be conscious of what is being used (library wise). The most code automation that I might do is use a starter kit.
So PHP ecosystem is stuck with this cycle: dispatch requests -> wait until all requests complete -> dispatch requests.
I did not know that this was something missing from PHP. A few projects back I had to scrape a few thousands pages a day from various websites and I ended up building 6 VM's with a full desktop and Chromium with Selenium.
In addition I also created 6 surfed and rotated profiles with real surfing done with them. When a page was needed to be crawled I had a router that would round robin the selenium request out to each VM. The client would get back a claim ticket which included it's place in line and estimated fulfillment time based on the last hour of requests.
Most of the workers that needed the HTML to parse worked in a loop so they would just re-query the router with their claim ticket to see if it was completed or not. A single worker might have been working 4 or 5 different crawls so when one came back it would process that one and then remove it from it's work queue and either request more crawl's or process crawl's that were ready.
Not exactly a Promise.all() situation as in that same loop other work for that worker could come in that was not a crawl
I am pretty sure anyone that is doing serious crawling is using a similar situation. I do not think it is a new pattern at all.
The real fun is going to happen when it starts folding back on itself and using buggy code... then it will write even buggier code and eventually end the world. <JOHN_HAMM_CLUB_SCENE />
Anyone else find it amazing that this post has absolutely not a single link to the project? I guess you have to be in the loop of PIE.
I really miss the simplicity of CodeIgniter sometimes -- and the raw speed of it. I still have legacy projects I have to update from time to time. My oldest apps are now approaching 14 years old and still running. I am now at the point of stuff being complex where Laravel saves a bunch of time with the built ins but would not hesitate to reach for CI for a quick POC or simple site.
It really depends. I currently have one queue with nearly 70,000 items in it and those queue items have serialized models that are probably worth a few hundred kilobytes a piece... it can add up quickly.
I have worked on platforms that had 120GB+ of cached data in Redis and RAM disks where anytime someone wanted to use a memory cache it had to go through a whole process to get approval.
Memory too expensive these days to continue to use Redis when the database is so performant now.
Neat if you have the use case, but most of my bottleneck is disk and network I/O. PHP was never the bottleneck.
That is a really long article to arrive at batching? Is that what you arrived at? $230/month to batch messages to the brokers?
Also - a ton of your mermaid diagrams (or is that markdown) is not rendering.
This is a really long article to say you cached your static HTML.... You could have done this without Varnish added to the stack. Nginx is more than capable and often used for this exact purpose.
Deposit $1,200 for answers to these questions to find out.
For me it is like posting Part 4 of a 5 part series and telling everyone go watch the other series and then come back to this.... a quick 30 second 10 mile high view of generics would have went a long way.
I look at it more like hooks in the pipeline where you have opportunities to modify the request or output before the response is flushed back to the user.
Your framework typically controls where in the pipeline you are able to hook into. It is not always a straight line as the hooks can be in multiple places (like built into the ORM).
What you really want is a full picture of your frameworks request / response lifecycle laid out in a linear manner, and then seeing which of those processes have hooks for middleware to run.
I'm tired.
For CLI I just have like php74, php81 php84... they all alias to a script that runs a docker container.
I recently found myself asking the question of how all of my personal sites are being found -- this makes sense. I guess if you want to be as hard as possible to find online you have to issue your own SSL and use the IP address.
Not sure that actually makes any sense. It is more like 99% of your traffic will never know your server can handle a surge (or care).
The biggest reason I use CloudFlare is to stop unwanted traffic going to the server at all. AI scrapers, bots, DoS --- you have that layer before the traffic hits your actual server not to mention the ability to load balance, offload or fail over.
I am not sure PHP has really ever been the slowest part, I/O operations always seem to be the bigger bottleneck be it disk or network ops. I have mostly experienced the biggest gains caching between PHP and the database server or using state machines or registers filled out of band.
You need to rename the project / product. Medicare is the name of a massive US Healthcare system.
He will be blocked at every turn to launch in the USA... which probably is a concern.
Well - I guess getting sued is one way to get your product in the news.
Fidonet.... now that is a thing I have not heard in a long time. I was a hub in 713 way back in the day.
I could have sworn when I was working on that project it was a browser limitation -- not a server limitation. I think Opera at the time allowed up to 20 connections, Firefox was like 10. Chrome was the only browser that had a very low connection limit.
What we really need is a better front end scaffolding / boilerplate. There are some limitations of SSE that probably do not affect everyone, but do affect a great number of "dashboard" like applications, the kind where someone has more than a few tabs of the site open at the same time. There are limitations that the browsers impose on the number of connections to a site. With Chrome (last time I messed with SSE) the limit was six. So when the person opens that fifth tab stuff starts to not load. You need to have a front end that assigns a single worker (using the lock API) to handle the SSE connection for ALL tabs. So that same worker re-distributes the messages as events or otherwise handles putting them in a global queue.
I think we may have killed the site. Nothing is coming up.
I am excited for all new things --- but I do not use AI to write code. I feel like I have to know what my code is doing and be conscious of what is being used (library wise). The most code automation that I might do is use a starter kit.
I did not know that this was something missing from PHP. A few projects back I had to scrape a few thousands pages a day from various websites and I ended up building 6 VM's with a full desktop and Chromium with Selenium.
In addition I also created 6 surfed and rotated profiles with real surfing done with them. When a page was needed to be crawled I had a router that would round robin the selenium request out to each VM. The client would get back a claim ticket which included it's place in line and estimated fulfillment time based on the last hour of requests.
Most of the workers that needed the HTML to parse worked in a loop so they would just re-query the router with their claim ticket to see if it was completed or not. A single worker might have been working 4 or 5 different crawls so when one came back it would process that one and then remove it from it's work queue and either request more crawl's or process crawl's that were ready.
Not exactly a Promise.all() situation as in that same loop other work for that worker could come in that was not a crawl
I am pretty sure anyone that is doing serious crawling is using a similar situation. I do not think it is a new pattern at all.
The real fun is going to happen when it starts folding back on itself and using buggy code... then it will write even buggier code and eventually end the world. <JOHN_HAMM_CLUB_SCENE />
Look at FrakenPHP or Swoole if you want a more "Node" like experience where you can just reverse proxy through NGINX.