1) What is node.js?
Node.js is a Server side scripting which is used to build
scalable programs. Its multiple advantages over other server side languages,
the prominent being non-blocking I/O.
2) How node.js works?
Node.js works on a v8 environment, it is a virtual machine that
utilizes JavaScript as its scripting language and achieves high output via
non-blocking I/O and single threaded event loop.
3) What do you mean by the term I/O ?
I/O is the shorthand for input and output, and it will access
anything outside of your application. It will be loaded into the machine memory
to run the program, once the application is started.
4) What does event-driven programming mean?
In computer programming, event driven programming is a
programming paradigm in which the flow of the program is determined by events
like messages from other programs or threads. It is an application architecture
technique divided into two sections 1) Event Selection 2) Event Handling
5) Where can we use node.js?
Node.js can be used for the following purposes
a) Web applications ( especially real-time web
apps )
b) Network applications
c) Distributed systems
d) General purpose applications
6) What is the advantage of using node.js?
a) It provides an easy way to build scalable
network programs
b) Generally fast
c) Great concurrency
d) Asynchronous everything
e) Almost never blocks
7) What are the two types of API functions in Node.js ?
The two types of API functions in Node.js are
a) Asynchronous, non-blocking functions
b) Synchronous, blocking functions
8) What is control flow function?
A generic piece of code which runs in between several
asynchronous function calls is known as control flow function.
9) Explain the steps how “Control Flow” controls the functions calls?
a) Control the order of execution
b) Collect data
c) Limit concurrency
d) Call the next step in program
10) Why Node.js is single threaded?
For async processing, Node.js was created explicitly as an
experiment. It is believed that more performance and scalability can be
achieved by doing async processing on a single thread under typical web loads
than the typical thread based implementation.
11) Does node run on windows?
Yes – it does.
12) Can you access DOM in node?
No, you cannot access DOM in node.
13) Using the event loop what are the tasks that should be done asynchronously?
a) I/O operations
b) Heavy computation
c) Anything requiring blocking
14) Why node.js is quickly gaining attention from JAVA programmers?
Node.js is quickly gaining attention as it is a loop based
server for JavaScript. Node.js gives user the ability to write the JavaScript
on the server, which has access to things like HTTP stack, file I/O, TCP and
databases.
15) What are the two arguments that async.queue takes?
The two arguments that async.queue takes
a) Task function
No comments:
Post a Comment