Java & Node.js


The execution of a Java program is explained in the picture above.

The Web Application Architecture

For Micro service architecture use : Spring Boot.

The Presentation layer MVC pattern for request and response handling. Frameworks like Spring MVC .

The Service or Business layer is responsible for having business logic and communicates with the other layers.

The Data layer : ORM frameworks(Hibernate), or any JDBC-based libraries/templates (Spring JDBC Template) to communicate with any RDBMS Database.

This particular stack is called Fullstack.

The Deployment Architecture

Java web application deployment architecture : Apache HTTP server(acts as a proxy server as well as serving static content).

Dynamic content is served by a web container(Like Tomcat, Jboss, Jetty server etc..).

Deployment diagram of J2EE based application

Node.js Runtime Environment

Node.js is not a language/not a framework/not a tool. Run time environment for running JavaScript-based applications.

Node.js has a virtual machine called JavaScript Virtual Machine (JsVM). It generates machine code for JavaScript-based applications to enable it on different platforms.

The JavaScript Virtual Machine is nothing but the V8, the open source JavaScript engine from Google. Like the Java Virtual Machine, the JsVM (V8 engine) also has main components like JIT and GC for performing tasks, runtime compilation, and memory management respectively.

The source code is written in JavaScript (.js). There is no intermediate code generated before giving it to JsVM, the V8 engine. The JsVM takes this source code directly and compiles it to machine code specific to the given target platform for execution.

Execution of Node.js explained in the below diagram.

Node.js Web Application Architecture

A Node.js based web application mostly follows the Java web application architecture.

The main difference is in the client request processing : The client requests will be handled by a single thread, but asynchronously in the case of a Node.js application. With Java, each client request will be handled by a separate thread synchronously, and hence it is multi-threaded.

Different layers and the framework/libraries used in Node.js application.


The Client layer : Angular.js (client-side MVC framework).

The Presentation layer, Service layer : Express.js (JavaScript-based web application framework.)

The Data layer : Object Data Modelling module (e.g. Mongoose.js) for communicating with NoSQL databases like MongoDB. 

This particular stack is called MEAN : MongoDB, Express.js, Angular.js and Node.js (runtime environment).

The Deployment Architecture

Node.js-based web application deployment architecture follows Java's web application deployment architecture.

NGINX server : HTTP proxy server, as well as serves the static content.

Dynamic content is served by a Node.js server, which contains an engine to process the JavaScript files.

Diagram explains the Node.js based web application's deployment architecture.


Sahir K

Healthcare IT Entrepreneur | Innovator & Consultant | Digitization using AI | Startup Mentor

8 年

Uday, you are great. Thanks a lot for article

回复

要查看或添加评论,请登录

Uday Sankar G的更多文章

  • BACKEND DEVELOPER ROADMAP

    BACKEND DEVELOPER ROADMAP

    This diagram will help us to understand what all are the required skills and languages to become a back end developer.

    1 条评论
  • DEVOPS Road Map for Developers

    DEVOPS Road Map for Developers

    1) Learn a Programming Language. Java, Python, or JavaScript.

  • Reactive Programming Paradigm

    Reactive Programming Paradigm

    Programming Approaches What is a Reactive Programming? Languages that supports RX Sample Program Compare plain JS and…

  • Containers Docker vs. Kubernetes vs. Apache Mesos

    Containers Docker vs. Kubernetes vs. Apache Mesos

    What is a container? 1)Package software into standardized units for development, shipment and deployment. 2)Container…

  • BLOCKCHAIN PRINCIPLE

    BLOCKCHAIN PRINCIPLE

    BLOCKCHAIN Blockchain Principle Proof of Work Mining Principle BLOCK MINING ALGORITHM Merkle Tree Merkle Tree…

    1 条评论
  • BLOCKCHAIN

    BLOCKCHAIN

    Bitcoin A Peer-to-Peer Electronic Cash System Founded by Satoshi Nakamoto in 2008 A purely peer-to-peer version of…

  • DevOps

    DevOps

    What Is DevOps? DevOps is the combination of cultural philosophies, practices, and tools that increases an…

  • Deep Learning Frameworks And Tensor Flow

    Deep Learning Frameworks And Tensor Flow

    Different Machine Learning Tools Tensor Flow How to program in Python. At least a little bit about arrays.

    2 条评论
  • Deep Learning and Neural Networks

    Deep Learning and Neural Networks

    AI vs Deep Learning vs Machine Learning. Artificial intelligence is the future.

  • Angular VS React

    Angular VS React

    Comparison of React vs AngularJS is most popular topic. Both are advanced, widely adopted JavaScript (JS) technologies…

社区洞察

其他会员也浏览了