This slides are for meetup event from below link.
https://www.meetup.com/ja-JP/CodeChrysalis/events/245248864/
This mainly explains how backend program works in general and I implemented sample project with express and sequelizejs that are nodejs modules and PostgreSQL for a database. You can see sample project (learning material of backend with JavaScript) from below github link.
Repository for this slides:
https://github.com/duyoji/creating_api_with_express_and_postgresql
W3C HTML5 KIG-How to write low garbage real-time javascriptChanghwan Yi
This document summarizes techniques for writing low-garbage real-time JavaScript code. It discusses how to avoid object allocation using syntax like {} and [] instead of the new keyword. It also recommends reusing objects by wiping their properties instead of creating new ones. Functions should be created at startup instead of during runtime. Vector objects should be returned as individual values instead of vector objects. While avoiding garbage entirely is difficult, these techniques can help craft responsive real-time JavaScript with minimal garbage collector overhead.
This document provides a history and overview of ECMAScript (ES), the standard upon which JavaScript is based. It discusses the major versions from ES3 in 1999 to ES2016. Key changes and new features are outlined for each version, including the addition of classes, modules, iterators and more in ES6/ES2015. Transpilers like Babel allow the use of new syntax by compiling ES6 to older JavaScript. Compatibility and adoption are addressed, noting a goal of evolving the language without breaking the web. Links for further reading on ES6 features and syntax are also included.
Drupal 8 - Hosting, Performance and DrushCode Enigma
This document discusses various technical aspects of setting up and using Drupal 8, including the recommended stack of Debian 6, Percona MySQL, PHP 5.3, and Nginx. It covers new file system locations, updated .htaccess rules, improved Drush support including new configuration management commands, caching options like APC and Memcache, the introduction of NoSQL databases, requirements to stay on PHP 5.3 for compatibility, and notes that while Drupal 8 works, more performance improvements are still needed before it is ready for production use.
This document discusses Netflix's continuous delivery pipeline which allows for frequent code deployments. It describes how Netflix uses tools like Jenkins, Chef, and Asgard to automate building, testing, and deploying code. It also covers how Netflix tests deployments, monitors services, and has mechanisms like red/black deployments and the Simian Army to improve resiliency.
This document contains the slides from a presentation about MacRuby. It discusses key aspects of MacRuby including its use of LLVM, ahead-of-time and just-in-time compilation, integration with Cocoa and Objective-C, lack of a global interpreter lock, Grand Central Dispatch API, debugger, ability to create compiled libraries and applications, and potential uses like building App Store apps. Examples are provided of using MacRuby with features like speech synthesis, location services, and the address book.
This slides are for meetup event from below link.
https://www.meetup.com/ja-JP/CodeChrysalis/events/245248864/
This mainly explains how backend program works in general and I implemented sample project with express and sequelizejs that are nodejs modules and PostgreSQL for a database. You can see sample project (learning material of backend with JavaScript) from below github link.
Repository for this slides:
https://github.com/duyoji/creating_api_with_express_and_postgresql
W3C HTML5 KIG-How to write low garbage real-time javascriptChanghwan Yi
This document summarizes techniques for writing low-garbage real-time JavaScript code. It discusses how to avoid object allocation using syntax like {} and [] instead of the new keyword. It also recommends reusing objects by wiping their properties instead of creating new ones. Functions should be created at startup instead of during runtime. Vector objects should be returned as individual values instead of vector objects. While avoiding garbage entirely is difficult, these techniques can help craft responsive real-time JavaScript with minimal garbage collector overhead.
This document provides a history and overview of ECMAScript (ES), the standard upon which JavaScript is based. It discusses the major versions from ES3 in 1999 to ES2016. Key changes and new features are outlined for each version, including the addition of classes, modules, iterators and more in ES6/ES2015. Transpilers like Babel allow the use of new syntax by compiling ES6 to older JavaScript. Compatibility and adoption are addressed, noting a goal of evolving the language without breaking the web. Links for further reading on ES6 features and syntax are also included.
Drupal 8 - Hosting, Performance and DrushCode Enigma
This document discusses various technical aspects of setting up and using Drupal 8, including the recommended stack of Debian 6, Percona MySQL, PHP 5.3, and Nginx. It covers new file system locations, updated .htaccess rules, improved Drush support including new configuration management commands, caching options like APC and Memcache, the introduction of NoSQL databases, requirements to stay on PHP 5.3 for compatibility, and notes that while Drupal 8 works, more performance improvements are still needed before it is ready for production use.
This document discusses Netflix's continuous delivery pipeline which allows for frequent code deployments. It describes how Netflix uses tools like Jenkins, Chef, and Asgard to automate building, testing, and deploying code. It also covers how Netflix tests deployments, monitors services, and has mechanisms like red/black deployments and the Simian Army to improve resiliency.
This document contains the slides from a presentation about MacRuby. It discusses key aspects of MacRuby including its use of LLVM, ahead-of-time and just-in-time compilation, integration with Cocoa and Objective-C, lack of a global interpreter lock, Grand Central Dispatch API, debugger, ability to create compiled libraries and applications, and potential uses like building App Store apps. Examples are provided of using MacRuby with features like speech synthesis, location services, and the address book.
Chef - Configuration Management for the CloudJames Casey
This document discusses using Chef for configuration management in the cloud. Chef allows infrastructure to be defined as code and automatically deployed across cloud providers. It provides tools to build and manage complex, evolving infrastructures through recipes, templates, and reusable cookbooks. Chef handles provisioning, configuration, application deployment, and allows infrastructure to be easily migrated across cloud platforms.
JavaOne 2013 - Clojure for Java DevelopersJan Kronquist
The fact that Clojure is a dialect of Lisp makes it feel completely alien to Java developers, and they miss the opportunity to learn this dynamic and functional programming language for the JVM. Clojure’s focus on immutability makes it very useful for concurrency. This presentation introduces Clojure in a way that feels natural to Java developers. By seeing how well Clojure interoperates with Java, you will learn how to take advantage of this wonderful language and still use all the frameworks and features of the JVM.
Grunt is a JavaScript task runner that can automate front-end development workflows. It allows developers to define and run repetitive tasks like linting, minifying code, running tests, watching for file changes and more. Grunt has plugins for common tasks and allows developers to define custom tasks in a Gruntfile.js configuration file. Workflows can be created by combining tasks to run sequentially. This improves productivity by integrating tasks that were previously run separately into a single automated process.
The document discusses continuous delivery (CD) and continuous integration (CI). It defines CD as automatically deploying code changes to a staging environment after builds and tests pass, while CI involves continuous building and testing of code changes. The document outlines benefits of CD like quicker turnaround and less deployment risk. It also discusses requirements for CD like integration with source control management and automated deployments. Additionally, it proposes solutions for complex workflows, database changes, and monolithic applications in a CD pipeline.
Use Your MySQL Knowledge to Become a MongoDB GuruTim Callaghan
Leverage all of your MySQL knowledge and experience to get up to speed quickly with MongoDB.
Presented at Percona Live London 2013 with Robert Hodges of Continuent.
Puppet and Chef are popular configuration management tools that use code to define and automate infrastructure. Puppet uses a declarative domain-specific language (DSL) and model-based approach, while Chef uses Ruby scripts and a top-down execution model. Both tools allow defining reusable infrastructure components as modules/cookbooks and converge systems to their desired state. Puppet is open source while Chef offers commercial support plans starting at $120/month.
This document provides a summary of JavaScript DOM manipulations and events. It discusses how browsers render pages by creating DOM and render trees. It also covers how JavaScript can manipulate the DOM tree and add interactivity through event handling. Key topics include the event loop, capturing vs bubbling, and the DOM API for finding elements and modifying the document.
This document provides an overview and introduction to stORM, a simple template-based Object Relational Mapping (ORM) library for Android. Key points include that stORM aims to provide an easy and convention-based way to map Android objects to SQLite tables using annotations with minimal performance overhead. It generates DAO and table classes but does not support modeling all possible relations or achieving absolute maximum performance.
Issues and implementation of a process for creating a false digital alibi.
The aim is to produce a state of the personal computer that confirming a false digital alibi, following the execution of an automated procedure, without leaving any traces of automation. The aim is to answer to the questions:
1) How reliable is a digital alibi?
2) May have been artificially created?
Within the project, are discussed the issues to consider while creating a false alibi on a machine running Mac OS X and is demonstrated that it is possible to produce artificially "human" traces of machine use.
Backbone.js helps structure you javascript application code in a scalable way.
In this keynote I demonstrate how to use it in a simple walk-through example, and discuss the advantages of using an MVC framework.
Introduction to Node.js: perspectives from a Drupal devmcantelon
I gave a talk on November 25, 2010, on Node.js, and related technologies, to the Vancouver Drupal Users Group. The talk ran through why node.js is useful for realtime web apps, how to get it and Express up and running, and how to access data from Drupal and MongoDB.
Rapid Home Provisioning is a new feature in Oracle Grid Infrastructure 12c R2 that provides a simplified way to provision and patch Oracle software and databases. It uses a centralized management server and golden images stored on ACFS to deploy pre-packaged and patched Oracle homes to client nodes. Administrators can easily create working copies of golden images, deploy databases from the working copies, and seamlessly patch databases by moving them to a working copy based on a newer patched golden image with a single command.
The document discusses various strategies and techniques for capacity management of web operations, including forecasting future capacity needs, identifying ceilings for system resources, implementing safety factors, and performing diagonal scaling. It also provides examples of metrics used at Flickr for monitoring capacity and some "stupid capacity tricks" that can be employed in emergencies.
PL-4047, Big Data Workload Analysis Using SWAT and Ipython Notebooks, by Moni...AMD Developer Central
This document provides an overview of using the Synthetic Workload Analysis Toolkit (SWAT) and IPython notebooks to analyze big data workloads. SWAT is a software platform that automates the creation, deployment, execution, and data gathering of synthetic compute workloads on clusters. IPython notebooks can be used to interactively explore system logs gathered by SWAT to identify performance bottlenecks and optimize workloads. Graphs of resource utilization are generated to determine if the system is CPU-bound, disk-bound, or network-bound. This analysis helps tune workloads and characterize systems.
This presentation gives an overview of how we use Scala in Hulu's data platform, focusing on a couple of interesting features like its database interface layer (Slick), and parser combinators to implement DSLs
CouchDB is a document-oriented NoSQL database that stores data as documents with a flexible schema rather than tables. It allows for the storage of semi-structured data and uses JSON documents rather than rigid schemas. Documents are accessed and updated via a RESTful API and can be queried using views built with JavaScript MapReduce functions. The database supports features like replication for synchronization across machines and multi-master replication.
Troubleshooting Live Java Web Applicationsashleypuls
This talk examines methods and tools that can be used to uncover and resolve performance problems arising in Java web applications. It touches on a few common problems such as slow SQL and blocked threads. It uses various diagnostic tools to examine these problems including log files, jvisualvm, and New Relic. Finally, it evaluates the use of these tools in a production environment, separating them into what can and cannot be used in live production applications.
Delivered at Velocity Europe in Barcelona, this talk introduces "ops" people to the idea of user centered design, touching on several techniques long used in the design world, and talks about how those ideas might be applied to software and processes that we use every day.
Chef - Configuration Management for the CloudJames Casey
This document discusses using Chef for configuration management in the cloud. Chef allows infrastructure to be defined as code and automatically deployed across cloud providers. It provides tools to build and manage complex, evolving infrastructures through recipes, templates, and reusable cookbooks. Chef handles provisioning, configuration, application deployment, and allows infrastructure to be easily migrated across cloud platforms.
JavaOne 2013 - Clojure for Java DevelopersJan Kronquist
The fact that Clojure is a dialect of Lisp makes it feel completely alien to Java developers, and they miss the opportunity to learn this dynamic and functional programming language for the JVM. Clojure’s focus on immutability makes it very useful for concurrency. This presentation introduces Clojure in a way that feels natural to Java developers. By seeing how well Clojure interoperates with Java, you will learn how to take advantage of this wonderful language and still use all the frameworks and features of the JVM.
Grunt is a JavaScript task runner that can automate front-end development workflows. It allows developers to define and run repetitive tasks like linting, minifying code, running tests, watching for file changes and more. Grunt has plugins for common tasks and allows developers to define custom tasks in a Gruntfile.js configuration file. Workflows can be created by combining tasks to run sequentially. This improves productivity by integrating tasks that were previously run separately into a single automated process.
The document discusses continuous delivery (CD) and continuous integration (CI). It defines CD as automatically deploying code changes to a staging environment after builds and tests pass, while CI involves continuous building and testing of code changes. The document outlines benefits of CD like quicker turnaround and less deployment risk. It also discusses requirements for CD like integration with source control management and automated deployments. Additionally, it proposes solutions for complex workflows, database changes, and monolithic applications in a CD pipeline.
Use Your MySQL Knowledge to Become a MongoDB GuruTim Callaghan
Leverage all of your MySQL knowledge and experience to get up to speed quickly with MongoDB.
Presented at Percona Live London 2013 with Robert Hodges of Continuent.
Puppet and Chef are popular configuration management tools that use code to define and automate infrastructure. Puppet uses a declarative domain-specific language (DSL) and model-based approach, while Chef uses Ruby scripts and a top-down execution model. Both tools allow defining reusable infrastructure components as modules/cookbooks and converge systems to their desired state. Puppet is open source while Chef offers commercial support plans starting at $120/month.
This document provides a summary of JavaScript DOM manipulations and events. It discusses how browsers render pages by creating DOM and render trees. It also covers how JavaScript can manipulate the DOM tree and add interactivity through event handling. Key topics include the event loop, capturing vs bubbling, and the DOM API for finding elements and modifying the document.
This document provides an overview and introduction to stORM, a simple template-based Object Relational Mapping (ORM) library for Android. Key points include that stORM aims to provide an easy and convention-based way to map Android objects to SQLite tables using annotations with minimal performance overhead. It generates DAO and table classes but does not support modeling all possible relations or achieving absolute maximum performance.
Issues and implementation of a process for creating a false digital alibi.
The aim is to produce a state of the personal computer that confirming a false digital alibi, following the execution of an automated procedure, without leaving any traces of automation. The aim is to answer to the questions:
1) How reliable is a digital alibi?
2) May have been artificially created?
Within the project, are discussed the issues to consider while creating a false alibi on a machine running Mac OS X and is demonstrated that it is possible to produce artificially "human" traces of machine use.
Backbone.js helps structure you javascript application code in a scalable way.
In this keynote I demonstrate how to use it in a simple walk-through example, and discuss the advantages of using an MVC framework.
Introduction to Node.js: perspectives from a Drupal devmcantelon
I gave a talk on November 25, 2010, on Node.js, and related technologies, to the Vancouver Drupal Users Group. The talk ran through why node.js is useful for realtime web apps, how to get it and Express up and running, and how to access data from Drupal and MongoDB.
Rapid Home Provisioning is a new feature in Oracle Grid Infrastructure 12c R2 that provides a simplified way to provision and patch Oracle software and databases. It uses a centralized management server and golden images stored on ACFS to deploy pre-packaged and patched Oracle homes to client nodes. Administrators can easily create working copies of golden images, deploy databases from the working copies, and seamlessly patch databases by moving them to a working copy based on a newer patched golden image with a single command.
The document discusses various strategies and techniques for capacity management of web operations, including forecasting future capacity needs, identifying ceilings for system resources, implementing safety factors, and performing diagonal scaling. It also provides examples of metrics used at Flickr for monitoring capacity and some "stupid capacity tricks" that can be employed in emergencies.
PL-4047, Big Data Workload Analysis Using SWAT and Ipython Notebooks, by Moni...AMD Developer Central
This document provides an overview of using the Synthetic Workload Analysis Toolkit (SWAT) and IPython notebooks to analyze big data workloads. SWAT is a software platform that automates the creation, deployment, execution, and data gathering of synthetic compute workloads on clusters. IPython notebooks can be used to interactively explore system logs gathered by SWAT to identify performance bottlenecks and optimize workloads. Graphs of resource utilization are generated to determine if the system is CPU-bound, disk-bound, or network-bound. This analysis helps tune workloads and characterize systems.
This presentation gives an overview of how we use Scala in Hulu's data platform, focusing on a couple of interesting features like its database interface layer (Slick), and parser combinators to implement DSLs
CouchDB is a document-oriented NoSQL database that stores data as documents with a flexible schema rather than tables. It allows for the storage of semi-structured data and uses JSON documents rather than rigid schemas. Documents are accessed and updated via a RESTful API and can be queried using views built with JavaScript MapReduce functions. The database supports features like replication for synchronization across machines and multi-master replication.
Troubleshooting Live Java Web Applicationsashleypuls
This talk examines methods and tools that can be used to uncover and resolve performance problems arising in Java web applications. It touches on a few common problems such as slow SQL and blocked threads. It uses various diagnostic tools to examine these problems including log files, jvisualvm, and New Relic. Finally, it evaluates the use of these tools in a production environment, separating them into what can and cannot be used in live production applications.
Delivered at Velocity Europe in Barcelona, this talk introduces "ops" people to the idea of user centered design, touching on several techniques long used in the design world, and talks about how those ideas might be applied to software and processes that we use every day.
The document discusses web APIs and related concepts. It defines a web API as being based on core web protocols like HTTP, URIs, and media types. It explains that HTTP is an application-level protocol for distributed information systems, and describes some common uses of HTTP like data transportation and CRUD operations. It also defines URIs and APIs, and discusses the data-oriented and control-oriented approaches to web APIs, including examples of each.
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceIndexBug
Imagine a world where machines not only perform tasks but also learn, adapt, and make decisions. This is the promise of Artificial Intelligence (AI), a technology that's not just enhancing our lives but revolutionizing entire industries.
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2024/06/building-and-scaling-ai-applications-with-the-nx-ai-manager-a-presentation-from-network-optix/
Robin van Emden, Senior Director of Data Science at Network Optix, presents the “Building and Scaling AI Applications with the Nx AI Manager,” tutorial at the May 2024 Embedded Vision Summit.
In this presentation, van Emden covers the basics of scaling edge AI solutions using the Nx tool kit. He emphasizes the process of developing AI models and deploying them globally. He also showcases the conversion of AI models and the creation of effective edge AI pipelines, with a focus on pre-processing, model conversion, selecting the appropriate inference engine for the target hardware and post-processing.
van Emden shows how Nx can simplify the developer’s life and facilitate a rapid transition from concept to production-ready applications.He provides valuable insights into developing scalable and efficient edge AI solutions, with a strong focus on practical implementation.
How to Get CNIC Information System with Paksim Ga.pptxdanishmna97
Pakdata Cf is a groundbreaking system designed to streamline and facilitate access to CNIC information. This innovative platform leverages advanced technology to provide users with efficient and secure access to their CNIC details.
Best 20 SEO Techniques To Improve Website Visibility In SERPPixlogix Infotech
Boost your website's visibility with proven SEO techniques! Our latest blog dives into essential strategies to enhance your online presence, increase traffic, and rank higher on search engines. From keyword optimization to quality content creation, learn how to make your site stand out in the crowded digital landscape. Discover actionable tips and expert insights to elevate your SEO game.
Dr. Sean Tan, Head of Data Science, Changi Airport Group
Discover how Changi Airport Group (CAG) leverages graph technologies and generative AI to revolutionize their search capabilities. This session delves into the unique search needs of CAG’s diverse passengers and customers, showcasing how graph data structures enhance the accuracy and relevance of AI-generated search results, mitigating the risk of “hallucinations” and improving the overall customer journey.
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!SOFTTECHHUB
As the digital landscape continually evolves, operating systems play a critical role in shaping user experiences and productivity. The launch of Nitrux Linux 3.5.0 marks a significant milestone, offering a robust alternative to traditional systems such as Windows 11. This article delves into the essence of Nitrux Linux 3.5.0, exploring its unique features, advantages, and how it stands as a compelling choice for both casual users and tech enthusiasts.
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slackshyamraj55
Discover the seamless integration of RPA (Robotic Process Automation), COMPOSER, and APM with AWS IDP enhanced with Slack notifications. Explore how these technologies converge to streamline workflows, optimize performance, and ensure secure access, all while leveraging the power of AWS IDP and real-time communication via Slack notifications.
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
2. ABOUT ME
Software Architect at AzRy LLC
Assistant Professor at CST
Ph.D Student at Technical University of
Georgia
V8 Contributor
Wednesday, December 25, 13
3. ABOUT NODE.JS
Released in 2009 by Ryan Dahl
Is built on V8 JavaScript Engine
Based on event-driven non-blocking I/O
Platform for fast and scalable network apps
Wednesday, December 25, 13
4. WHAT MAKES IT AWESOME?
Easy of use
Server side JavaScript
Active community
Repository of awesome modules
npm install [module name]
Wednesday, December 25, 13
6. WELL, NO
Built on V8 JavaScript engine
Node.js never blocks on I/O operations
You do not need to manage threads
No expensive context switching
No memory waste on execution stacks
Wednesday, December 25, 13
7. V8 ADVANTAGES
Fastest JavaScript runtime
No JIT, it compiles JavaScript into
Assembler
Short(really short) garbage collector cycles
Great implementation of EcmaScript 5 and
EcmaScript 6
Wednesday, December 25, 13
11. TYPICAL CODE EXAMPLE
var query = "SELECT * FROM t";
var result = db.query(query);
while(result.hasNext()) {
print(result.next());
}
db.free(result);
Wednesday, December 25, 13
12. NON BLOCKING EXAMPLE
var query = "SELECT * FROM t";
db.query(query, function(result) {
while(result.hasNext()) {
print(result.next());
}
});
// do something here
Wednesday, December 25, 13
13. FILE I/O EXAMPLE
$file = fopen("file.txt", "r");
while(!feof($file)){
$line = fgets($file);
// do something with line
}
fclose($file);
Wednesday, December 25, 13
14. ASYNC I/O WITH FILES
function readFile(file) {
var br = new BufferedReader(file, ...);
br.on("error", function(error) {
// handle error
}).on("line", function(line) {
// do something meaningful with line
}).on("end", function() {
// we are done
}).read();
}
readFile("/path/to/file");
Wednesday, December 25, 13
18. PROGRAM EXECUTION
FLOW
fn0();
I/O is handled
asynchronously
Wednesday, December 25, 13
fn1();
NETWORK I/O
fn2();
FS I/O
fn3();
Program never waits for I/
O operations completion
DB I/O
FS I/O