Server selection- Node.js/Apache

40 views
Skip to first unread message

TUSHAR SONI

unread,
Aug 9, 2014, 6:25:59 AM8/9/14
to cs164-...@googlegroups.com
Hi all,
          Can anyone tell me why we use Node.js with JS as server rather than Apache with PHP, what's benefits of using Node.js rather than apache. since in this class we use Laravel framwork and node.js both and if node.js is better why malan sir introduce Laravel. can we use both simultaneously? if yes, How? Plzz help i'm confusing on it.
Thanks!!

Rod Ruggiero

unread,
Aug 9, 2014, 2:17:08 PM8/9/14
to cs164-...@googlegroups.com
I'm not an expert but as I understand it (feel free to correct me Daivid :) Node.js is asynchronous.  What this allows is for your program to make a request let's say to a database, and instead of having to wait for the response before continuing (as with PHP), it can do something else in the meantime.  When the response comes back from the db (or wherever) then your program does whatever it needs to with the response.  Roughly like being able to help more than one person at a time on the phone by putting someone on hold while helping another.  For a dynamic environment or an environment that needs to scale, this can end up a lot faster.  (People often pair up node with nginx - node serving dynamic processes, and nginx handling static requests.)

Another reason is that David knows when you go for a job, if you know PHP but not node, your education will look "dated".  ;)

Anyone else who is an expert, please correct me where I'm wrong - I love to learn too.



--
You received this message because you are subscribed to the Google Groups "cs164-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cs164-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rod Ruggiero

unread,
Aug 9, 2014, 2:42:03 PM8/9/14
to cs164-...@googlegroups.com
Ok, I'll correct myself "David" not "Daivid" - LOL.

TUSHAR SONI

unread,
Aug 10, 2014, 5:10:03 AM8/10/14
to cs164-...@googlegroups.com
First of all thanks Rod for your fast response, 
So should i more focusing on Node rather than Laravel because i'm beginner in both cases? Am i right? and can you also tell me that which DB is good for Node (MySQL or MongoDB)?
thanks in advance!!
Reply all
Reply to author
Forward
0 new messages