Container technology is one of the best options for software development and deployment. It allows you to share some of the OS resources while encapsulating the code and other concerns. You can think of containers as virtual machines but with less footprint.
Containers are great for micro services where you replace monoliths with many services. Each of them works in isolation and communicates with other services via a well defined interface (typically REST).
Docker is one of the most popular implementations of containers. Docker’s What is Docker? page has a a neat comparison of containers with VMs. In a nutshell, VMs use hypervisor and each VM has it’s own OS while containers share OS and only separate libraries, bin, executables, etc.
This project will guide you through building an autocomplete function similar to the one that you might see in Slack (a popular messaging app), as shown in figure 1, when you type something in the search box. For simplicity, our widget will work with room names (the rooms in a chat application).
The autocomplete widget will have (figure 2):
An input field
A list of options filtered according to the entered characters
An Add button (figure 3)
The filtering of the matches will be done using the entered characters as the first characters of the option. In other words, there is a simple comparison that allows us to autocomplete the name of the room (figure X). For example, if you type “mac” and you have “Mac OS X” and “Apple Mac,” then only “Mac OS X” will be shown as a match, not both options.
In this book, I’ll introduce you to React Native for native mobile iOS and Android development… and do it quickly. We’ll cover topics such as
Why React Native is Awesome
Setting up React Native Development for iOS
Hello World and the React Native CLI
Styles and Flexbox
Main React Native UI components
Importing Modules into an Xcode Project
Project: Weather App
This book is about getting started with React quickly and not about React Native, which is technically a separate library (or some might even call it a framework). But I figured after eight chapters of working with React for web development, it would be fun to apply our knowledge to mobile development by leveraging this awesome library. You’ll be amazed how many React Native skills you already know from React.
In the previous post, we learned how to perform HTTP/2 server push in a Node server. We also covered the benefits of server push there so to avoid duplication we won’t list them here. We used spdy for server push and H2. But most of the times Node developers don’t work with core HTTP server, they use a framework like Express. So let’s see how we can implement server push in Express.
HTTP/2 is the new standard of the web. It has many great features which will make the web faster and simplify the development. For example, no need to concatenate files thanks to multiplexing, or a server push which can send files before a browser knows it need them.
This post won’t cover all advantages of HTTP/2. You can read about them online. No need to go into all the details and duplicate text here. Instead, we’ll focus on server push and implement it in Node.js using Express and the spdy library.
HTTP2 is the first major upgrade to the good old HTTP protocol in over 15 years (first HTTP is circa 1991)! It is optimized for modern websites. The performance is better without complicated hacks like domain sharding (having multiple domains) or file concatenation (having one large file instead of many small ones).
There’s a better alternative to the ubiquitous JSON as the communication protocol of the web. It’s Protocol Buffers (protobuf). In a nutshell, protobuf offers a more dense format (faster processing) and provides data schemas (enforcement of structure and better compatibility with old code).
The purpose of this article is not to highlight why protobufs are better or sell you on the concept. There are many article online that’ll do it for you. The purpose of this article is to show you how you can get started with this format in the Node.js environment.
This post has been written by Scott Hasbrouck. You can find him on Twitter or his website.
This is a kitchen sink of subjectively the most interesting core features. The key takeaways of this essay are:
Event loop: Brush-up on the core concept which enables non-blocking I/O
Global and process: How to access more info
Event emitters: Crash course in the event-based pattern
Streams and buffers: Effective way to work with data
Clusters: Fork processes like a pro
Handling async errors: AsyncWrap, Domain and uncaughtException
C++ addons: Contributing to the core and writing your own C++ addons
We can start with event loop which is at the core of Node.
Node.js Non-Blocking I/O
It allows processing of other tasks while IO calls are in the process. Think Nginx vs. Apache. It allows Node to be very fast and efficient because blocking I/O is expensive!
Take look at this basic example of a delayed println function in Java: