5 ms·
Reply to "Scala is Easier than PHP"
- barrkel 16y agoOn the topic of not restarting your web server after making changes: more interesting to me is parallel sessions running different versions of the server code. New sessions coming in get the newest version of the code, while older sessions keep running the old code, for an arbitrary (configurable) amount of time. This was a property of a system I was part of building in a previous job, and it worked very nicely; all session state was in a tiny (<64K) blob of data which contained in its header a pointer (intranet URL) to the server application metadata. In an ASP.NET environment, this made minor upgrades to the app server software painless, with no need to partition the web farm, bleed out old sessions and bring up new sessions, etc.; it's all automatic.
- puls 16y agoI have trouble believing that "no shared state" and "reloading your code with every execution" can possibly be an advantage in production. Maybe when you're developing, sure, but they otherwise only force you in to inefficient workarounds. Of course, the statelessness of HTTP contributes to the necessity, but using a proper language (there, I said it) doesn't get in the way of creating a proper server application.
- foobarbazetc 16y agoThe best thing about PHP is that the entire 'world' for each script is torn down after every request. Pair that up with APC in apc.stat=0 mode, and you have the easiest deployment method for a production site anywhere. The worst thing about PHP is that it's PHP.
- old_sound 16y agoIt depends on the size of your project of course… But if you don't want to reload and compile the scripts for every request, then you use APC as other commenter posts here. My main problem with that way of PHP working is that you have to load again and again all the configuration, even if say your database is still on the same host:port. With a long running process, you'll just load that once. For me it always depends on the task at hand what tool you'll use.