Sharing 4 years of experience about node.js - A google chrome V8 engine javascript based web server technology. This slide covers about wide range of knowledge about node.js learned from 4 years of production, experiment, test & failures
4년 동안 node.js 서버 프로그래밍을 경험한 내용을 간략하게 정리해 보았습니다. node.js 를 접하시는 분들에게 도움이 되었으면 합니다.
WordCamp IL 2016 - WordPress Scale on AWSBoaz Ziniman
One of the most popular CMS, WordPress, was not designed for the cloud era. Running a high demand and highly available WordPress in a cluster can be a complex task.
There are several solutions to this problem and this session will focus on one of them. Using several AWS services (EC2, RDS, S3, EFS, CloudFormation and others) and Zend Server, we will create a complex setup running in minutes and scale it up and down by demand.
Deploy a todo app via Serverless framework.
Build app with golang and echo server.
This presentation is the guide "How to deploy Golang apps via AWS Lambda and ETC".
Demo: https://go-todo.judoka.dev/
Github: https://github.com/novemberde/go-serverless-demo
Blog: https://novemberde.github.io/
Von „less Server" zu Serverless: eine Reise durch die CloudOPEN KNOWLEDGE GmbH
Was genau ist Serverless und was sind sinnvolle Anwendungsszenarien für Serverless Applications?
In welchem Zusammenhang stehen dabei die Akronyme IaaS, PaaS, Baas und FaaS?
Wir sprechen über „Stolperfallen“ und „Wie man’s richtig macht“.
Implementing Infrastructure as Code ConfigMgtCamp 2017Kief Morris
Run-through of key patterns and approaches for applying software engineering practices and microservice design to infrastructure.
Infrastructure as Code is the "A" (Automation) in the "CAMS" model for DevOps.
Implementation of the Continuous Integration based on Atlassian BambooАнете Аннемария
Aleksandrs, Filips and Jurijs from ALSO Cloud will speak about the implementation of the Continuous Integration based on Atlassian Bamboo. They will try to cover the why, the how and the what-to-look-out-for when implementing CI (and CD) in a medium-large project.
Filips Jelisejevs is SCRUM Master by conviction and a software developer by heart.
Aleksandrs Stepanovs is a frontend developer with 6+ years of experience, specializing in single page applications.
Jurijs Sakels is a hardcore .NET developer, tractor driver and whatever else he needs to be.
WordCamp IL 2016 - WordPress Scale on AWSBoaz Ziniman
One of the most popular CMS, WordPress, was not designed for the cloud era. Running a high demand and highly available WordPress in a cluster can be a complex task.
There are several solutions to this problem and this session will focus on one of them. Using several AWS services (EC2, RDS, S3, EFS, CloudFormation and others) and Zend Server, we will create a complex setup running in minutes and scale it up and down by demand.
Deploy a todo app via Serverless framework.
Build app with golang and echo server.
This presentation is the guide "How to deploy Golang apps via AWS Lambda and ETC".
Demo: https://go-todo.judoka.dev/
Github: https://github.com/novemberde/go-serverless-demo
Blog: https://novemberde.github.io/
Von „less Server" zu Serverless: eine Reise durch die CloudOPEN KNOWLEDGE GmbH
Was genau ist Serverless und was sind sinnvolle Anwendungsszenarien für Serverless Applications?
In welchem Zusammenhang stehen dabei die Akronyme IaaS, PaaS, Baas und FaaS?
Wir sprechen über „Stolperfallen“ und „Wie man’s richtig macht“.
Implementing Infrastructure as Code ConfigMgtCamp 2017Kief Morris
Run-through of key patterns and approaches for applying software engineering practices and microservice design to infrastructure.
Infrastructure as Code is the "A" (Automation) in the "CAMS" model for DevOps.
Implementation of the Continuous Integration based on Atlassian BambooАнете Аннемария
Aleksandrs, Filips and Jurijs from ALSO Cloud will speak about the implementation of the Continuous Integration based on Atlassian Bamboo. They will try to cover the why, the how and the what-to-look-out-for when implementing CI (and CD) in a medium-large project.
Filips Jelisejevs is SCRUM Master by conviction and a software developer by heart.
Aleksandrs Stepanovs is a frontend developer with 6+ years of experience, specializing in single page applications.
Jurijs Sakels is a hardcore .NET developer, tractor driver and whatever else he needs to be.
Robert Goik: Podczas ostatniej konferencji React Conf jednym z poruszanych tematów (poza nowym wyglądem Facebooka) była arcyciekawa technologia za tym stojąca. Wraz z najnowszym “experimental release” otrzymaliśmy wsparcie dla Concurrent Mode oraz Suspense i już teraz możemy sobie… poeksperymentować.
Пссс, ребята, хотите немного ускорителей? Чтобы быстрее писать работающий код и меньше тратить времени на разную ерунду. Ну, типа, деплоймент, отладка, ругань с QA, воспроизведение багов, вот это всё?
Тогда приходите на доклад, где Сергей поделится инструментами и подходами, которые помогут взглянуть на разработку под совершенно другим, более приятным углом. Рассмотрим (или, как минимум, упомянём) ncrunch, autofixture, xunit, fluentassertions, nsubstitute, approvaltests, fake, canopy, powershell и еще что-то. Поговорим о прагматичных подходах к разработке, автотестах, живом коде и о том, как подольше оставаться в потоке.
Все абсолютно легально, без СМС и регистраций. После доклада ваша жизнь уже не будет прежней.
Ceylon is a new modern, elegant programming language for the JVM and JavaScript VM, designed for team work. But it's more than that, it is a full platform with modularity, an SDK, tools and IDEs.
We will present Ceylon the language, the platform, and its ecosystem. You will see everything from starting a new project in the IDE to publishing it on Herd, our module repository, including using the SDK. We will also discuss the ongoing Ceylon projects such as the build system, Vert.x integration or Cayla, the new web framework.
Finally we will discuss the plans for Ceylon 1.2 and further.
Structuring node.js projects - Seven Peaks Software (Node.JS Meetup 18 nov 2021)Seven Peaks Speaks
Denis is a professional programmer who has 12+ years of experience working in various startups!
Denis was dive deep into Structuring your Node.JS app, DI Container, Async Local Storage, Request handlers, Services, Unit of Work and Testing.
For more info about Seven Peaks Software:
https://lnkd.in/g2jMsDy
Why you should switch to Cypress for modern web testing?Shivam Bharadwaj
Cypress is a modern web testing framework built on top of mocha and uses chai as an assertion library. The E2E tests are written entirely in javascript. These slides will give you a kick ass on getting started with Cypress.
Do read my blog @ - https://dzone.com/articles/why-should-you-switch-to-cypress-for-modern-web-te
This workshop will walk through the process of creating a video player application that will have a mobile device as a remote control and a pc somewhere as the server. The talk will show some of the easy to implement features and best practices.
Being a WordPress developer means that our main programming language is PHP. Which works for building websites but not for running tasks. In this talk I will share my experience using Node.js as a platform to build on. Explaining why I have chosen for Node.js and show you how I used Node.js to build microservices that are supporting my WordPress projects.
At Weaveworks we use gRPC extensively within Weave Cloud.
In this talk I discuss 5 of the stages we went through as we adopted gRPC, some of the problems we encountered and technologies we used to overcome them
API Design in the Modern Era - Architecture Next 2020Eran Stiller
APIs are at the heart of the modern software development world. Whether we author a distributed system, a microservices-based application, or a simple client-server n-tier application - our system will most probably expose an API at its core. APIs are a means to expose the functionality of a particular component to its users. Unsurprisingly, many formats for APIs have existed over the years, with the industry setting around RESTful APIs as the de-facto standard, with gRPC growing in popularity.
Join me in this session, as I review today's most popular API formats and their relative strengths and weaknesses. From REST, through OpenAPI, via gRPC and to the rising star of AsyncAPI - we'll explain how these API formats work and the tools they employ and offer some guidance as towards when we should use each. At the end of this session, you'll have a good familiarity with these formats, and you'll be in a much better position to choose between them.
Robert Goik: Podczas ostatniej konferencji React Conf jednym z poruszanych tematów (poza nowym wyglądem Facebooka) była arcyciekawa technologia za tym stojąca. Wraz z najnowszym “experimental release” otrzymaliśmy wsparcie dla Concurrent Mode oraz Suspense i już teraz możemy sobie… poeksperymentować.
Пссс, ребята, хотите немного ускорителей? Чтобы быстрее писать работающий код и меньше тратить времени на разную ерунду. Ну, типа, деплоймент, отладка, ругань с QA, воспроизведение багов, вот это всё?
Тогда приходите на доклад, где Сергей поделится инструментами и подходами, которые помогут взглянуть на разработку под совершенно другим, более приятным углом. Рассмотрим (или, как минимум, упомянём) ncrunch, autofixture, xunit, fluentassertions, nsubstitute, approvaltests, fake, canopy, powershell и еще что-то. Поговорим о прагматичных подходах к разработке, автотестах, живом коде и о том, как подольше оставаться в потоке.
Все абсолютно легально, без СМС и регистраций. После доклада ваша жизнь уже не будет прежней.
Ceylon is a new modern, elegant programming language for the JVM and JavaScript VM, designed for team work. But it's more than that, it is a full platform with modularity, an SDK, tools and IDEs.
We will present Ceylon the language, the platform, and its ecosystem. You will see everything from starting a new project in the IDE to publishing it on Herd, our module repository, including using the SDK. We will also discuss the ongoing Ceylon projects such as the build system, Vert.x integration or Cayla, the new web framework.
Finally we will discuss the plans for Ceylon 1.2 and further.
Structuring node.js projects - Seven Peaks Software (Node.JS Meetup 18 nov 2021)Seven Peaks Speaks
Denis is a professional programmer who has 12+ years of experience working in various startups!
Denis was dive deep into Structuring your Node.JS app, DI Container, Async Local Storage, Request handlers, Services, Unit of Work and Testing.
For more info about Seven Peaks Software:
https://lnkd.in/g2jMsDy
Why you should switch to Cypress for modern web testing?Shivam Bharadwaj
Cypress is a modern web testing framework built on top of mocha and uses chai as an assertion library. The E2E tests are written entirely in javascript. These slides will give you a kick ass on getting started with Cypress.
Do read my blog @ - https://dzone.com/articles/why-should-you-switch-to-cypress-for-modern-web-te
This workshop will walk through the process of creating a video player application that will have a mobile device as a remote control and a pc somewhere as the server. The talk will show some of the easy to implement features and best practices.
Being a WordPress developer means that our main programming language is PHP. Which works for building websites but not for running tasks. In this talk I will share my experience using Node.js as a platform to build on. Explaining why I have chosen for Node.js and show you how I used Node.js to build microservices that are supporting my WordPress projects.
At Weaveworks we use gRPC extensively within Weave Cloud.
In this talk I discuss 5 of the stages we went through as we adopted gRPC, some of the problems we encountered and technologies we used to overcome them
API Design in the Modern Era - Architecture Next 2020Eran Stiller
APIs are at the heart of the modern software development world. Whether we author a distributed system, a microservices-based application, or a simple client-server n-tier application - our system will most probably expose an API at its core. APIs are a means to expose the functionality of a particular component to its users. Unsurprisingly, many formats for APIs have existed over the years, with the industry setting around RESTful APIs as the de-facto standard, with gRPC growing in popularity.
Join me in this session, as I review today's most popular API formats and their relative strengths and weaknesses. From REST, through OpenAPI, via gRPC and to the rising star of AsyncAPI - we'll explain how these API formats work and the tools they employ and offer some guidance as towards when we should use each. At the end of this session, you'll have a good familiarity with these formats, and you'll be in a much better position to choose between them.
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...Jesse Gallagher
Though Domino makes working with build servers and CI/CD pipelines difficult, it is possible to do so even with complex applications. This session will discuss the specifics of using several OpenNTF projects - NSF ODP Tooling, the Jakarta XPages Runtime, and XPages Jakarta EE Support - as well as open-source technologies such as Docker to build, test, and deploy Java-based Domino applications for testing and staging. This builds on previous sessions about the NSF ODP Tooling and Maven generally.
"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)Tech in Asia ID
Hengki Sihombing is the Co-Founder and CTO Urbanhire, a technology company who provides Software as a Service (SaaS) for Hiring and Recruitment and also Job search agregator for jobseeker.
Before founding Urbanhire, Hengki had over 10 years of professional experience in software development in companies like: OLX, Wego, Merah Putih Inc, GushCloud. Hengki also actively participates in various Technology communities. He founded and leads the JakartaJS Community with more than 1900 Members.
***
This slide was shared at Tech in Asia Product Development Conference 2017 (PDC'17) on 9-10 August 2017.
Get more insightful updates from TIA by subscribing techin.asia/updateselalu
Slides from my workshop about node.js which I conducted in Girl Geek Dinner Bangalore. More details at http://sudarmuthu.com/blog/introduction-to-node-js-at-yahoo-girl-geek-dinner
Talk at RubyKaigi 2015.
Plugin architecture is known as a technique that brings extensibility to a program. Ruby has good language features for plugins. RubyGems.org is an excellent platform for plugin distribution. However, creating plugin architecture is not as easy as writing code without it: plugin loader, packaging, loosely-coupled API, and performance. Loading two versions of a gem is a unsolved challenge that is solved in Java on the other hand.
I have designed some open-source software such as Fluentd and Embulk. They provide most of functions by plugins. I will talk about their plugin-based architecture.
Zepto and the rise of the JavaScript Micro-FrameworksThomas Fuchs
Here are my slides from JSConf 2011 in Portland, Oregon. I was talking about Zepto, my micro-framework, WebKit-only (works on Firefox too, though) clone of the jQuery API, and why I think that Micro-Frameworks and Micro-Libraries are better suited for the mobile Web than traditional, monolithic libraries, like script.aculo.us, Prototype or jQuery. (A video of the talk is forthcoming and will be announced on my blog, http://mir.aculo.us).
Intro to node.js - Ran Mizrahi (27/8/2014)Ran Mizrahi
Node.js is a platform built on Chrome V8 javascript runtime engine for building fast and scalable, non-blocking, real-time and network applications. In this session Ran will introduce node.js and how to develop large code bases using it. He'll cover the following aspects:
• What is node.js?
• Apache vs. Nginx performance (One thread per connection vs. event loop) and what it has to do with node.js.
• Why node was written in Javascript?
• Main tools and frameworks (Express, socket.io, mongoose etc.)
• TDD/BDD with node.js using mocha and Chai.
Ran Mizrahi, Founder of CoCycles, Passionate entrepreneur and software engineer who loves to continuously innovate and deliver meaningful products while having true fun with the right team.
First Steps with Globus Compute Multi-User EndpointsGlobus
In this presentation we will share our experiences around getting started with the Globus Compute multi-user endpoint. Working with the Pharmacology group at the University of Auckland, we have previously written an application using Globus Compute that can offload computationally expensive steps in the researcher's workflows, which they wish to manage from their familiar Windows environments, onto the NeSI (New Zealand eScience Infrastructure) cluster. Some of the challenges we have encountered were that each researcher had to set up and manage their own single-user globus compute endpoint and that the workloads had varying resource requirements (CPUs, memory and wall time) between different runs. We hope that the multi-user endpoint will help to address these challenges and share an update on our progress here.
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...informapgpstrackings
Keep tabs on your field staff effortlessly with Informap Technology Centre LLC. Real-time tracking, task assignment, and smart features for efficient management. Request a live demo today!
For more details, visit us : https://informapuae.com/field-staff-tracking/
Code reviews are vital for ensuring good code quality. They serve as one of our last lines of defense against bugs and subpar code reaching production.
Yet, they often turn into annoying tasks riddled with frustration, hostility, unclear feedback and lack of standards. How can we improve this crucial process?
In this session we will cover:
- The Art of Effective Code Reviews
- Streamlining the Review Process
- Elevating Reviews with Automated Tools
By the end of this presentation, you'll have the knowledge on how to organize and improve your code review proces
How to Position Your Globus Data Portal for Success Ten Good PracticesGlobus
Science gateways allow science and engineering communities to access shared data, software, computing services, and instruments. Science gateways have gained a lot of traction in the last twenty years, as evidenced by projects such as the Science Gateways Community Institute (SGCI) and the Center of Excellence on Science Gateways (SGX3) in the US, The Australian Research Data Commons (ARDC) and its platforms in Australia, and the projects around Virtual Research Environments in Europe. A few mature frameworks have evolved with their different strengths and foci and have been taken up by a larger community such as the Globus Data Portal, Hubzero, Tapis, and Galaxy. However, even when gateways are built on successful frameworks, they continue to face the challenges of ongoing maintenance costs and how to meet the ever-expanding needs of the community they serve with enhanced features. It is not uncommon that gateways with compelling use cases are nonetheless unable to get past the prototype phase and become a full production service, or if they do, they don't survive more than a couple of years. While there is no guaranteed pathway to success, it seems likely that for any gateway there is a need for a strong community and/or solid funding streams to create and sustain its success. With over twenty years of examples to draw from, this presentation goes into detail for ten factors common to successful and enduring gateways that effectively serve as best practices for any new or developing gateway.
Into the Box Keynote Day 2: Unveiling amazing updates and announcements for modern CFML developers! Get ready for exciting releases and updates on Ortus tools and products. Stay tuned for cutting-edge innovations designed to boost your productivity.
Advanced Flow Concepts Every Developer Should KnowPeter Caitens
Tim Combridge from Sensible Giraffe and Salesforce Ben presents some important tips that all developers should know when dealing with Flows in Salesforce.
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Globus
The U.S. Geological Survey (USGS) has made substantial investments in meeting evolving scientific, technical, and policy driven demands on storing, managing, and delivering data. As these demands continue to grow in complexity and scale, the USGS must continue to explore innovative solutions to improve its management, curation, sharing, delivering, and preservation approaches for large-scale research data. Supporting these needs, the USGS has partnered with the University of Chicago-Globus to research and develop advanced repository components and workflows leveraging its current investment in Globus. The primary outcome of this partnership includes the development of a prototype enterprise repository, driven by USGS Data Release requirements, through exploration and implementation of the entire suite of the Globus platform offerings, including Globus Flow, Globus Auth, Globus Transfer, and Globus Search. This presentation will provide insights into this research partnership, introduce the unique requirements and challenges being addressed and provide relevant project progress.
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamtakuyayamamoto1800
In this slide, we show the simulation example and the way to compile this solver.
In this solver, the Helmholtz equation can be solved by helmholtzFoam. Also, the Helmholtz equation with uniformly dispersed bubbles can be simulated by helmholtzBubbleFoam.
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Shahin Sheidaei
Games are powerful teaching tools, fostering hands-on engagement and fun. But they require careful consideration to succeed. Join me to explore factors in running and selecting games, ensuring they serve as effective teaching tools. Learn to maintain focus on learning objectives while playing, and how to measure the ROI of gaming in education. Discover strategies for pitching gaming to leadership. This session offers insights, tips, and examples for coaches, team leads, and enterprise leaders seeking to teach from simple to complex concepts.
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Globus
Large Language Models (LLMs) are currently the center of attention in the tech world, particularly for their potential to advance research. In this presentation, we'll explore a straightforward and effective method for quickly initiating inference runs on supercomputers using the vLLM tool with Globus Compute, specifically on the Polaris system at ALCF. We'll begin by briefly discussing the popularity and applications of LLMs in various fields. Following this, we will introduce the vLLM tool, and explain how it integrates with Globus Compute to efficiently manage LLM operations on Polaris. Attendees will learn the practical aspects of setting up and remotely triggering LLMs from local machines, focusing on ease of use and efficiency. This talk is ideal for researchers and practitioners looking to leverage the power of LLMs in their work, offering a clear guide to harnessing supercomputing resources for quick and effective LLM inference.
Listen to the keynote address and hear about the latest developments from Rachana Ananthakrishnan and Ian Foster who review the updates to the Globus Platform and Service, and the relevance of Globus to the scientific community as an automation platform to accelerate scientific discovery.
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Hivelance Technology
Cryptocurrency trading bots are computer programs designed to automate buying, selling, and managing cryptocurrency transactions. These bots utilize advanced algorithms and machine learning techniques to analyze market data, identify trading opportunities, and execute trades on behalf of their users. By automating the decision-making process, crypto trading bots can react to market changes faster than human traders
Hivelance, a leading provider of cryptocurrency trading bot development services, stands out as the premier choice for crypto traders and developers. Hivelance boasts a team of seasoned cryptocurrency experts and software engineers who deeply understand the crypto market and the latest trends in automated trading, Hivelance leverages the latest technologies and tools in the industry, including advanced AI and machine learning algorithms, to create highly efficient and adaptable crypto trading bots
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Globus
The Earth System Grid Federation (ESGF) is a global network of data servers that archives and distributes the planet’s largest collection of Earth system model output for thousands of climate and environmental scientists worldwide. Many of these petabyte-scale data archives are located in proximity to large high-performance computing (HPC) or cloud computing resources, but the primary workflow for data users consists of transferring data, and applying computations on a different system. As a part of the ESGF 2.0 US project (funded by the United States Department of Energy Office of Science), we developed pre-defined data workflows, which can be run on-demand, capable of applying many data reduction and data analysis to the large ESGF data archives, transferring only the resultant analysis (ex. visualizations, smaller data files). In this talk, we will showcase a few of these workflows, highlighting how Globus Flows can be used for petabyte-scale climate analysis.
Developing Distributed High-performance Computing Capabilities of an Open Sci...Globus
COVID-19 had an unprecedented impact on scientific collaboration. The pandemic and its broad response from the scientific community has forged new relationships among public health practitioners, mathematical modelers, and scientific computing specialists, while revealing critical gaps in exploiting advanced computing systems to support urgent decision making. Informed by our team’s work in applying high-performance computing in support of public health decision makers during the COVID-19 pandemic, we present how Globus technologies are enabling the development of an open science platform for robust epidemic analysis, with the goal of collaborative, secure, distributed, on-demand, and fast time-to-solution analyses to support public health.
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?XfilesPro
Worried about document security while sharing them in Salesforce? Fret no more! Here are the top-notch security standards XfilesPro upholds to ensure strong security for your Salesforce documents while sharing with internal or external people.
To learn more, read the blog: https://www.xfilespro.com/how-does-xfilespro-make-document-sharing-secure-and-seamless-in-salesforce/
Strategies for Successful Data Migration Tools.pptxvarshanayak241
Data migration is a complex but essential task for organizations aiming to modernize their IT infrastructure and leverage new technologies. By understanding common challenges and implementing these strategies, businesses can achieve a successful migration with minimal disruption. Data Migration Tool like Ask On Data play a pivotal role in this journey, offering features that streamline the process, ensure data integrity, and maintain security. With the right approach and tools, organizations can turn the challenge of data migration into an opportunity for growth and innovation.
Modern design is crucial in today's digital environment, and this is especially true for SharePoint intranets. The design of these digital hubs is critical to user engagement and productivity enhancement. They are the cornerstone of internal collaboration and interaction within enterprises.
3. • Javascript를이용하여 (Web)서버 프로그래밍을
할 수 있도록 도와주는 Framework
• GoogleChrome V8 Engine 을 Runtime으로 사용
• POSIX AsyncThread를 이용하여
Non Blocking Asynchronous I/O를 지원
• Single Threaded, MessageQueue, Event Based
• Joyent라는 회사가 Maintain을 하고 있는 오픈소스 프로젝트https://nodejs.org
4. TJ Fontaine
3rd BDFL of node.js
Issac Schlueter
2nd BDFL of node.js
Founder or NPM
Ryan Dahl
Founder of node.js
2011
2012
2013
2014
2015
2009
Mikael Rogers
Core Maintainer of io.js
https://nodejs.org/en/download/releases/
분열된 커뮤니티 통합
node.js + io.js
Joyent 와 의견차이로 인해
node 핵심 개발자들이
io.js 로 분열
6. reference: http://strongloop.com
node.js
Event Loop Model
node.js, Vert.x 등의 최신 Webserver
• Pro
• Blazingly Fast = Non-blocking I/O Advantage
• Memory efficient (? = Message Queue Cost)
• Single threaded = Less Concurrency Problem
• Con
• Hard to Implement (Callbacks)
• Inefficient CPU Performance
• Hard to Scale-up
• Hard to build large application
(better to be Lambda or Microservices)
7. Frontend Server
AWS t2.mirco x 2 ~
3.3GHz Xeon, 1G Ram
Clustered Mode (3 process)
1 Year 2 Month
in production
Frontend Server
AWS t2.mirco x 2 ~
3.3GHz Xeon, 1G Ram
Clustered Mode
In preparation
8.
9. Tool Pro Con Suggestion
Vim Directly edit in server
No auto-completion
No syntax checking
Emergency hot fix in server
Sublime Text
Light weight than IDE
Many plugins
No auto-completion
No syntax checking
Replacement of notepad
Visual Studio
Convenient Scheme
Many functions
Too heavy
Full support only for Windows (sucks)
If you are big fan of Windows
PyCharm
Many functions
Nice remote features
Less heavy
Must install node.js plugin
If you working with Python and
node.js same time
IntelliJ IDEA
Many functions
Built-in node.js support
Too heavy (Multi-purpose) If you are big fan of all-in-one
Because of dynamic/interpreter aspect of JS, IDE may nice for productivity,
but mix tools for purpose may required also.
10. There is no common structure for node.js applications
but you’d better to stick with CommonJS way (Although may not good for web compatibility)
Root
Module_A
application.js
index.js
module_1.js
var module_A = require(“./Module_A”)(a);
module_A.foo(x);
module.export = function(a) {
return {
foo: function(x) { console.log(x) }
};
}
module.export = function(a) {
require(“./module_1.js”)(a);
// require(“./module_2.js”);
}
main
11. Due to the difference language paradigm and conceptually incomplete to support OOP,
Using OOP style in node.js is possible but better not to strictly rely on it.
Better to apply only for specific objects (like Error/Exception Object)
Error
HttpError
function Error(message) { // In JS world, function is object too
this.message = “I am error”;
};
var util = require(”util”);
function HttpError(responseCode, message) {
Error.call(message); // call parent constructor
this.responseCode = responseCode;
this.name = ”HttpError”;
};
util.inherits(HttpError, Error); // explicitly use node.js inheritence
BadRequestError
If you need compatibility between Web JS and node.js, Do not use this way.
Instead, use inheritance using JS prototype
12. Its very prone to be encounter complex callbacks since asynchronous feature of node.js (or async JS)
It’s very bad practice of JS programming and should be avoided.
Trivia: Joyent core developer still sticks with callbacks since they want to keep low-level simplicity
but It’s very controversy between many node.js developers. (and they blame joyent about that)
13. To overcome drawbacks of callbacks, Promise like techniques are widely used.
The concept of Promise is using Object to communicate between callbacks.
Promise (Promise A+) had become standard feature of ES6 Javascript.
var file = reqire(“./file”);
file.open(function(err, fp) {
// How to handle errors?
file.read(fp, function(err, content) {
for (var item in content) {
file.replace(item, “new item”, function (err, fp) {
file.commit(fp, function(err) {
// How to close file when its done?
});
});
}
});
});
var file = reqire(“./file”);
file.open()
.then(function (fp) {
return file.read(fp);
})
.all(function (item) {
return file.replace(item, ‘new item’);
})
.then(function(fp) {
return file.commit(fp);
})
.then(function() {
return file.close();
})
.catch(function(err) {
console.log(‘Errors are handled:’ + err);
return file.revert();
});
https://promisesaplus.com/
Old Javascript callback hell
14. New programming concept born from resolving callback hell
Must see: http://blog.namangoel.com/dealing-with-callback-hell
Promise A+ Reactive
Programming
Generators
15. Library Purpose Pro Con Suggestion
Restify
RESTful Server
Framework
- Light-weight
- Very focused for RESTful API
Implementation
- Less middleware feature
- Poor documentation
If you fed up with Express JS and
only you need is RESTful API
Sequelize ORM
- Best ORM Library
- Well documented
- Lack of some GIS feature
- Auto sync may bad
Be safe to use sync()
Underscore
Common
Utilities
- 100% Web compatible
- Light and easy to use
- Lack of function for arguments
object
If you not on ES6, use it.
Bluebird Promise A+
- 100% Compatible with
ES 6 Promise
- Best Promise A+ Library
- Has some memory leaks
- Less documentation
If you not on ES6, use it.
Mocha TDD/BDD
- Best BDD/TDD Framework
- Best with should.js
- May be old If you have no preference, use it.
Passport JS
Oauth
/ Social Login
- Best Login Library
- Many Strategies
- Some strategies may need to be
fixed on your own.
If you don’t want to build your own
login feature, use it.
node.js and JS community is very large and rapidly growing,
So you have to checkout good libraries at NPM and Github to reduce time to search.
16. Many web frameworks exists for node.js but all of them has pro/cons = no superb one.
You have to choose right tool for your right purposes. (Avoid Tech Masturbation)
Name Express JS Hapi Restify Strongloop
Pro • All-in-one (Web/RESTful)
• Many 3rd party middlewares
• Service by Manifest
• Walmart Support
• Light weight
• Dtrace support
• Only for RESTful Service
• For Enterprise
• Nice dashboard, Profiler
• Swagger included
Con
• Very complex to use/fix
• Soon will be decayed
• Static content can be
served via nginx or apache
• Less middleware
• Express code cannot be used
• Poor documentation
• Have to build everything you
needed.
• Only for Enterprise
• Memory leaks
• Very heavy
• No OSS
17. Due to the structure limitations, node.js may very bad choice for certain applications
If you need intensive CPU jobs, consider use Python or Java. (http://imjuni.tistory.com/694)
Events are not processed in enough time.
Event queue is rapidly grow
Memory is growing fast
Heavy CPU process/wait in callbacks
Segmentation Fault may happen
18. V8 Engine GC has two way in memory management, each will executed respectively
https://strongloop.com/strongblog/node-js-performance-garbage-collection/
Full GC
(Mark and Sweep & Mark and Compact)
Short GC
(Scavengering)
19. Checkout RSS/Heap Size/Heap total to checkout memory leaks.
Watch your Heap growth pattern before and after GC using Continuous request for period
Full GC
(Mark and Sweep & Mark and Compact)
Short GC
(Scavengering)
Normal
Memory Leaking
Segment Fault
OS kills app
Heap & RSS are kepp growing
20. Running server with high pressure of request may not help to find out actual problem.
Using google chrome dev tools and few other libraries, you can profile your applications
Must see: https://www.joyent.com/blog/walmart-node-js-memory-leak
Golden rules
1. Narrow down causes
2. Wait, Collect, Compare
3. Check your throught-put
4. Most of all: Build with KISS
Wallmart Memory LeakCase (Running for 15 hours )
21. Due to the Javascripts less type safe and very dynamic features,
Unit Testing is very crucial to assure quality of Application (NO TDD, NO DEV)
Type What to Test Goal How to Test Together with
Module Test Module To assure quality
of module
UT/TDD with
randominputs
Feature Test API To assure quality
of each features
UT/BDD with
random inputs
Load Runner
Scenario Test Business Logic To assure quality
of scenario
UT/BDD with
random inputs
Load Runner
You have to run regression Test for all above 3 (If possible).
Managing bulk of codes in Unit Testing is not that easy
Kanizsa Lab's Software Testing Policy
22. Single Mode Clustered Mode
PID: 1
PID: 1
master
PID: 2
slave 1
PID: 3
slave 2
PID: 1
master
PID: 2
slave 1
PID: 3
slave 2
Clustered Mode
with Forever
Forever
To enable scalability in node.js, Clustered Mode is supported (Process Fork) but you have to manage
slaves by yourself. Using forever daemon to watch master process status is encouraged.
Recommended size of slaves = number of CPUs (But you’d better check out enough memory exists)
23. Logging is very important but have to keep a “golden mean”
1) Do not give burden to process 2) Enough to be detailed 3) Machine Understandable 4) Server wide standard format
PID: 1
node
bunyan
CRON
JOB
Logrotate
File
AWS
S3upload
JSON
node bunyan is the best library to logging with JSON
bunyan is also main logging library of Joyent Cloud
Not recommended:
Upload to NoSQL directly via app internal library
Seems too much in early stages:
Using transport system like Flume, Kafka, Fluentd
these technology required by enough large clusters
Logrotate
24. node.js is still rapidly growing and expanding its supporting platforms from server to embedded
devices. the best advantage of node.js: Fast I/O with less memory and easy to start makes it a very
fascinating framework to learn for developers. So keep watch it!
IoT.js (Forked version of node.js) by Samsung node.js running on Raspberry-Pi as application framework