Share
Embed
Technologies to build Successful Products
Presentation slides for UNICON at NUS in Singapore, Feb 24th 2018.
Jacopo Daeli
February 24, 2018
Transcript
43 slides
-
Technologies to build successful (web) products Jacopo Daeli Lead Software
Engineer @ GoDaddy UNICON, NUS Singapore, Feb 24th 2018 -
Summary Technologies to quickly build and easily maintain your
product Technologies to run and scale your product to millions of users -
Node.js Node.js is a runtime for JavaScript With
Node you can run JS code server side It has non-blocking I/O operations (Asynchronous) It is event driven (Event Loop) Event Loop is single threaded -
Node.js Event Loop It allows Node to perform non-blocking
I/O operations It offloads operations to the System Kernel whenever possible Modern Kernels are multi-threaded and they can handle multiple operations in background When an operation completes, the Kernel tells Node so that the appropriate callback is added to the Poll Event Loop queue to be executed -
Node.js It is the fastest growing open source platform
in the world Currently Node counts more than twice modules than is next competitor (Java) Node.js has more than half million modules published More than 450 new packages are published everyday Number of modules Source: http://www.modulecounts.com -
Node.js Node has an estimated 7M users and is consistently
growing at 100% per year. Source: https://nodejs.org/metrics -
Node.js 81% (estimated) of the Node.js users have 3 years
or less experience with Node. Source: https://nodejs.org/metrics -
Node.js is a Full Stack ecosystem Web Frontend
Mobile & Tablets Desktop Cloud Backend IoT Devices 3rd Party API & SOA -
Node.js is a Full Stack ecosystem Node is the
perfect platform to deal with all these components Node brings the accessibility and ubiquity of the web platform and of JavaScript to all these different areas You can use Node in a variety of different places among relatively small teams -
Web Frontend Web Frontend development has changed drastically in
the past 20 years The community developed amazing tools in Node.js and JavaScript to help developers build front-end applications -
Web Frontend Babel for transpiling your JavaScript code
Standard and ESLint to maintain your code quality with ease JSHint to help detecting errors and potential problems in your JavaScript code Stylus, LESS, ect. for better writing CSS -
Web Frontend There are so many tools, that the
community wrote more tools to help you manage all these tools Examples: Gulp, Browserify, WebPack, etc. -
React.js It rethought about front-end framework very differently
The main idea is that a web framework should exists in this compiled chain where we have access to Node.js -
Mobile & Tablets Apache Cordova, previously known as PhoneGap
Cordova brings the entire Web platform to iOS, Android and Windows Phone using Node It is a Node tool chain that brings the entire Node ecosystem across all these different devices -
Desktop Desktop Development is not dead People still
want to build Desktop applications Github built Electron (ex- Atom Shell) -
Electron Electron “merges” Chromium with Node.js It brings
the Web Platform and the entire Node ecosystem to Desktop Development It allows developers to build cross-platform (Mac OS, Linux and Windows ) Desktop applications using HTML, JavaScript and CSS -
Cloud Backend Node was built for Cloud Services
It always had a great Cloud story Every well-known Cloud Provider supports Node out of the box and have a pretty good Node support Example: Google App Engine, AWS Elastic Beanstalk, Heroku, etc. -
Serverless and Function as a Service Nowadays we are
moving into the Function as a Service (or Serverless) space Developers can build their applications out of these discrete functions Disclaimer !: these functions run on servers, but developers don’t have to worry about it -
Serverless and Function as a Service Node has been
supported since the beginning (Functions can be written in Node) by Cloud vendors because Node is optimized to run in a single process, with a limited memory space, and it is great to handle a lot of I/O operations Node starts up quickly These are very important requirements to successfully running in these Cloud Function services Indeed, we need a really fast startup timing to be really efficient in a space with very limited resources Moore’s Law still making computers faster, but we are keeping optimizing resources using less and less of a slice of that computer to run our applications -
IoT Devices Everyone wants a button to do everything
! Starting in 2012 the Node ecosystem started to see a big rise in Robots People working at jQuery built a framework to build Robots in JS called “johnny-five” Over 75 developers contributed to the project -
IoT Devices IoT manufactures started to support Node natively
on their products Basically today, every new board that’s coming out as an integrated circuit for people’s IoT devices has first-class Node support IoT manufactures know that the best way to bring developers to their platform is to bring the entire Node ecosystem to their platform as well -
3rd Party API & SOA Everyone uses APIs to
build their applications today For example, Twilio for Text Messages, Mixpanel for Analytics, Google Speech for Speech Recognition, etc. Most of these API have Node support (SDK) -
Why I love working with Node Node doesn’t simply
making programming easier Node drastically reduces the entry barrier for new developers to come into all these different spaces -
Docker Docker is a Linux virtualization technology. It lets
us package and ship our applications and everything it needs to execute into a standard format Docker containers are similar to VMs. Our apps run on what seems to be a dedicated hardware instance. Each container has its own virtualized Filesystem, Memory, Storage, CPU cycles, etc. Each container is completely isolated from the other containers running on the same machine -
Docker Docker, in contrast with classic VMs, virtualizes the
Operating System Kernel, not the hardware. Therefore containers must run Linux. Docker starts with a Linux Kernel that all containers use. Then it layers all the differences on top of the Kernel. Therefore containers do not run the entire operating system. This makes containers lean. -
Docker Dockerfiles are like stackable bricks We begin
by saying what we we’re starting with, and then we describe only what’s different Packaging apps in Docker containers allows your application to run the same in all your environments: development, staging, production, etc. -
Node+Docker Step 1. Write the Dockerfile Step 2. Build the
Docker image Step 3. Run the Docker container -
Node+Docker Start with Node 8.x (Carbon) – It refers to
another Dockerfile -
Node+Docker Start with Node 8.x (Carbon) – It refers to
another Dockerfile Install dependencies -
Node+Docker Start with Node 8.x (Carbon) – It refers to
another Dockerfile Install dependencies Expose TCP port -
Node+Docker Start with Node 8.x (Carbon) – It refers to
another Dockerfile Install dependencies Expose TCP port Provide defaults for executing the container -
Docker Hub Docker Hub is a public Dockerfile registry
Like NPM (Node.js modules) but for Dockerfiles -
Kubernetes Open-source system for automatic deployment, scaling and management
of containerized applications Project started at Google to run billions of containers a week Kubernetes is great to run your app containers in production, because it can scale without requiring any extra Ops efforts It gives you freedom to run it anywhere, hybrid or public cloud Both Google Cloud Platform and Amazon Web Services also offer Kubernetes as a Service (Google Container Engine, Amazon Elastic Container Service) Managed K8S make it easy for you to run K8S in the cloud without needing to install and operate your own clusters -
Kubernetes Features Automatic binpacking Self-healing Horizontal Scaling
Service Discovering and Load Balancing Automated rollouts and rollbacks Secret and configuration management -
Appendix 2 – React Native React Native lets you
build Native apps with only JavaScript With React Native, you don't build a "mobile web app", an "HTML5 app", or a "hybrid app". You build a real mobile app that's indistinguishable from an app built using Objective-C or Java. React Native uses the same fundamental UI building blocks as regular iOS and Android apps. You just put those building blocks together using JavaScript and React.