Software Training Report ON Mean Stack: Computer Science & Engineering
Software Training Report ON Mean Stack: Computer Science & Engineering
Software Training Report ON Mean Stack: Computer Science & Engineering
ON
MEAN STACK
for MAJOR PROJECT
BACHELOR OF TECHNOLOGY
Computer Science & Engineering
SUBMITTED BY:
02 ANGULAR JS 04-06
03 NODE JS 07-09
04 EXPRESS JS 10-12
05 MONGO DB 13-15
MongoDB offers a more flexible, accommodating layer for storing data. Node.js
provides a better nexus for running your server, while Express.js helps standardize
how you build your websites.
On the client, AngularJS provides a clean way of adding interactive functions and
AJAX-driven rich components. Put them all together and they make a clean,
coherent mechanism for moving data from user to disk farm and back again.
Features of MEAN Stack
One of the most important benefits of all is that it lets the developer write
the entire code in JavaScript; from client to server.
This is like a blessing for the JavaScript developers who have invested
their time and money in learning JavaScript for the client-side tasks.
It supports the MVC (Model View Controller) architecture.
The MEAN components are open source; which MEANs the stack gets
updated regularly. In addition to it, it is easy and flexible to understand and
use which helps the developers to customize as per your needs.
Other advantages are the huge module library of node.js and the use
of JSON is to transfer the data.
Not a just startup, big players also move to Node.js: Wal-Mart,
PayPal, Yahoo, Netflix, Uber, LinkedIn.
MEAN is a free and open-source JavaScript software stack for building dynamic
websites and web applications. MEAN is very simple and easy to use for both
back end and front end in other technologies there are different languages used for
front and back end but in written in one language for both server-side and client-
side execution. Working of MEAN Stack is explained below in the figure properly.
Fig.1 MEAN Stack Architecture
Fig:-AngularJS Architecture
1) Model
2) View
3) Controller
2) Very Fast
Being built on Google Chrome’s V8 JavaScript Engine, Node.js library is
very fast in code execution.
Threading
Architecture Description
Here “n” number of Clients Send request to Web Server. Let us assume they
are accessing our Web Application concurrently.
Let us assume, our Clients Are Client-1, Client-2… and Client-n.
Web Server internally maintains a Limited Thread pool. Let us assume “m”
number of Threads in Thread pool.
Web Server receives those requests one by one.
o Web Server pickup Client-1 Request-1, Pickup one Thread T-1 from Thread
pool and assign this request to Thread T-1
Thread T-1 reads Client-1 Request-1 and process it
Client-1 Request-1 does not require any Blocking IO Operations
Thread T-1 does necessary steps and prepares Response-1 and send it
back to the Server
Web Server in-turn send this Response-1 to the Client-1
o Web Server pickup another Client-2 Request-2, Pickup one Thread T-2 from
Thread pool and assign this request to Thread T-2
Thread T-2 reads Client-1 Request-2 and process it
Client-1 Request-2 does not require any Blocking IO Operations
Thread T-2 does necessary steps and prepares Response-2 and send it
back to the Server
Web Server in-turn send this Response-2 to the Client-2
o Web Server pickups another Client-n Request-n, Pickup one Thread T-n
from Thread pool and assign this request to Thread T-n
Thread T-n reads Client-n Request-n and process it
Client-n Request-n require heavy Blocking IO and computation
Operations
Thread T-n takes more time to interact with external systems, does
necessary steps and prepares Response-n and send it back to the
Server
Web Server in-turn send this Response-n to the Client-n
If “n” is greater than “m” (Most of the times, its true), then server assigns Threads
to Client Requests up to available Threads. After all m Threads are utilized, then
remaining Client’s Request should wait in the Queue until some of the busy
Threads finish their Request-Processing Job and free to pick up next Request. If
those threads are busy with Blocking IO Tasks (For example, interacting with
Database, file system, JMS Queue, external services etc.) for a longer time, then
remaining clients should wait a longer time.
Once Threads are free in Thread Pool and available for next tasks, Server
pickup those threads and assign them to remaining Client Requests.
Each Thread utilizes many resources like memory etc. So before going those
Threads from the busy state to waiting for state, they should release all
acquired resources.
CHAPTER-4
ExpressJs
Express provides a minimal interface for us to build our applications. It is
minimal, providing us the absolutely required tools to build our app and flexible,
there are numerous modules available on npm for express, which can be directly
plugged into express.
Unlike its competitors like Rails and Django, which have an opinionated way of
building applications, express has no “best way” do something. It is very
flexible and pluggable.
When the user sends a request to through AngularJS then that request is firstly
accessed by the NodeJS threading is done in the NodeJS and then it is sent to the
ExpressJS to Create, Read, Update and Delete the API for the Request. ExpressJs
host the website for the NodeJS. Both NodeJS and ExpressJS are server side
languages. After CURD the API data is retrieved from the MongoDB ad then send
it to the User.
MongoDB
MongoDB’s document data model makes it easy for you to store and
combine data of any structure, without giving up sophisticated
validation rules, data access and rich indexing functionality.
3) Multi-Datacenter Scalability
5) Lower TCO
2) Strong consistency.
Applications should be able to immediately read what has been written
to the database. It is much more complex to build applications around an
eventually consistent model, imposing significant work on the developer,
even for the most sophisticated engineering teams.
Databases are just one piece of application infrastructure and need to fit
seamlessly into the enterprise IT stack. Organizations need a database
that can be secured, monitored, automated, and integrated with their
existing technology infrastructure, processes and staff, including
operations teams, DBAs, and data analysts.
Features of MongoDB
In MongoDB, data represents in a collection of JSON documents.
MongoDB’s querying is object-oriented, which MEANs you can pass
MongoDB a document explaining what you are querying. MongoDB
doesn’t support joints, it supports multi-dimensional data types like other
documents and arrays.
MongoDB, you will only have one array of comments and one
collection of posts within a post
One of the best things about MongoDB is that you are not responsible
for defining the schema
CHAPTER-6
INSTALLATION OF SOFTWARE:-
1. Setting Environment for node.Js
2. Setting Environment for MongoDb
3. Setting Environment for robo -3t
4. Setting Environment for visual basic code
Click on “Next” Button. Accept License Agreement and Click on “Next” Button
4. Choose your required location to install
9. Check Node JS Version: Use the following command to know your Node JS
Version from Command prompt.
10.Exit from Node CLI: We can use “process.exit()” command to exit from Node
CLI.