1,675 karma · joined Jul 27, 2011 (15y ago) · 505 submissions
comment 9y ago · link · parent
This is way more overhead than threads which can share all of those resources.
comment 9y ago · link · parent
comment 9y ago · link · parent
A team where everyone is doing things "their way", and then rebuilding it if it wasn't up to par is an enormous waste of resources.
comment 9y ago · link · parent
comment 9y ago · link · parent
They neither remind you that "hey, you have credits, dont purchase more!" and they happily spend your new credits to hope none the wiser.
I imagine this was all for doing some creative accounting to pump up their books.
comment 9y ago · link · parent
The others (segment, heap) use explicit functions for different actions. Ex: heap.init()
The main benefit is you can detect API violations without loading the async script. If you call an invalid function with the former you have to wait for it to execute at some point in the future.
This allows you to surface errors immediately - breaking current exection - even if it's additional libraries havent loaded.
comment 9y ago · link · parent
With some sane level of standardization (lets say less than 6 combinations) it's easy enough to test all and fix up the discrepencies.
The more declaritive you are, and the less you assume about the environment, the better this will work.
Ie. if you need a package, always install it. On some distros it may be there by default, but you'll run into issues if it's not. The good thing about being declaritive is that there's no harm in checking.
comment 9y ago · link · parent
For instance, a common pattern being:
(function(w) { console.log(w.location); })(window)
This results in issues because it's unaware that window would contain other methods. Is it possible to exclude certain objects in this case?
comment 9y ago · link · parent
> If you are containerizing your stateless app, where do you store the connection pool? I suppose you could setup another container as a TCP proxy that can maintain persistent connections and then connect to redis through the proxy?
Containerizing doesn't prevent you from having a connection pool, but PHP doesn't allow you to have a proper connection pool regardless. I believe there is a misunderstanding on containers here.
> What do you mean by "containerizing"? Unless you restart app instances for every single request, I don't see how connection pooling is an issue. Just putting a worker in a container doesn't stop it from keeping a connection open.
This comment corrects the misconception about "containerizing", but then overlooks that PHP is effectively restarted per request.