Most active commenters

    ←back to thread

    155 points feep | 11 comments | | HN request time: 1.213s | source | bottom
    Show context
    Traubenfuchs ◴[] No.44464611[source]
    Try an apache tomcat 11 next. You can just dump .jsp files or whole java servlet applications as .war file via ssh and it will just work!

    One shared JVM for maximum performance!

    It can also share db connection pools, caches, etc. among those applications!

    Wow!

    replies(4): >>44464663 #>>44464883 #>>44470934 #>>44477758 #
    1. atemerev ◴[] No.44464663[source]
    I miss this so much. Deployment should be just copying the file (over ssh or whatever). Why people overcomplicated it so much?
    replies(5): >>44464765 #>>44464831 #>>44465743 #>>44466836 #>>44467142 #
    2. rexreed ◴[] No.44464765[source]
    PHP can work the same way. Push / FTP / SFTP PHP file to directory, deployed.
    replies(1): >>44465231 #
    3. mrweasel ◴[] No.44464831[source]
    > Why people overcomplicated it so much?

    Because a lot of production software is half-baked. If you have to hand over an application to an operations team you need documentation, instrumentation, useful logging, error handling and a ton of other things. Instead software is now stuffed into containers that never receive security updates, because containers make things secure apparently. Then the developers can just dump whatever works into a container and hide the details.

    To be fair most of that software is also way more complex today. There are a ton of dependencies and integrations and keeping track of them is a lot of work.

    I did work with an old school C programmer that complained that a system we deployed was a ~2GB war file, running on Tomcat and requiring at least 8GB of memory and still crashed constantly. He had on multiple occasions offered to rewrite the how thing in C, which he figured would be <1MB and requiring at most 50MB of RAM to run. Sadly the customer never agreed, I would have loved to see if it had worked out as he predicted.

    4. Twirrim ◴[] No.44465231[source]
    We used to use symlinks to enable atomic operations, too. e.g. under /var/www/ we'd have /var/www/webapp_1.0, and have a symlink /var/www/webapp pointing to it. When there was a new version, upload it to /var/www/webapp_1.1, and then to bring it live, just update the symlink. Need to roll back? Switch the symlink back.
    replies(1): >>44466037 #
    5. nickjj ◴[] No.44465743[source]
    Docker helps with this nowadays. Of course you need to understand setting things up the first time you do it but once you know, it can apply to any tech stack.

    I develop and deploy Flask + Rails + Django apps regularly and the deploy process is the same few Docker Compose commands. All of the images are stored the same with only tiny differences in the Dockerfile itself.

    It has been a tried and proven model for ~10 years. The core fundamentals have held up, there's new features but when I look at Dockerfiles I've written in 2015 vs today you can still see a lot of common ideas.

    replies(1): >>44466372 #
    6. trinix912 ◴[] No.44466037{3}[source]
    Wouldn't that cause problems when someone would find the old version and corrupt the data with it? Or would only the current version be accessible from the outside?
    replies(2): >>44466795 #>>44468182 #
    7. atemerev ◴[] No.44466372[source]
    Docker makes things opaque. You deploy black boxes and have no idea how the components there operate. Which is fine for devops, but as a software engineer, I prefer to work without Docker (and having to use Docker to install something on a local machine is an abomination, of course).
    8. indigodaddy ◴[] No.44466795{4}[source]
    How would an external user find the old version?
    9. stackskipton ◴[] No.44466836[source]
    Ops here, I mean you still can if you use something like Golang or Java/.Net self-contained. However, the days of "Just transfer over PHP files" ignore the massive setup that Ops had to do to get web server into state where those files could just be transferred over and care/feeding required to keep the web server in that state.

    Not to mention endless frustration any upgrades would cause since we had to get all teams onboard with "Hey, we are upgrading PHP 5, you ready?" and there was always that abandoned app that couldn't be shut down because $BusinessReasons.

    Containers have greatly helped with those frustration points and languages self-hosting HTTP have really made stuff vastly better for us Ops folks.

    10. mrkeen ◴[] No.44467142[source]
    Perhaps. Over SSH? With a password or with a key? Do all employees share the same private key or do keys need to get added and removed when employees come and go. Is there one server or three (Are all deployment instructions done manually in triplicate?). When tomcat itself is upgraded, do you just eat the downtime? What about the system package upgrades or the OS? Which file should be copied over - whatever a particular Dev feels is the latest?
    11. Twirrim ◴[] No.44468182{4}[source]
    Your apache/whatever config would be pointed to the symlink location. No one would be able to get at the old versions of the site.

    We'd use this approach not just for webapps, but versions of applications we'd build in house, bundles of scripts, whatever.