|
Senor_Doobie
Snake Pit Champion


Registered: 08/11/99
Posts: 22,678
Loc: Trump Train
|
NodeJS vs php / MySQL
#23944482 - 12/20/16 07:48 PM (7 years, 1 month ago) |
|
|
Of course it depends on the application...I'm currently using php and mysql to do a pretty data-intensive project I thought up. I'm afraid I should have used NodeJS instead but I don't know NODE_JS. j
I have a lot of hours into php and mysql on another project that I am letting lie dormant right now while I concentrate on this other project I started this week. But it's a lot of work writing all this code and Now I think I might be better off learning NodeJS before really starting in on this project.
Further complicated is I am paying for space on an Apache server right now. And I have a contract. But all of my ideas are data driven, and I'm afraid I might be using a dinosaur.
Can someone help illuminate me on the advantages of Node_JS? Am I blowing this all out of proportion?
-------------------- "America: Fuck yeah!" -- Alexthegreat “Nothing can now be believed which is seen in a newspaper. Truth itself becomes suspicious by being put into that polluted vehicle. The real extent of this state of misinformation is known only to those who are in situations to confront facts within their knowledge with the lies of the day.” -- Thomas Jefferson The greatest sin of mankind is ignorance. The press takes [Trump] literally, but not seriously; his supporters take him seriously, but not literally. --Salena Zeto (9/23/16)
|
Oggy
Stranger Danger


Registered: 12/05/14
Posts: 1,276
Loc: Planet Remulak
Last seen: 6 months, 29 days
|
|
Well without knowing what you're doing I can't really help you. NodeJS isn't a webserver (per se) so your host may not provide that as an alternative, usually you would need a vps or similar. Also NodeJS isn't a database either, however you can probably find some SQL bindings or library for it.
NodeJS is asynchronous but it doesn't do threads, it has some I/RPC-like functionality. So if you need to handle live client->server->client communication it would be great. If you just need to feed a webpage with fetched data from a database, it might be better to just stick with php and sql.
--------------------
|
Senor_Doobie
Snake Pit Champion


Registered: 08/11/99
Posts: 22,678
Loc: Trump Train
|
Re: NodeJS vs php / MySQL [Re: Oggy]
#23949682 - 12/22/16 05:14 PM (7 years, 1 month ago) |
|
|
Yeah, see, it is more like you aare describing with clients feeding the server and receiving from the server. Why is Node.js more advantageous in that case?
THanks for the reply!
-------------------- "America: Fuck yeah!" -- Alexthegreat “Nothing can now be believed which is seen in a newspaper. Truth itself becomes suspicious by being put into that polluted vehicle. The real extent of this state of misinformation is known only to those who are in situations to confront facts within their knowledge with the lies of the day.” -- Thomas Jefferson The greatest sin of mankind is ignorance. The press takes [Trump] literally, but not seriously; his supporters take him seriously, but not literally. --Salena Zeto (9/23/16)
|
Oggy
Stranger Danger


Registered: 12/05/14
Posts: 1,276
Loc: Planet Remulak
Last seen: 6 months, 29 days
|
|
It's more advantageous in the regard that you need a non-stop, real time, back and forth communication. PHP is not specialized for this. In PHP you would achieve similar results with $_GET/$_SET scripts that are fetched with ajax and timers. That will provide high latency real time communication.
Also NodeJS is not dictated by cross origin policies.
--------------------
|
Senor_Doobie
Snake Pit Champion


Registered: 08/11/99
Posts: 22,678
Loc: Trump Train
|
Re: NodeJS vs php / MySQL [Re: Oggy]
#23950863 - 12/23/16 05:09 AM (7 years, 1 month ago) |
|
|
Thanks Og.
-------------------- "America: Fuck yeah!" -- Alexthegreat “Nothing can now be believed which is seen in a newspaper. Truth itself becomes suspicious by being put into that polluted vehicle. The real extent of this state of misinformation is known only to those who are in situations to confront facts within their knowledge with the lies of the day.” -- Thomas Jefferson The greatest sin of mankind is ignorance. The press takes [Trump] literally, but not seriously; his supporters take him seriously, but not literally. --Salena Zeto (9/23/16)
|
|