Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %% bare_conf.tex
- %% V1.4b
- %% 2015/08/26
- %% by Michael Shell
- %% See:
- %% http://www.michaelshell.org/
- %% for current contact information.
- %%
- %% This is a skeleton file demonstrating the use of IEEEtran.cls
- %% (requires IEEEtran.cls version 1.8b or later) with an IEEE
- %% conference paper.
- %%
- %% Support sites:
- %% http://www.michaelshell.org/tex/ieeetran/
- %% http://www.ctan.org/pkg/ieeetran
- %% and
- %% http://www.ieee.org/
- %%*************************************************************************
- %% Legal Notice:
- %% This code is offered as-is without any warranty either expressed or
- %% implied; without even the implied warranty of MERCHANTABILITY or
- %% FITNESS FOR A PARTICULAR PURPOSE!
- %% User assumes all risk.
- %% In no event shall the IEEE or any contributor to this code be liable for
- %% any damages or losses, including, but not limited to, incidental,
- %% consequential, or any other damages, resulting from the use or misuse
- %% of any information contained here.
- %%
- %% All comments are the opinions of their respective authors and are not
- %% necessarily endorsed by the IEEE.
- %%
- %% This work is distributed under the LaTeX Project Public License (LPPL)
- %% ( http://www.latex-project.org/ ) version 1.3, and may be freely used,
- %% distributed and modified. A copy of the LPPL, version 1.3, is included
- %% in the base LaTeX documentation of all distributions of LaTeX released
- %% 2003/12/01 or later.
- %% Retain all contribution notices and credits.
- %% ** Modified files should be clearly indicated as such, including **
- %% ** renaming them and changing author support contact information. **
- %%*************************************************************************
- % *** Authors should verify (and, if needed, correct) their LaTeX system ***
- % *** with the testflow diagnostic prior to trusting their LaTeX platform ***
- % *** with production work. The IEEE's font choices and paper sizes can ***
- % *** trigger bugs that do not appear when using other class files. *** ***
- % The testflow support page is at:
- % http://www.michaelshell.org/tex/testflow/
- \documentclass[conference]{IEEEtran}
- % Some Computer Society conferences also require the compsoc mode option,
- % but others use the standard conference format.
- %
- % If IEEEtran.cls has not been installed into the LaTeX system files,
- % manually specify the path to it like:
- % \documentclass[conference]{../sty/IEEEtran}
- % Some very useful LaTeX packages include:
- % (uncomment the ones you want to load)
- % *** MISC UTILITY PACKAGES ***
- %
- %\usepackage{ifpdf}
- % Heiko Oberdiek's ifpdf.sty is very useful if you need conditional
- % compilation based on whether the output is pdf or dvi.
- % usage:
- % \ifpdf
- % % pdf code
- % \else
- % % dvi code
- % \fi
- % The latest version of ifpdf.sty can be obtained from:
- % http://www.ctan.org/pkg/ifpdf
- % Also, note that IEEEtran.cls V1.7 and later provides a builtin
- % \ifCLASSINFOpdf conditional that works the same way.
- % When switching from latex to pdflatex and vice-versa, the compiler may
- % have to be run twice to clear warning/error messages.
- % *** CITATION PACKAGES ***
- %
- %\usepackage{cite}
- % cite.sty was written by Donald Arseneau
- % V1.6 and later of IEEEtran pre-defines the format of the cite.sty package
- % \cite{} output to follow that of the IEEE. Loading the cite package will
- % result in citation numbers being automatically sorted and properly
- % "compressed/ranged". e.g., [1], [9], [2], [7], [5], [6] without using
- % cite.sty will become [1], [2], [5]--[7], [9] using cite.sty. cite.sty's
- % \cite will automatically add leading space, if needed. Use cite.sty's
- % noadjust option (cite.sty V3.8 and later) if you want to turn this off
- % such as if a citation ever needs to be enclosed in parenthesis.
- % cite.sty is already installed on most LaTeX systems. Be sure and use
- % version 5.0 (2009-03-20) and later if using hyperref.sty.
- % The latest version can be obtained at:
- % http://www.ctan.org/pkg/cite
- % The documentation is contained in the cite.sty file itself.
- % *** GRAPHICS RELATED PACKAGES ***
- %
- \ifCLASSINFOpdf
- \usepackage[pdftex]{graphicx}
- % declare the path(s) where your graphic files are
- % \graphicspath{{../pdf/}{../jpeg/}}
- % and their extensions so you won't have to specify these with
- % every instance of \includegraphics
- % \DeclareGraphicsExtensions{.pdf,.jpeg,.png}
- \else
- % or other class option (dvipsone, dvipdf, if not using dvips). graphicx
- % will default to the driver specified in the system graphics.cfg if no
- % driver is specified.
- % \usepackage[dvips]{graphicx}
- % declare the path(s) where your graphic files are
- % \graphicspath{{../eps/}}
- % and their extensions so you won't have to specify these with
- % every instance of \includegraphics
- % \DeclareGraphicsExtensions{.eps}
- \fi
- % graphicx was written by David Carlisle and Sebastian Rahtz. It is
- % required if you want graphics, photos, etc. graphicx.sty is already
- % installed on most LaTeX systems. The latest version and documentation
- % can be obtained at:
- % http://www.ctan.org/pkg/graphicx
- % Another good source of documentation is "Using Imported Graphics in
- % LaTeX2e" by Keith Reckdahl which can be found at:
- % http://www.ctan.org/pkg/epslatex
- %
- % latex, and pdflatex in dvi mode, support graphics in encapsulated
- % postscript (.eps) format. pdflatex in pdf mode supports graphics
- % in .pdf, .jpeg, .png and .mps (metapost) formats. Users should ensure
- % that all non-photo figures use a vector format (.eps, .pdf, .mps) and
- % not a bitmapped formats (.jpeg, .png). The IEEE frowns on bitmapped formats
- % which can result in "jaggedy"/blurry rendering of lines and letters as
- % well as large increases in file sizes.
- %
- % You can find documentation about the pdfTeX application at:
- % http://www.tug.org/applications/pdftex
- % *** MATH PACKAGES ***
- %
- %\usepackage{amsmath}
- % A popular package from the American Mathematical Society that provides
- % many useful and powerful commands for dealing with mathematics.
- %
- % Note that the amsmath package sets \interdisplaylinepenalty to 10000
- % thus preventing page breaks from occurring within multiline equations. Use:
- %\interdisplaylinepenalty=2500
- % after loading amsmath to restore such page breaks as IEEEtran.cls normally
- % does. amsmath.sty is already installed on most LaTeX systems. The latest
- % version and documentation can be obtained at:
- % http://www.ctan.org/pkg/amsmath
- % *** SPECIALIZED LIST PACKAGES ***
- %
- %\usepackage{algorithmic}
- % algorithmic.sty was written by Peter Williams and Rogerio Brito.
- % This package provides an algorithmic environment fo describing algorithms.
- % You can use the algorithmic environment in-text or within a figure
- % environment to provide for a floating algorithm. Do NOT use the algorithm
- % floating environment provided by algorithm.sty (by the same authors) or
- % algorithm2e.sty (by Christophe Fiorio) as the IEEE does not use dedicated
- % algorithm float types and packages that provide these will not provide
- % correct IEEE style captions. The latest version and documentation of
- % algorithmic.sty can be obtained at:
- % http://www.ctan.org/pkg/algorithms
- % Also of interest may be the (relatively newer and more customizable)
- % algorithmicx.sty package by Szasz Janos:
- % http://www.ctan.org/pkg/algorithmicx
- % *** ALIGNMENT PACKAGES ***
- %
- %\usepackage{array}
- % Frank Mittelbach's and David Carlisle's array.sty patches and improves
- % the standard LaTeX2e array and tabular environments to provide better
- % appearance and additional user controls. As the default LaTeX2e table
- % generation code is lacking to the point of almost being broken with
- % respect to the quality of the end results, all users are strongly
- % advised to use an enhanced (at the very least that provided by array.sty)
- % set of table tools. array.sty is already installed on most systems. The
- % latest version and documentation can be obtained at:
- % http://www.ctan.org/pkg/array
- % IEEEtran contains the IEEEeqnarray family of commands that can be used to
- % generate multiline equations as well as matrices, tables, etc., of high
- % quality.
- % *** SUBFIGURE PACKAGES ***
- %\ifCLASSOPTIONcompsoc
- % \usepackage[caption=false,font=normalsize,labelfont=sf,textfont=sf]{subfig}
- %\else
- % \usepackage[caption=false,font=footnotesize]{subfig}
- %\fi
- % subfig.sty, written by Steven Douglas Cochran, is the modern replacement
- % for subfigure.sty, the latter of which is no longer maintained and is
- % incompatible with some LaTeX packages including fixltx2e. However,
- % subfig.sty requires and automatically loads Axel Sommerfeldt's caption.sty
- % which will override IEEEtran.cls' handling of captions and this will result
- % in non-IEEE style figure/table captions. To prevent this problem, be sure
- % and invoke subfig.sty's "caption=false" package option (available since
- % subfig.sty version 1.3, 2005/06/28) as this is will preserve IEEEtran.cls
- % handling of captions.
- % Note that the Computer Society format requires a larger sans serif font
- % than the serif footnote size font used in traditional IEEE formatting
- % and thus the need to invoke different subfig.sty package options depending
- % on whether compsoc mode has been enabled.
- %
- % The latest version and documentation of subfig.sty can be obtained at:
- % http://www.ctan.org/pkg/subfig
- % *** FLOAT PACKAGES ***
- %
- %\usepackage{fixltx2e}
- % fixltx2e, the successor to the earlier fix2col.sty, was written by
- % Frank Mittelbach and David Carlisle. This package corrects a few problems
- % in the LaTeX2e kernel, the most notable of which is that in current
- % LaTeX2e releases, the ordering of single and double column floats is not
- % guaranteed to be preserved. Thus, an unpatched LaTeX2e can allow a
- % single column figure to be placed prior to an earlier double column
- % figure.
- % Be aware that LaTeX2e kernels dated 2015 and later have fixltx2e.sty's
- % corrections already built into the system in which case a warning will
- % be issued if an attempt is made to load fixltx2e.sty as it is no longer
- % needed.
- % The latest version and documentation can be found at:
- % http://www.ctan.org/pkg/fixltx2e
- %\usepackage{stfloats}
- % stfloats.sty was written by Sigitas Tolusis. This package gives LaTeX2e
- % the ability to do double column floats at the bottom of the page as well
- % as the top. (e.g., "\begin{figure*}[!b]" is not normally possible in
- % LaTeX2e). It also provides a command:
- %\fnbelowfloat
- % to enable the placement of footnotes below bottom floats (the standard
- % LaTeX2e kernel puts them above bottom floats). This is an invasive package
- % which rewrites many portions of the LaTeX2e float routines. It may not work
- % with other packages that modify the LaTeX2e float routines. The latest
- % version and documentation can be obtained at:
- % http://www.ctan.org/pkg/stfloats
- % Do not use the stfloats baselinefloat ability as the IEEE does not allow
- % \baselineskip to stretch. Authors submitting work to the IEEE should note
- % that the IEEE rarely uses double column equations and that authors should try
- % to avoid such use. Do not be tempted to use the cuted.sty or midfloat.sty
- % packages (also by Sigitas Tolusis) as the IEEE does not format its papers in
- % such ways.
- % Do not attempt to use stfloats with fixltx2e as they are incompatible.
- % Instead, use Morten Hogholm'a dblfloatfix which combines the features
- % of both fixltx2e and stfloats:
- %
- % \usepackage{dblfloatfix}
- % The latest version can be found at:
- % http://www.ctan.org/pkg/dblfloatfix
- % *** PDF, URL AND HYPERLINK PACKAGES ***
- %
- \usepackage{url}
- % url.sty was written by Donald Arseneau. It provides better support for
- % handling and breaking URLs. url.sty is already installed on most LaTeX
- % systems. The latest version and documentation can be obtained at:
- % http://www.ctan.org/pkg/url
- % Basically, \url{my_url_here}.
- % *** Do not adjust lengths that control margins, column widths, etc. ***
- % *** Do not use packages that alter fonts (such as pslatex). ***
- % There should be no need to do such things with IEEEtran.cls V1.6 and later.
- % (Unless specifically asked to do so by the journal or conference you plan
- % to submit to, of course. )
- % correct bad hyphenation here
- \hyphenation{op-tical net-works semi-conduc-tor}
- \begin{document}
- %
- % paper title
- % Titles are generally capitalized except for words such as a, an, and, as,
- % at, but, by, for, in, nor, of, on, or, the, to and up, which are usually
- % not capitalized unless they are the first or last word of the title.
- % Linebreaks \\ can be used within to get better formatting as desired.
- % Do not put math or special symbols in the title.
- \title{Node.js characteristics and comparison with other \\backend technologies}
- % author names and affiliations
- % use a multiple column layout for up to three different
- % affiliations
- \author{\IEEEauthorblockN{Dušan Milunović, dusanmilunovic17@gmail.com\\
- Nenad Mišić, nenad.misic997@gmail.com\\
- Nikola Nemeš, nikolanemzi@gmail.com}
- \IEEEauthorblockA{Faculty of Technical Sciences\\
- University of Novi Sad}}
- % conference papers do not typically use \thanks and this command
- % is locked out in conference mode. If really needed, such as for
- % the acknowledgment of grants, issue a \IEEEoverridecommandlockouts
- % after \documentclass
- % for over three affiliations, or if they all won't fit within the width
- % of the page, use this alternative format:
- %
- %\author{\IEEEauthorblockN{Michael Shell\IEEEauthorrefmark{1},
- %Homer Simpson\IEEEauthorrefmark{2},
- %James Kirk\IEEEauthorrefmark{3},
- %Montgomery Scott\IEEEauthorrefmark{3} and
- %Eldon Tyrell\IEEEauthorrefmark{4}}
- %\IEEEauthorblockA{\IEEEauthorrefmark{1}School of Electrical and Computer Engineering\\
- %Georgia Institute of Technology,
- %Atlanta, Georgia 30332--0250\\ Email: see http://www.michaelshell.org/contact.html}
- %\IEEEauthorblockA{\IEEEauthorrefmark{2}Twentieth Century Fox, Springfield, USA\\
- %Email: homer@thesimpsons.com}
- %\IEEEauthorblockA{\IEEEauthorrefmark{3}Starfleet Academy, San Francisco, California 96678-2391\\
- %Telephone: (800) 555--1212, Fax: (888) 555--1212}
- %\IEEEauthorblockA{\IEEEauthorrefmark{4}Tyrell Inc., 123 Replicant Street, Los Angeles, California 90210--4321}}
- % use for special paper notices
- %\IEEEspecialpapernotice{(Invited Paper)}
- % make the title area
- \maketitle
- % As a general rule, do not put math, special symbols or citations
- % in the abstract
- \begin{abstract}
- The abstract goes here.
- Keywords --- node.js; performance; backend technologies;
- \end{abstract}
- % For peer review papers, you can put extra information on the cover
- % page as needed:
- % \ifCLASSOPTIONpeerreview
- % \begin{center} \bfseries EDICS Category: 3-BBND \end{center}
- % \fi
- %
- % For peerreview papers, this IEEEtran command inserts a page break and
- % creates the second title. It will be ignored for other modes.
- \IEEEpeerreviewmaketitle
- \section{Introduction}
- % no \IEEEPARstart
- In this paper, we will compare Node.js to other popular backend technologies in terms of performance and scalability by analyzing different aspects of their implementations. We will further explain the key differences which allow Node.js to outperform its alternatives in specific situations. We will also address situations in which Node.js falls behind.\\ This paper can help people make a better decision which technology to use according to the project needs. In addition, it highlights the subtle differences which are often overlooked by developers and shows them what are the tasks in which this technology excels, but also presents critical situations where it is not the best choice.\\
- %\hfill mds
- %\hfill August 26, 2015
- \section{Introduction to node.js}
- In this part we will go over a brief historical summary of
- Node.js and describe the basic principles, including:
- \begin{itemize}
- \item Asynchronous function handling
- \item Event pooling
- \item Single-threaded pattern
- \end{itemize}
- \subsection{Historical overview}
- Here we will describe the idea and process of turning a
- frontend language into a fully-functional and high-performing
- server runtime environment.\\
- Node.js was developed by Ryan Dahl in 2009. It was built on Google's V8 JavaScript engine, which was formerly only used for front end applications in Google Chrome and couple of other internet browsers. It was initially only supported on Linux and Mac OS systems. The reason for the development of node.js was that the most popular web servers(such as Apache) had certain limitations. The biggest one was handling handling a large number of concurrent requests(up to 10000 and more). \cite{presentation:dahl}
- The main idea was to make a server side technology that could scale better and serve a larger number of clients. This was accomplished by using asynchronous function calls instead of long running synchronous function calls. This enables the server to make better use of processor time, but it also comes with its challenges when writing code.
- A node package manager(npm) was introduced in 2010, which has allowed the developers to easily distribute modules. This has led to a far greater speed of development of node.js projects.\cite{npm}
- \subsection{Basics of Node.js}
- In this subsection we will go over the basic principles which set Node
- apart from other backend technologies. \\
- %TODO: mozda dodaj za runtime environment
- \subsubsection{Asynchronous function handling}
- Node.js uses asynchronous function handling for I/O functions. What this means is that when an I/O function is called, the calling thread(the main thread of node.js) will not wait for it to finish execution. Instead it can continue to run the rest of the program that is not dependent on the result of the I/O operation. The code that is dependent on the result of the I/O operation will be placed in a callback function. This function will be called once the I/O operation is finished. The execution of the asynchronous method is usually delegated to the system kernel or a database program.
- \begin{figure}[ht]
- \centering
- \includegraphics[width=0.9\linewidth]{asynchronous}
- \caption{Asynchronous function calls}
- \label{fig:asynchronous}
- \end{figure}
- \subsubsection{Event pooling}
- \begin{figure}[ht]
- \centering
- \includegraphics[width=0.9\linewidth]{eventpool}
- \caption{Event loop}
- \label{fig:eventpool}
- \end{figure}
- The event loop allows Node.js to perform asynchronous I/O operations. \cite{eventloop:nodejs} It goes through a couple of phases. Each phase contains a queue of callbacks. Each phase also has a set of actions specific to it.\\
- Figure \ref{fig:eventpool} shows a diagram of the node js event loop. Every rectangle on the figure represents one phase of the event loop. In the next set of subsections, each phase will be analyzed. \cite{eventloop:nodejs}
- \paragraph{Timers}
- Callbacks from the setTimeout method will be placed in the timers phase's queue. This JavaScript method is used to specify a time period after which the callback function should be called. But since the event loop goes through multiple phases of variable lengths\footnote{In order to stop a phase from running too long and delaying other phases, a time limit is imposed on the length of the phase}, it can not be guaranteed that the callback function will be executed after that exact time interval, but rather after the timer expires.
- \paragraph{Pending callbacks}
- The callbacks which need to be executed in the next iteration of the event loop are put in this phase's queue. For instance, callbacks for some types of errors need to wait to report the error.
- \paragraph{Poll}
- Most callbacks used by the developer will end up in the poll phase's queue. That is because, once the system kernel finishes with the I/O operation, it puts the callback into this queue. If there are no callbacks ready in this phase, the event loop will block the execution and wait for a certain amount of time before continuing(unless there are callbacks ready in the check phase's queue or there are timer callbacks ready to execute). It does that because during that time, some callbacks might be added to the queue. The developer can avoid this feature if needed by using the setImmediate method. This method places a callback function in the check phase's queue. If both the poll and check phase's queues are empty, and there are callbacks in the timer phase's queue ready, the event loop will go back to the timer phase in order to accomplish a more precise execution of the setTimeout method.
- \paragraph{Check}
- The check phase contains the higher priority callbacks. If there is a situation where the poll phase has no callbacks ready, and timer and check phases both have ready callbacks, the event loop will prioritize the callbacks from the check queue.
- \paragraph{Close}
- In this phase, the event loop will handle the callbacks of abruptly closed sockets or streams. If the stream closes normally, the callback will be executed via the nextTick method.
- The nextTick method allows the user to bypass the event loop. It executes the callback given to it at the end of the currently executed operation\footnote{In this case an operation is defined as a transition between the JavaScript and V8 engine's native code.}.
- \subsubsection{Single-threaded pattern}
- Unlike most other server side technologies, a Node.js program is single-threaded. This is made possible by using the event loop in combination with asynchronous I/O operations. This frees up the processor more than Node.js's multi-threaded alternatives.
- \section{Performance comparison}
- In this part we will go into detail about differences in
- technologies that affect performance and analyze concrete
- results in different environments. The technologies against which Node.js will be compared are Python-web and PHP\cite{performance:lei} in the first part, and Apache and EventMachine, an evented Ruby web server\cite{performance:mccune} in the second part of this section.
- \subsection{Reasons behind the differences}
- The main reasons for the differences in performance are that Node.js uses asynchronous I/O function calls and that Node.js is a single-threaded web technology, unlike most of the popular alternatives.
- \subsubsection{Single-threaded versus Multi-threaded client serving}
- In this subsection we will go over how the server handles client requests depending on the fact whether it is single-threaded or multi-threaded and how it affects server performance.
- \paragraph{Single-threaded}
- The servers main thread has to serve each client. But that same thread also has to listen for incoming requests from other clients and put them in a queue. Because of this, if there are many requests coming to the server, a client can wait for a long time before the server is available. Especially problematic are the requests that take a long time to finish, because the server is unavailable to other clients. The server has to find a way to get around these issues and be fair to all of it's clients.
- \paragraph{Multi-threaded}
- In this case, the server's main thread's only duty is to listen to incoming requests from the clients. Once the request comes, the server spawns a new thread to take care of it. Like this, multiple clients can be served by the server at the same time. The problem that comes with this approach is that spawning and managing threads is costly for the processor and therefore has a negative effect on the performance. Other than that, another issue is that there is a limited number of threads that can run efficiently at the same time. Therefore, if there are too many clients, a multi-threaded server will not be much faster than a single-threaded one.
- \subsubsection{Synchronous versus Asynchronous I/O operations}
- In this subsection we will go over how the server handles I/O operations depending on whether the technology is synchronous or asynchronous and what effect that has on server performance.
- \begin{figure}[ht]
- \centering
- \includegraphics[width=0.9\linewidth]{synchronous_versus_asynchronous}
- \caption{Synchronous versus asynchronous programming}
- \label{fig:synchronousversusasynchronous}
- \end{figure}
- \paragraph{Synchronous}
- In synchronous handling of I/O operations, the thread that serves the client gets blocked until the I/O operation finishes. The issue is that during that time, the server thread can not be used for anything else\ref{fig:synchronousversusasynchronous}. The processor can switch to another thread(if the server is multi-threaded), but the transition also requires some time. This can also be problematic because most requests include some I/O operations.
- \paragraph{Asynchronous}
- When it comes to asynchronous I/O operations, the calling thread will not wait for the I/O operation to finish\ref{fig:synchronousversusasynchronous}, but rather execute other operations that are not dependent on the I/O function finishing. This can have a positive effect on the server performance.
- Node.js combines the single-threaded approach with asynchronous I/O function calls. By doing this, it maximizes efficiency in serving a large number of clients. It is especially good if the requests are data intensive, but it has drawbacks when the requests are computationally heavy.
- \subsection{Node.js against Python-web and PHP}
- In this section, we will analyze how Node.js compares to Python-web and PHP. This section will heavily rely on experiments performed and described in a related work\cite{performance:lei}. The experiments go over a couple of different server benchmark tests. it simulates 10000 requests from each client, and the number of clients change between 10, 100, 200, 500, and 1000. The first experiment will be a regular stress test, the second one will be a computational intensive test and the third one will be an I/O intensive test.
- \subsubsection{Regular stress test}
- In this test clients send requests, and the server responds only with a "Hello world" string. This is neither I/O intensive nor computational intensive, but it tests how well the server runtime handles a large number of requests. Figures \ref{fig:resultsstress1} and \ref{fig:resultsstress2} show the results of the test. Figure \ref{fig:resultsstress1} shows how many requests per second the server can handle depending on the number of users that are sending these requests. A trending can be seen that each server's performance improves with the increasing number of users, up until some point, after which it decreases. The results show that Node.js can handle the largest number of requests out of the three technologies used. It also does not lose it's performance as drastically as PHP when the number of users increases. Figure \ref{fig:resultsstress2} shows how much time it takes the server to respond to user requests. It can be noticed that Node.js outperforms its alternatives in this regard too. Once again, PHP's performance decreases rapidly with the increasing number of users. Python-web is fine in this aspect, but it is still lacking compared to Node.js. The conclusion here is that Node.js handles the regular stress test the best.
- \begin{figure}[ht]
- \centering
- \includegraphics[width=0.9\linewidth]{results1}
- \caption{Results of the regular stress test, mean requests per second in relation to client count\cite{performance:lei}}
- \label{fig:resultsstress1}
- \end{figure}
- \begin{figure}[ht]
- \centering
- \includegraphics[width=0.9\linewidth]{results2}
- \caption{Results of the regular stress test, time needed for server to respond in relation to client coun\cite{performance:lei}t}
- \label{fig:resultsstress2}
- \end{figure}
- \subsubsection{CPU intensive test}
- In this test clients send requests, and the server has to calculate the tenth number of the Fibonnaci Sequence and return it as the result. This request is computationally heavy, since the server has to do a lot of calculating all over again for each request. Figures \ref{fig:resultscpu1} and \ref{fig:resultscpu2} show the results of the test. Figure \ref{fig:resultscpu1} shows how many requests per second the server can handle depending on the number of users that are sending these requests. Figure \ref{fig:resultscpu2} shows how much time it takes the server to respond to user requests. The results shown are very similar to the ones from the regular stress test, but with some differences. Once again, Node.js is better than the other two when the number of users is over 200. But at a lower number of users, PHP outperforms Node.js in terms of both of the criteria. There have also been tests for the twentieth and thirtieth Fibonnaci number, in order to further explore this type of test. The results show that each technology falls off drastically, as the Fibonnaci
- \begin{figure}[ht]
- \centering
- \includegraphics[width=0.9\linewidth]{results3}
- \caption{Results of the CPU intesive test, mean requests per second in relation to client count\cite{performance:lei}}
- \label{fig:resultscpu1}
- \end{figure}
- \begin{figure}[ht]
- \centering
- \includegraphics[width=0.9\linewidth]{results4}
- \caption{Results of the regular stress test, time needed for server to respond in relation to client count\cite{performance:lei}}
- \label{fig:resultscpu2}
- \end{figure}
- \subsubsection{Static contents delivery test}
- \subsubsection{IO intensive test}
- \section{Scalability comparison}
- In this part we will go into detail about differences in
- technologies that affect scalability and describe the key features
- of Node that make it easily scalable.
- \subsection{Reasons behind the differences}
- \subsection{“Horizontal scaling” on a single machine}
- \subsection{Node clustering}
- \subsection{NoSQL databases and eventual consistency}
- \section{Drawback of using node.js}
- In this part we will go into detail about differences in
- technologies that affect server security, code readability and
- reusability etc.
- \subsection{Single-threaded pattern flaws}
- \subsection{Why Node is not used in enterprise}
- \subsection{Security flaws caused by performance}
- \subsection{Synchronization problems because of eventual consistency}
- \section{Results and discussions}
- \section{Conclusion}
- \begin{thebibliography}{1}
- \bibitem{node_basic:tilkov}
- Tilkov, S., \& Vinoski, S. (2010). Node. js: Using JavaScript to build high-performance network programs. IEEE Internet Computing, 14(6), 80-83.\\
- This paper serves as a good starting point to get introduced to Node.js. It goes over the basics of how Node works and the pros and cons of event driven programming.
- \bibitem{performance:lei}
- Lei, K., Ma, Y., \& Tan, Z. (2014, December). Performance comparison and evaluation of web development technologies in php, python, and node. js. In 2014 IEEE 17th international conference on computational science and engineering (pp. 661-668). IEEE.\\
- This paper goes deeply into performance analysis and comparison between Node.js and two other popular backend technologies. It graphically presents the results gathered in different tests performed over those platforms and it is a great head start for research.
- \bibitem{security:ojamaa}
- Ojamaa, A., \& Düüna, K. (2012, December). Assessing the security of Node. js platform. In 2012 International Conference for Internet Technology and Secured Transactions (pp. 348-355). IEEE.
- This paper goes over security pitfalls of the Node.js platform. It contains an explanation of Node.js advantages too, but it is mainly about the many flaws that come with using a frontend language and a technology that does not emphasize security to write server logic. It also gives two ways to cause denial of service in Node.js servers that have been undocumented before.
- \bibitem{presentation:dahl}
- Dahl, R., (2009, November 8) node.js\\Retrieved from\\ \url{https://www.slideshare.net/AartiParikh/original-slides-from-ryan-dahls-nodejs-intro-talk}\\
- This is the original presentation on node.js given by its creator Ryan Dahl.
- \bibitem{npm}
- Npm. (2010). Retrieved from \url{https://www.npmjs.com/}
- This is the official site for the node package manager, npm.
- \bibitem{eventloop:nodejs}
- Node js documentation. Retrieved from \url{https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/}
- This is the official node js documentation.
- \bibitem{performance:mccune} McCune, R. R. (2011). Node. js paradigms and benchmarks. Striegel, Grad Os F, 11, 86.
- In this paper, Node.js is compared to Apache and EventMachine web technologies in terms of performance.
- \end{thebibliography}
- % that's all folks
- \end{document}
- % An example of a floating figure using the graphicx package.
- % Note that \label must occur AFTER (or within) \caption.
- % For figures, \caption should occur after the \includegraphics.
- % Note that IEEEtran v1.7 and later has special internal code that
- % is designed to preserve the operation of \label within \caption
- % even when the captionsoff option is in effect. However, because
- % of issues like this, it may be the safest practice to put all your
- % \label just after \caption rather than within \caption{}.
- %
- % Reminder: the "draftcls" or "draftclsnofoot", not "draft", class
- % option should be used if it is desired that the figures are to be
- % displayed while in draft mode.
- %
- %\begin{figure}[!t]
- %\centering
- %\includegraphics[width=2.5in]{myfigure}
- % where an .eps filename suffix will be assumed under latex,
- % and a .pdf suffix will be assumed for pdflatex; or what has been declared
- % via \DeclareGraphicsExtensions.
- %\caption{Simulation results for the network.}
- %\label{fig_sim}
- %\end{figure}
- % Note that the IEEE typically puts floats only at the top, even when this
- % results in a large percentage of a column being occupied by floats.
- % An example of a double column floating figure using two subfigures.
- % (The subfig.sty package must be loaded for this to work.)
- % The subfigure \label commands are set within each subfloat command,
- % and the \label for the overall figure must come after \caption.
- % \hfil is used as a separator to get equal spacing.
- % Watch out that the combined width of all the subfigures on a
- % line do not exceed the text width or a line break will occur.
- %
- %\begin{figure*}[!t]
- %\centering
- %\subfloat[Case I]{\includegraphics[width=2.5in]{box}%
- %\label{fig_first_case}}
- %\hfil
- %\subfloat[Case II]{\includegraphics[width=2.5in]{box}%
- %\label{fig_second_case}}
- %\caption{Simulation results for the network.}
- %\label{fig_sim}
- %\end{figure*}
- %
- % Note that often IEEE papers with subfigures do not employ subfigure
- % captions (using the optional argument to \subfloat[]), but instead will
- % reference/describe all of them (a), (b), etc., within the main caption.
- % Be aware that for subfig.sty to generate the (a), (b), etc., subfigure
- % labels, the optional argument to \subfloat must be present. If a
- % subcaption is not desired, just leave its contents blank,
- % e.g., \subfloat[].
- % An example of a floating table. Note that, for IEEE style tables, the
- % \caption command should come BEFORE the table and, given that table
- % captions serve much like titles, are usually capitalized except for words
- % such as a, an, and, as, at, but, by, for, in, nor, of, on, or, the, to
- % and up, which are usually not capitalized unless they are the first or
- % last word of the caption. Table text will default to \footnotesize as
- % the IEEE normally uses this smaller font for tables.
- % The \label must come after \caption as always.
- %
- %\begin{table}[!t]
- %% increase table row spacing, adjust to taste
- %\renewcommand{\arraystretch}{1.3}
- % if using array.sty, it might be a good idea to tweak the value of
- % \extrarowheight as needed to properly center the text within the cells
- %\caption{An Example of a Table}
- %\label{table_example}
- %\centering
- %% Some packages, such as MDW tools, offer better commands for making tables
- %% than the plain LaTeX2e tabular which is used here.
- %\begin{tabular}{|c||c|}
- %\hline
- %One & Two\\
- %\hline
- %Three & Four\\
- %\hline
- %\end{tabular}
- %\end{table}
- % Note that the IEEE does not put floats in the very first column
- % - or typically anywhere on the first page for that matter. Also,
- % in-text middle ("here") positioning is typically not used, but it
- % is allowed and encouraged for Computer Society conferences (but
- % not Computer Society journals). Most IEEE journals/conferences use
- % top floats exclusively.
- % Note that, LaTeX2e, unlike IEEE journals/conferences, places
- % footnotes above bottom floats. This can be corrected via the
- % \fnbelowfloat command of the stfloats package.
- % conference papers do not normally have an appendix
- % use section* for acknowledgment
- % trigger a \newpage just before the given reference
- % number - used to balance the columns on the last page
- % adjust value as needed - may need to be readjusted if
- % the document is modified later
- %\IEEEtriggeratref{8}
- % The "triggered" command can be changed if desired:
- %\IEEEtriggercmd{\enlargethispage{-5in}}
- % references section
- % can use a bibliography generated by BibTeX as a .bbl file
- % BibTeX documentation can be easily obtained at:
- % http://mirror.ctan.org/biblio/bibtex/contrib/doc/
- % The IEEEtran BibTeX style support page is at:
- % http://www.michaelshell.org/tex/ieeetran/bibtex/
- %\bibliographystyle{IEEEtran}
- % argument is your BibTeX string definitions and bibliography database(s)
- %\bibliography{IEEEabrv,../bib/paper}
- %
- % <OR> manually copy in the resultant .bbl file
- % set second argument of \begin to the number of references
- % (used to reserve space for the reference number labels box)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement