SlideShare ist ein Scribd-Unternehmen logo
1 von 21
Multipurpose Application Server for Node.JS
All decisions are made. Solutions are scaled
Tools are provided and optimized for high load
Ready for applied development and production
Scaling
Scaling
Filesystem Structure
URL Routing
Configuration
API Development
Templating
Static Resources
Events (SSE)
DB Access
Plugins

1

Multiple applications
• at single server
• at single node.js process
• at single tcp/ip port
• at one domain (different path)
One application
• multiple processes at single server
• multiple processes at multiple servers
• at multiple domains (virtualhosts)
• at multiple network interfaces
• at multiple ports
• over multiple protocols
Scaling
Scaling
Filesystem Structure
URL Routing
Configuration
API Development
Templating
Static Resources
Events (SSE)
DB Access
Plugins

2

Deployment strategies:
• All in one process (for development):
cluster.strategy: "single"
• Separate process for each host/port pair:
cluster.strategy: "specialization"
• Single server cluster, master + multiple workers
cluster: { strategy: "multiple", workers: N }
• Single server cluster with IP-sticky
cluster.strategy: "sticky"
• Multiple servers with multiple workers on each:
strategy: "specialization", + nginx
provides balancing and sticky
• Applied cloud: hardware balancer,
multiple servers with multiple workers,
strategy: "multiple", ØMQ, impress controller
Scaling
Load Balancer

Scaling
Filesystem Structure
URL Routing
Configuration
API Development
Templating
Static Resources
Events (SSE)
DB Access
Plugins

Impress
Application
Server

HTTP

С2

С1

С3

IPC

C1N1

C1N2

C1N3

C2N1

C2N2

C2N3

C3N1

ØMQ
pub/sub + req/rep

3

С0

Impress Cloud Controller

C3N2
Filesystem Structure
Installation:
npm install impress
After that we have:
Scaling
Filesystem Structure
URL Routing
Configuration
API Development
Templating
Static Resources
Events (SSE)
DB Access
Plugins

4

Processing steps:
• access.js
• request.js
• get.js, post.js...
• html.template
URL Routing
Scaling
Filesystem Structure
URL Routing
Configuration
API Development
Templating
Static Resources
Events (SSE)
DB Access
Plugins

5

Features:
• folders are URL-handlers
• handlers and templates inheritance/overriding
• handlers by result type (html, json, csv, xml…)
• serving handlers and templates from memory
• filesystem monitoring and cache refreshing
• files changes consolidation
• multiple handler instances in memory
• URL-rewriting (using regular expressions)
• routing and reverse-proxy
Configuration
Scaling
Filesystem Structure
URL Routing
Configuration
API Development
Templating
Static Resources
Events (SSE)
DB Access
Plugins

6

• file: config.js
• file system monitoring
• config.js soft reloading
• configuration preprocessing
Configuration
Scaling
Filesystem Structure
URL Routing
Configuration
API Development
Templating
Static Resources
Events (SSE)
DB Access
Plugins

7
Configuration
Scaling
Filesystem Structure
URL Routing
Configuration
API Development
Templating
Static Resources
Events (SSE)
DB Access
Plugins

8
API Development
Scaling
Filesystem Structure
URL Routing
Configuration
API Development
Templating
Static Resources
Events (SSE)
DB Access
Plugins

9
API Development
Scaling
Filesystem Structure
URL Routing
Configuration
API Development
Templating
Static Resources
Events (SSE)
DB Access
Plugins

10

• RPC API (Stateful, state will store in RAM
between request/response pairs)
• REST API (Stateless, each request/responce
is independent, order is not important,
state is not stored in RAM)
State classification:
• system global state
• session (or connection) state
• user state
• data-object (subject domain) state
API Development
Scaling
Filesystem Structure
URL Routing
Configuration
API Development
Templating
Static Resources
Events (SSE)
DB Access
Plugins

11
Templating
Scaling
Filesystem Structure
URL Routing
Configuration
API Development
Templating
Static Resources
Events (SSE)
DB Access
Plugins

12
Templating
Scaling
Filesystem Structure
URL Routing
Configuration
API Development
Templating
Static Resources
Events (SSE)
DB Access
Plugins

13
Static Resources
Scaling
Filesystem Structure
URL Routing
Configuration
API Development
Templating
Static Resources
Events (SSE)
DB Access
Plugins

14

• Serves static files directly from RAM
(memory cache)
• File system monitoring and cache refreshing
when file changes
• Cache garbage collection (multiple file buffers)
removes items when deleting files or folders
• Gzip compresion (except small files)
storing gzipped files in RAM
• Implemented HTTP if-modified-since
and HTTP error 304 (Not modified)
• Client JavaScript minification
(using plugin "uglify-js")
Events (SSE)
Client1
Scaling
Filesystem Structure
URL Routing
Configuration
API Development
Templating
Static Resources
Events (SSE)
DB Access
Plugins

15

Client2

Client3

С1
IPC

C1N1

C1N2

C1N3

…

ClientN
Events (SSE)
Client1
Scaling
Filesystem Structure
URL Routing
Configuration
API Development
Templating
Static Resources
Events (SSE)
DB Access
Plugins

Client2

Client3

…

ClientN

HTTP/SSE

С2

С1

С3

IPC

C1N1

C1N2

C1N3

C2N1

C2N2

C2N3

C3N1

ØMQ
pub/sub + req/rep

16

С0

Impress Cloud Controller

C3N2
DB Access
Scaling
Filesystem Structure
URL Routing
Configuration
API Development
Templating
Static Resources
Events (SSE)
DB Access
Plugins

17

• Database drivers are plugins /lib/db.*.js
• Utilities for SQL-compatible DBMS
• Database schema compilation from JSON
• DBMI Web-interface for database management
• MongoDB
• MySQL
DB Access / DBMI
Scaling
Filesystem Structure
URL Routing
Configuration
API Development
Templating
Static Resources
Events (SSE)
DB Access
Plugins

18
Plugins
Scaling
Filesystem Structure
URL Routing
Configuration
API Development
Templating
Static Resources
Events (SSE)
DB Access
Plugins

19

• mail plugin (using nodemailer, multiparty)
• geoip plugin (using geoip-lite, optional installation)
• CMS plugin (in development)
• authentication, authorisation and accounting plugin
• npm plugin (optional installation)
Contacts and links
Scaling
Filesystem Structure
URL Routing
Configuration
API Development
Templating
Static Resources
Events (SSE)
DB Access
Plugins

20

https://npmjs.org/package/impress
https://github.com/tshemsedinov/impress
http://blog.aumcode.com
http://bit.ly/1cSdTF3 (NFX, AUM, UNISTACK)

mailto:timur.shemsedinov@gmail.com
skype:timur.shemsedinov
npm install impress

Weitere ähnliche Inhalte

Was ist angesagt?

What I learned from FluentConf and then some
What I learned from FluentConf and then someWhat I learned from FluentConf and then some
What I learned from FluentConf and then some
Ohad Kravchick
 

Was ist angesagt? (20)

https://docs.google.com/presentation/d/1DcL4zK6i3HZRDD4xTGX1VpSOwyu2xBeWLT6a_...
https://docs.google.com/presentation/d/1DcL4zK6i3HZRDD4xTGX1VpSOwyu2xBeWLT6a_...https://docs.google.com/presentation/d/1DcL4zK6i3HZRDD4xTGX1VpSOwyu2xBeWLT6a_...
https://docs.google.com/presentation/d/1DcL4zK6i3HZRDD4xTGX1VpSOwyu2xBeWLT6a_...
 
Threads Needles Stacks Heaps - Java edition
Threads Needles Stacks Heaps - Java editionThreads Needles Stacks Heaps - Java edition
Threads Needles Stacks Heaps - Java edition
 
Beyond the Basics 4: How to secure your MongoDB database
Beyond the Basics 4: How to secure your MongoDB databaseBeyond the Basics 4: How to secure your MongoDB database
Beyond the Basics 4: How to secure your MongoDB database
 
Cosmos db
Cosmos dbCosmos db
Cosmos db
 
Kubernetes #3 security
Kubernetes #3   securityKubernetes #3   security
Kubernetes #3 security
 
Node.js Workshop - Sela SDP 2015
Node.js Workshop  - Sela SDP 2015Node.js Workshop  - Sela SDP 2015
Node.js Workshop - Sela SDP 2015
 
Transitioning From SQL Server to MySQL - Presentation from Percona Live 2016
Transitioning From SQL Server to MySQL - Presentation from Percona Live 2016Transitioning From SQL Server to MySQL - Presentation from Percona Live 2016
Transitioning From SQL Server to MySQL - Presentation from Percona Live 2016
 
Securing Your MongoDB Implementation
Securing Your MongoDB ImplementationSecuring Your MongoDB Implementation
Securing Your MongoDB Implementation
 
Sphinx at Craigslist in 2012
Sphinx at Craigslist in 2012Sphinx at Craigslist in 2012
Sphinx at Craigslist in 2012
 
Node JS | Dilkash Shaikh Mahajan
Node JS | Dilkash Shaikh MahajanNode JS | Dilkash Shaikh Mahajan
Node JS | Dilkash Shaikh Mahajan
 
Data Processing and Ruby in the World
Data Processing and Ruby in the WorldData Processing and Ruby in the World
Data Processing and Ruby in the World
 
Microsoft Azure DocumentDB - Global Azure Bootcamp 2016
Microsoft Azure DocumentDB -  Global Azure Bootcamp 2016Microsoft Azure DocumentDB -  Global Azure Bootcamp 2016
Microsoft Azure DocumentDB - Global Azure Bootcamp 2016
 
What I learned from FluentConf and then some
What I learned from FluentConf and then someWhat I learned from FluentConf and then some
What I learned from FluentConf and then some
 
Living with SQL and NoSQL at craigslist, a Pragmatic Approach
Living with SQL and NoSQL at craigslist, a Pragmatic ApproachLiving with SQL and NoSQL at craigslist, a Pragmatic Approach
Living with SQL and NoSQL at craigslist, a Pragmatic Approach
 
Realtime Search Infrastructure at Craigslist (OpenWest 2014)
Realtime Search Infrastructure at Craigslist (OpenWest 2014)Realtime Search Infrastructure at Craigslist (OpenWest 2014)
Realtime Search Infrastructure at Craigslist (OpenWest 2014)
 
CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)
CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)
CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)
 
What's New In Rails 4.2
What's New In Rails 4.2What's New In Rails 4.2
What's New In Rails 4.2
 
Javascript on Server-Side
Javascript on Server-SideJavascript on Server-Side
Javascript on Server-Side
 
2011-12-13 NoSQL aus der Praxis
2011-12-13 NoSQL aus der Praxis2011-12-13 NoSQL aus der Praxis
2011-12-13 NoSQL aus der Praxis
 
WSO2 Microservices Framework for Java - Product Overview
WSO2 Microservices Framework for Java - Product OverviewWSO2 Microservices Framework for Java - Product Overview
WSO2 Microservices Framework for Java - Product Overview
 

Ähnlich wie Impress Application Server for node.js (en)

CTU June 2011 - Things that Every ASP.NET Developer Should Know
CTU June 2011 - Things that Every ASP.NET Developer Should KnowCTU June 2011 - Things that Every ASP.NET Developer Should Know
CTU June 2011 - Things that Every ASP.NET Developer Should Know
Spiffy
 

Ähnlich wie Impress Application Server for node.js (en) (20)

Experience sql server on l inux and docker
Experience sql server on l inux and dockerExperience sql server on l inux and docker
Experience sql server on l inux and docker
 
Self-Service Data Ingestion Using NiFi, StreamSets & Kafka
Self-Service Data Ingestion Using NiFi, StreamSets & KafkaSelf-Service Data Ingestion Using NiFi, StreamSets & Kafka
Self-Service Data Ingestion Using NiFi, StreamSets & Kafka
 
Architecture of a Next-Generation Parallel File System
Architecture of a Next-Generation Parallel File System	Architecture of a Next-Generation Parallel File System
Architecture of a Next-Generation Parallel File System
 
Serverless Data Platform
Serverless Data PlatformServerless Data Platform
Serverless Data Platform
 
Sun Web Server Brief
Sun Web Server BriefSun Web Server Brief
Sun Web Server Brief
 
What’s new in WSO2 Enterprise Integrator 6.6
What’s new in WSO2 Enterprise Integrator 6.6What’s new in WSO2 Enterprise Integrator 6.6
What’s new in WSO2 Enterprise Integrator 6.6
 
Introduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureIntroduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azure
 
Learning ASP.NET 5 and MVC 6
Learning ASP.NET 5 and MVC 6Learning ASP.NET 5 and MVC 6
Learning ASP.NET 5 and MVC 6
 
Coherence RoadMap 2018
Coherence RoadMap 2018Coherence RoadMap 2018
Coherence RoadMap 2018
 
VMworld 2013: Architecting VMware Horizon Workspace for Scale and Performance
VMworld 2013: Architecting VMware Horizon Workspace for Scale and PerformanceVMworld 2013: Architecting VMware Horizon Workspace for Scale and Performance
VMworld 2013: Architecting VMware Horizon Workspace for Scale and Performance
 
Building Highly Scalable Java Applications on Windows Azure - JavaOne S313978
Building Highly Scalable Java Applications on Windows Azure - JavaOne S313978Building Highly Scalable Java Applications on Windows Azure - JavaOne S313978
Building Highly Scalable Java Applications on Windows Azure - JavaOne S313978
 
An Azure of Things, a developer’s perspective
An Azure of Things, a developer’s perspectiveAn Azure of Things, a developer’s perspective
An Azure of Things, a developer’s perspective
 
Serverless Analytics with Amazon Redshift Spectrum, AWS Glue, and Amazon Quic...
Serverless Analytics with Amazon Redshift Spectrum, AWS Glue, and Amazon Quic...Serverless Analytics with Amazon Redshift Spectrum, AWS Glue, and Amazon Quic...
Serverless Analytics with Amazon Redshift Spectrum, AWS Glue, and Amazon Quic...
 
Using existing language skillsets to create large-scale, cloud-based analytics
Using existing language skillsets to create large-scale, cloud-based analyticsUsing existing language skillsets to create large-scale, cloud-based analytics
Using existing language skillsets to create large-scale, cloud-based analytics
 
Sun Web Server Brief
Sun Web Server BriefSun Web Server Brief
Sun Web Server Brief
 
Brk3288 sql server v.next with support on linux, windows and containers was...
Brk3288 sql server v.next with support on linux, windows and containers   was...Brk3288 sql server v.next with support on linux, windows and containers   was...
Brk3288 sql server v.next with support on linux, windows and containers was...
 
CTU June 2011 - Things that Every ASP.NET Developer Should Know
CTU June 2011 - Things that Every ASP.NET Developer Should KnowCTU June 2011 - Things that Every ASP.NET Developer Should Know
CTU June 2011 - Things that Every ASP.NET Developer Should Know
 
SQL on linux
SQL on linuxSQL on linux
SQL on linux
 
Unbreakable SharePoint 2013 with SQL Server Always On Availability Groups (HA...
Unbreakable SharePoint 2013 with SQL Server Always On Availability Groups (HA...Unbreakable SharePoint 2013 with SQL Server Always On Availability Groups (HA...
Unbreakable SharePoint 2013 with SQL Server Always On Availability Groups (HA...
 
Lecture 9: Dynamic web application
Lecture 9: Dynamic web applicationLecture 9: Dynamic web application
Lecture 9: Dynamic web application
 

Mehr von Timur Shemsedinov

Information system structure and architecture
Information system structure and architectureInformation system structure and architecture
Information system structure and architecture
Timur Shemsedinov
 
Node.js in 2020 - part 1
Node.js in 2020 - part 1Node.js in 2020 - part 1
Node.js in 2020 - part 1
Timur Shemsedinov
 

Mehr von Timur Shemsedinov (20)

How to use Chat GPT in JavaScript optimizations for Node.js
How to use Chat GPT in JavaScript optimizations for Node.jsHow to use Chat GPT in JavaScript optimizations for Node.js
How to use Chat GPT in JavaScript optimizations for Node.js
 
IT Revolution in 2023-2024: AI, GPT, business transformation, future professi...
IT Revolution in 2023-2024: AI, GPT, business transformation, future professi...IT Revolution in 2023-2024: AI, GPT, business transformation, future professi...
IT Revolution in 2023-2024: AI, GPT, business transformation, future professi...
 
Multithreading in Node.js and JavaScript
Multithreading in Node.js and JavaScriptMultithreading in Node.js and JavaScript
Multithreading in Node.js and JavaScript
 
Node.js threads for I/O-bound tasks
Node.js threads for I/O-bound tasksNode.js threads for I/O-bound tasks
Node.js threads for I/O-bound tasks
 
Node.js Меньше сложности, больше надежности Holy.js 2021
Node.js Меньше сложности, больше надежности Holy.js 2021Node.js Меньше сложности, больше надежности Holy.js 2021
Node.js Меньше сложности, больше надежности Holy.js 2021
 
Rethinking low-code
Rethinking low-codeRethinking low-code
Rethinking low-code
 
Hat full of developers
Hat full of developersHat full of developers
Hat full of developers
 
FwDays 2021: Metarhia Technology Stack for Node.js
FwDays 2021: Metarhia Technology Stack for Node.jsFwDays 2021: Metarhia Technology Stack for Node.js
FwDays 2021: Metarhia Technology Stack for Node.js
 
Node.js for enterprise - JS Conference
Node.js for enterprise - JS ConferenceNode.js for enterprise - JS Conference
Node.js for enterprise - JS Conference
 
Node.js for enterprise 2021 - JavaScript Fwdays 3
Node.js for enterprise 2021 - JavaScript Fwdays 3Node.js for enterprise 2021 - JavaScript Fwdays 3
Node.js for enterprise 2021 - JavaScript Fwdays 3
 
Node.js in 2021
Node.js in 2021Node.js in 2021
Node.js in 2021
 
Node.js middleware: Never again!
Node.js middleware: Never again!Node.js middleware: Never again!
Node.js middleware: Never again!
 
Patterns and antipatterns
Patterns and antipatternsPatterns and antipatterns
Patterns and antipatterns
 
Race-conditions-web-locks-and-shared-memory
Race-conditions-web-locks-and-shared-memoryRace-conditions-web-locks-and-shared-memory
Race-conditions-web-locks-and-shared-memory
 
Asynchronous programming and mutlithreading
Asynchronous programming and mutlithreadingAsynchronous programming and mutlithreading
Asynchronous programming and mutlithreading
 
Node.js in 2020 - part 3
Node.js in 2020 - part 3Node.js in 2020 - part 3
Node.js in 2020 - part 3
 
Node.js in 2020 - part 2
Node.js in 2020 - part 2Node.js in 2020 - part 2
Node.js in 2020 - part 2
 
Information system structure and architecture
Information system structure and architectureInformation system structure and architecture
Information system structure and architecture
 
Node.js in 2020 - part 1
Node.js in 2020 - part 1Node.js in 2020 - part 1
Node.js in 2020 - part 1
 
Web Locks API
Web Locks APIWeb Locks API
Web Locks API
 

Kürzlich hochgeladen

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 

Kürzlich hochgeladen (20)

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 

Impress Application Server for node.js (en)

  • 1. Multipurpose Application Server for Node.JS All decisions are made. Solutions are scaled Tools are provided and optimized for high load Ready for applied development and production
  • 2. Scaling Scaling Filesystem Structure URL Routing Configuration API Development Templating Static Resources Events (SSE) DB Access Plugins 1 Multiple applications • at single server • at single node.js process • at single tcp/ip port • at one domain (different path) One application • multiple processes at single server • multiple processes at multiple servers • at multiple domains (virtualhosts) • at multiple network interfaces • at multiple ports • over multiple protocols
  • 3. Scaling Scaling Filesystem Structure URL Routing Configuration API Development Templating Static Resources Events (SSE) DB Access Plugins 2 Deployment strategies: • All in one process (for development): cluster.strategy: "single" • Separate process for each host/port pair: cluster.strategy: "specialization" • Single server cluster, master + multiple workers cluster: { strategy: "multiple", workers: N } • Single server cluster with IP-sticky cluster.strategy: "sticky" • Multiple servers with multiple workers on each: strategy: "specialization", + nginx provides balancing and sticky • Applied cloud: hardware balancer, multiple servers with multiple workers, strategy: "multiple", ØMQ, impress controller
  • 4. Scaling Load Balancer Scaling Filesystem Structure URL Routing Configuration API Development Templating Static Resources Events (SSE) DB Access Plugins Impress Application Server HTTP С2 С1 С3 IPC C1N1 C1N2 C1N3 C2N1 C2N2 C2N3 C3N1 ØMQ pub/sub + req/rep 3 С0 Impress Cloud Controller C3N2
  • 5. Filesystem Structure Installation: npm install impress After that we have: Scaling Filesystem Structure URL Routing Configuration API Development Templating Static Resources Events (SSE) DB Access Plugins 4 Processing steps: • access.js • request.js • get.js, post.js... • html.template
  • 6. URL Routing Scaling Filesystem Structure URL Routing Configuration API Development Templating Static Resources Events (SSE) DB Access Plugins 5 Features: • folders are URL-handlers • handlers and templates inheritance/overriding • handlers by result type (html, json, csv, xml…) • serving handlers and templates from memory • filesystem monitoring and cache refreshing • files changes consolidation • multiple handler instances in memory • URL-rewriting (using regular expressions) • routing and reverse-proxy
  • 7. Configuration Scaling Filesystem Structure URL Routing Configuration API Development Templating Static Resources Events (SSE) DB Access Plugins 6 • file: config.js • file system monitoring • config.js soft reloading • configuration preprocessing
  • 8. Configuration Scaling Filesystem Structure URL Routing Configuration API Development Templating Static Resources Events (SSE) DB Access Plugins 7
  • 9. Configuration Scaling Filesystem Structure URL Routing Configuration API Development Templating Static Resources Events (SSE) DB Access Plugins 8
  • 10. API Development Scaling Filesystem Structure URL Routing Configuration API Development Templating Static Resources Events (SSE) DB Access Plugins 9
  • 11. API Development Scaling Filesystem Structure URL Routing Configuration API Development Templating Static Resources Events (SSE) DB Access Plugins 10 • RPC API (Stateful, state will store in RAM between request/response pairs) • REST API (Stateless, each request/responce is independent, order is not important, state is not stored in RAM) State classification: • system global state • session (or connection) state • user state • data-object (subject domain) state
  • 12. API Development Scaling Filesystem Structure URL Routing Configuration API Development Templating Static Resources Events (SSE) DB Access Plugins 11
  • 13. Templating Scaling Filesystem Structure URL Routing Configuration API Development Templating Static Resources Events (SSE) DB Access Plugins 12
  • 14. Templating Scaling Filesystem Structure URL Routing Configuration API Development Templating Static Resources Events (SSE) DB Access Plugins 13
  • 15. Static Resources Scaling Filesystem Structure URL Routing Configuration API Development Templating Static Resources Events (SSE) DB Access Plugins 14 • Serves static files directly from RAM (memory cache) • File system monitoring and cache refreshing when file changes • Cache garbage collection (multiple file buffers) removes items when deleting files or folders • Gzip compresion (except small files) storing gzipped files in RAM • Implemented HTTP if-modified-since and HTTP error 304 (Not modified) • Client JavaScript minification (using plugin "uglify-js")
  • 16. Events (SSE) Client1 Scaling Filesystem Structure URL Routing Configuration API Development Templating Static Resources Events (SSE) DB Access Plugins 15 Client2 Client3 С1 IPC C1N1 C1N2 C1N3 … ClientN
  • 17. Events (SSE) Client1 Scaling Filesystem Structure URL Routing Configuration API Development Templating Static Resources Events (SSE) DB Access Plugins Client2 Client3 … ClientN HTTP/SSE С2 С1 С3 IPC C1N1 C1N2 C1N3 C2N1 C2N2 C2N3 C3N1 ØMQ pub/sub + req/rep 16 С0 Impress Cloud Controller C3N2
  • 18. DB Access Scaling Filesystem Structure URL Routing Configuration API Development Templating Static Resources Events (SSE) DB Access Plugins 17 • Database drivers are plugins /lib/db.*.js • Utilities for SQL-compatible DBMS • Database schema compilation from JSON • DBMI Web-interface for database management • MongoDB • MySQL
  • 19. DB Access / DBMI Scaling Filesystem Structure URL Routing Configuration API Development Templating Static Resources Events (SSE) DB Access Plugins 18
  • 20. Plugins Scaling Filesystem Structure URL Routing Configuration API Development Templating Static Resources Events (SSE) DB Access Plugins 19 • mail plugin (using nodemailer, multiparty) • geoip plugin (using geoip-lite, optional installation) • CMS plugin (in development) • authentication, authorisation and accounting plugin • npm plugin (optional installation)
  • 21. Contacts and links Scaling Filesystem Structure URL Routing Configuration API Development Templating Static Resources Events (SSE) DB Access Plugins 20 https://npmjs.org/package/impress https://github.com/tshemsedinov/impress http://blog.aumcode.com http://bit.ly/1cSdTF3 (NFX, AUM, UNISTACK) mailto:timur.shemsedinov@gmail.com skype:timur.shemsedinov npm install impress