3 ms·
I mean, you generally want node to be stateless too. the DB should be your state.
by virtue3 6y ago
I mean, you generally want node to be stateless too. the DB should be your state.
- throwanem 6y ago"Stateless" here meaning that a given process only lives as long as it takes to receive and respond to a single request, as in the classic CGI model (where PHP originated), or like how an AWS Lambda works. In practice it mainly means that, in exchange for process startup overhead added to your response times, you get to get away with being sloppy about how you initialize and dispose of resources. It's not something I have ever really regarded as a virtue, and it's one reason why PHP devs can have real trouble transitioning to platforms where the same assumption no longer holds.
- sroussey 6y agoYes, transitioning elsewhere can be an issue for sure! But dealing with small leaks that build over time can be a time sink to track down, particularly if in libs you didn’t author.