• 0 Posts
  • 12 Comments
Joined 2 years ago
cake
Cake day: June 12th, 2023

help-circle
  • atzanteol@sh.itjust.workstoSelfhosted@lemmy.worldNextcloud (PHP) vs OpenCloud (Go)
    link
    fedilink
    English
    arrow-up
    6
    arrow-down
    1
    ·
    edit-2
    2 days ago

    PHP does actually scale better than something like Lemmy which is written in rust

    Okay - How then?

    But sure, you can act like you know more than the Nextcloud devs

    I’m a web developer too - so I feel rather qualified to speak on the subject. I don’t think the Nextcloud developers are some sort of genius team of engineers but I’m not saying they’re stupid or anything - just that PHP does not scale better than “practically every other technology out there”.

    It forks or creates a thread per request. It’s horizontal scaling which is pretty common with any webapp. I don’t know why they claim PHP is special here. It’s a very common way to handle requests and you can do that with lots of languages and frameworks. More CPUs = more threads = more scaling. Throw more servers into the mix and you’re now “infinitely scaling” right? Well… No. Because I/O.

    Webapps tend to be I/O bound rather than CPU bound. So asynchronous I/O leads to much better performance generally with fewer resources. Because no matter how many threads and servers you put in the app tier you’re going to be limited by the disks on your database at some point.


  • The scaling, in particular, is a huge benefit of PHP over practically every other technology out there: to double the performance of a PHP server, you can simply have twice as many cores and things will work without any changes needed. Not only is the scaling you get pretty much 100%, unlike other languages, this scaling continues beyond a single server!

    There is so much wrong with this that it’s difficult to know where to start…