Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Best way to make a website that uses multiple stacks
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Best way to make a website that uses multiple stacks

Hello All.

What would be the best way to make a website that uses LAMP for most of the website but then it uses some node.js for some of it (like for the live chat).

Comments

  • WSSWSS Member

    Best, or easiest? Proxy or replace that javascript-as-a-service product and find something else.

  • Java should roast slowly in a fire of sewer rats.

    Thanked by 1Aidan
  • but JAVASCRIPT is good. Annoying but good.

    Thanked by 2intovps Wolveix
  • @hammer said:
    but JAVASCRIPT is good. Annoying but good.

    Good for what? Most is written to be so insecure it's not even funny. Load on machines sux ass and most people block it. So again I ask good for what?

  • wwabbitwwabbit Member
    edited January 2018

    @hammer said:
    Hello All.

    What would be the best way to make a website that uses LAMP for most of the website but then it uses some node.js for some of it (like for the live chat).

    I would prefer to use nginx instead of apache to do this, but apache is perfectly capable of reverse proxying to node.js (or any other web app for that matter)

  • @AuroraZ
    Most people block it? I thought most people would be too lazy to even learn to block it let alone actually doing that.

    Also, I think it is faster if you can do something client side rather than using php to modify the html for example so it has uses.

  • Script block add on works miracles. Click it install forget it.

    Just because something is easy does not mean it is a good way to do things.

  • @AuroraZ
    When I said faster, I meant Faster for the users not for the programmer.

    I would love to here about a javascript alternative that works on most browsers.

    I love web programming for this. It offers choices sometimes, and at other times none at all.

  • AuroraZ said: Good for what? Most is written to be so insecure it's not even funny. Load on machines sux ass and most people block it. So again I ask good for what?

    he's referring to running v8 programs, i.e. MEAN, socketIO. NOT the native JAVA.

    @OP
    most of the time they are static files, so Nginx would behave better, and that's what usually they use in the industry.

  • Some lazy hack I did a while ago, nginx proxy in front of docker containers.

  • intovpsintovps Member, Host Rep

    @hammer said:
    Hello All.

    What would be the best way to make a website that uses LAMP for most of the website but then it uses some node.js for some of it (like for the live chat).

    Just virtual hosts with each directory linked to each server side language?

    / - static files, php-fpm
    /chat/ - nodejs
    etc.

    Thanked by 1kkrajk
  • oneilonlineoneilonline Member, Host Rep
    edited January 2018

    Why is it fake? Certainly is old, comments in link are old 2010.

    I'm not sold why node.js is so popular, I find php easier and faster.

  • Yes javascript is annoying, slow, usualy used without reason and a privacy nightmare. I block it and i will hate you if your site does not work without it (excluding the 1 or 2 cases where using it makes at least a bit of sense).

  • oneilonline said: I'm not sold why node.js is so popular, I find php easier and faster.

    have you even tried Node.js and its gang? There's a reason why they are called "rapid deployment".

  • @hammer said:
    Hello All.

    What would be the best way to make a website that uses LAMP for most of the website but then it uses some node.js for some of it (like for the live chat).

    As folks stated setup Apache as a reverse proxy to node.js or use Nginx as reverse proxy to node.js

    Or keep an eye on Nginx's new product Nginx Unit which a application server with node.js support coming soon

    My early play time with Nginx Unit on Centmin Mod https://community.centminmod.com/threads/nginxs-unit.12803/#post-54893 - looks promising.

    One of my Centmin Mod users benchmarks with Nginx Unit serving PHP-FPM https://community.centminmod.com/threads/nginxs-unit.12803/#post-54901 and my benchmarks https://community.centminmod.com/threads/nginxs-unit.12803/#post-54905

  • CrossBoxCrossBox Member, Patron Provider
    edited January 2018

    You should keep in mind that every system's speed is equal to the speed of its slowest part. That said, you should never try to reverse proxy from apache to nodejs, unless you absolutely have to. It's like putting a slow car in front of a Ferrari. Apache blocks, nodejs doesn't.

    You should be proxying from nginx to nodejs instead. Both of them utilise a non blocking event loop and you'll find no bottlenecks there.

    Thanked by 1abytecurious
Sign In or Register to comment.