Автоматизированная система Промышленная безопасность и охрана труда

Обновления главной ленты блогов
Вконтакте Facebook Twitter RSS Почта Livejournal
Внимание

На нашем портале можно бесплатно публиковать информацию о своей компании, размещать товары и услуги и цены на них.
Ведите свой личный или корпоративный блог и его ежедневно увидят 30 тысяч посетителей нашего сайта.

Блоги

Ключевое слово:
  • IT news
    IT news, Июль, 26

    Proponents of Rust, the language engineered by Mozilla to give developers both speed and memory safety, are stumping for the language as a long-term replacement for C and C++. But replacing software written in these languages can be a difficult, long-term project.


    ( Читать дальше )

  • IT news
    IT news, Июль, 24

    Scalability, latency, and throughput are key performance indicators for web servers. Keeping the latency low and the throughput high while scaling up and out is not easy. Node.js is a JavaScript runtime environment that achieves low latency and high throughput by taking a “non-blocking” approach to serving requests. In other words, Node.js wastes no time or resources on waiting for I/O requests to return.

    Let me explain…

    In the traditional approach to creating web servers, for each incoming request or connection the server spawns a new thread of execution or even forks a new process to handle the request and send a response. Conceptually, this makes perfect sense, but in practice it incurs a great deal of overhead.

    [ Also on InfoWorld: 6 best JavaScript IDEs and 10 best JavaScript editors. | Keep up with hot topics in programming with InfoWorld’s App Dev Report newsletter. ]

    While spawning threads incurs less memory and CPU overhead than forking processes, it can still be inefficient. The presence of a large number of threads can cause a heavily loaded system to spend precious cycles on thread scheduling and context switching, which adds latency and imposes limits on scalability and throughput.

    Node.js takes a different approach. It runs a single-threaded event loop registered with the system to handle connections, and each new connection causes a JavaScript callback function to fire. The callback function can handle requests with non-blocking I/O calls, and if necessary can spawn threads from a pool to execute blocking or CPU-intensive operations and to load-balance across CPU cores. Node’s approach to scaling with callback functions requires less memory to handle more connections than most competitive architectures that scale with threads, including Apache HTTP Server, the various Java application servers, IIS and ASP.NET, and Ruby on Rails.

    Node.js turns out to be quite useful for desktop applications in addition to servers. Also note that Node applications aren’t limited to pure JavaScript. You can use any language that transpiles to JavaScript, for example TypeScript and CoffeeScript. Node.js incorporates the Google Chrome V8 JavaScript engine, which supports ECMAScript 2015 (ES6) syntax without any need for an ES6-to-ES5 transpiler such as Babel.

    Much of Node’s utility comes from its large package library, which is accessible from the npm command. NPM, the Node package manager, is part of the standard Node.js installation, although it has its own website.

    Some JavaScript history

    In 1995 Brendan Eich, then a contractor to Netscape, created the JavaScript language to run in Web browsers—in 10 days, as the story goes. JavaScript was initially intended to enable animations and other manipulations of the browser document object model (DOM). A version of JavaScript for the Netscape Enterprise Server was introduced shortly afterwards.

    The name JavaScript was chosen for marketing purposes, as Sun’s Java language was widely hyped at the time. In fact, the JavaScript language was actually based primarily on the Scheme and Self languages, with superficial Java-like semantics.

    Initially, many programmers dismissed JavaScript as useless for “real work” because its interpreter ran an order of magnitude more slowly than compiled languages. That changed as several research efforts aimed at making JavaScript faster began to bear fruit. Most prominently, the open-source Google Chrome V8 JavaScript engine, which does just-in-time compilation, inlining, and dynamic code optimization, can actually outperform C++ code for some loads, and outperforms Python for most use cases.

    The JavaScript-based Node.js platform was introduced in 2009, by Ryan Dahl, for Linux and MacOS, as a more scalable alternative to the Apache HTTP Server. NPM, written by Isaac Schlueter, launched in 2010. A native Windows version of Node.js debuted in 2011.

    Joyent owned, governed, and supported the Node.js development effort for many years. Since 2015, the Node.js project has belonged to the Node.js Foundation, governed by the foundation’s technical steering committee. Node.js has also been embraced as a Linux Foundation Collaborative Project.

    Basic Node.js architecture

    At a high level, Node.js combines the Google V8 JavaScript engine, a single-threaded non-blocking event loop, and a low-level I/O API. The stripped-down example code shown below illustrates the basic HTTP server pattern, using ES6 arrow functions (anonymous Lambda functions declared using the fat arrow operator, =>) for the callbacks.

    nodejs server lg
    ( Читать дальше )

  • IT news
    IT news, Июль, 24

    Scalability, latency, and throughput are key performance indicators for web servers. Keeping the latency low and the throughput high while scaling up and out is not easy. Node.js is a JavaScript runtime environment that achieves low latency and high throughput by taking a “non-blocking” approach to serving requests. In other words, Node.js wastes no time or resources on waiting for I/O requests to return.

    Let me explain…

    In the traditional approach to creating web servers, for each incoming request or connection the server spawns a new thread of execution or even forks a new process to handle the request and send a response. Conceptually, this makes perfect sense, but in practice it incurs a great deal of overhead.

    [ Also on InfoWorld: 6 best JavaScript IDEs and 10 best JavaScript editors. | Keep up with hot topics in programming with InfoWorld’s App Dev Report newsletter. ]

    While spawning threads incurs less memory and CPU overhead than forking processes, it can still be inefficient. The presence of a large number of threads can cause a heavily loaded system to spend precious cycles on thread scheduling and context switching, which adds latency and imposes limits on scalability and throughput.

    Node.js takes a different approach. It runs a single-threaded event loop registered with the system to handle connections, and each new connection causes a JavaScript callback function to fire. The callback function can handle requests with non-blocking I/O calls, and if necessary can spawn threads from a pool to execute blocking or CPU-intensive operations and to load-balance across CPU cores. Node’s approach to scaling with callback functions requires less memory to handle more connections than most competitive architectures that scale with threads, including Apache HTTP Server, the various Java application servers, IIS and ASP.NET, and Ruby on Rails.

    Node.js turns out to be quite useful for desktop applications in addition to servers. Also note that Node applications aren’t limited to pure JavaScript. You can use any language that transpiles to JavaScript, for example TypeScript and CoffeeScript. Node.js incorporates the Google Chrome V8 JavaScript engine, which supports ECMAScript 2015 (ES6) syntax without any need for an ES6-to-ES5 transpiler such as Babel.

    Much of Node’s utility comes from its large package library, which is accessible from the npm command. NPM, the Node package manager, is part of the standard Node.js installation, although it has its own website.

    Some JavaScript history

    In 1995 Brendan Eich, then a contractor to Netscape, created the JavaScript language to run in Web browsers—in 10 days, as the story goes. JavaScript was initially intended to enable animations and other manipulations of the browser document object model (DOM). A version of JavaScript for the Netscape Enterprise Server was introduced shortly afterwards.

    The name JavaScript was chosen for marketing purposes, as Sun’s Java language was widely hyped at the time. In fact, the JavaScript language was actually based primarily on the Scheme and Self languages, with superficial Java-like semantics.

    Initially, many programmers dismissed JavaScript as useless for “real work” because its interpreter ran an order of magnitude more slowly than compiled languages. That changed as several research efforts aimed at making JavaScript faster began to bear fruit. Most prominently, the open-source Google Chrome V8 JavaScript engine, which does just-in-time compilation, inlining, and dynamic code optimization, can actually outperform C++ code for some loads, and outperforms Python for most use cases.

    The JavaScript-based Node.js platform was introduced in 2009, by Ryan Dahl, for Linux and MacOS, as a more scalable alternative to the Apache HTTP Server. NPM, written by Isaac Schlueter, launched in 2010. A native Windows version of Node.js debuted in 2011.

    Joyent owned, governed, and supported the Node.js development effort for many years. Since 2015, the Node.js project has belonged to the Node.js Foundation, governed by the foundation’s technical steering committee. Node.js has also been embraced as a Linux Foundation Collaborative Project.

    Basic Node.js architecture

    At a high level, Node.js combines the Google V8 JavaScript engine, a single-threaded non-blocking event loop, and a low-level I/O API. The stripped-down example code shown below illustrates the basic HTTP server pattern, using ES6 arrow functions (anonymous Lambda functions declared using the fat arrow operator, =>) for the callbacks.

    nodejs server lg
    ( Читать дальше )

  • IT news
    IT news, Июль, 24

    Go, Google’s open source, concurrency-friendly programming language, has soared to new heights with developers, cracking the top 10 in the Tiobe index of language popularity for the first time.


    ( Читать дальше )

  • IT news
    IT news, Июль, 24

    Python has been described as an easy language—both easy to learn and easy to use. Python makes it easy to develop powerful software for an enormous variety of applications. But it can be as difficult to get started with Python as it is with any other programming language. Every choice you make wi…
    ( Читать дальше )

  • IT news
    IT news, Июль, 24

    Go, Google’s open source, concurrency-friendly programming language, has soared to new heights with developers, cracking the top 10 in the Tiobe index of language popularity for the first time.


    ( Читать дальше )

  • IT news
    IT news, Июль, 23

    As a junior network engineer at a university I wrote a lot of management scripts in Perl.  I had scripts to do things such as check switchport configurations and upgrade switch code. Times have changed a lot since then. The university’s web server now runs in the cloud, rather than on my personal workstation, and Python has surpassed Perl  as the scripting language du jour. Network automation now has a major focus with Python as an extremely important tool.

    Today I’m going to show you how to use Python scripts hosted on the box and integrated into IOS. This is far more powerful than my earlier-career scripts, and I have some simple examples for PCI compliance, Dynamic DNS ACL updates, and configuration validation.

    As with many things in IT, we seem to be continually oscillating between “centralized” and “distributed.”  On-box hosting of Python scripts is an example of moving back toward distributed. My view on the argument is that it’s never about the extremes, but more about the balance—a bit like a pendulum constantly swinging as technology advances change what’s possible and practical.

    cisco9 image1
    ( Читать дальше )

  • IT news
    IT news, Июль, 15

    The official Golang blog has provided the first concrete details about the next version of Google’s Go language, which is used to create popular applications like Docker and Kubernetes, as well as to incrementally replace critical internet infrastructure.


    ( Читать дальше )

  • IT news
    IT news, Июль, 10

    What if every time you wanted to roll out an app, you didn’t need to figure out what new computer/server you were going to put it on? What if I told you that there were computer resources built into your network? And what if I told you they even had access to serial ports for IoT devices? Shall we talk?

    You may have seen Cisco’s announcements over the last few weeks about the new network. Intuitive. If not, here’s a little article by Jeff McLaughlin, that describes some of the new things you can do with the new network. In another article, Hank Preston discusses what may be the easiest way for a network engineer to get started.

    Today I thought I would go into a little bit more detail about application hosting on Cisco network hardware. So if you are in any way associated with putting applications into branch offices or remote locations, I hope you will find this to be an interesting read. My personal opinion is that application hosting on Cisco hardware is one of the coolest things we’ve added since we added voice – and I think we all know that was a big deal that created big change. I’m willing to bet this is going to create big change as well.

    Why host apps on a router?Use Case #1

    Imagine you want to run a small program at a branch office. What have you done in the past? I think what most folks have done is to install some sort of compute appliance. That network diagram would look something like this:

    figure 1
    ( Читать дальше )

  • IT news
    IT news, Июнь, 30

    On June 20th, Cisco unveiled “The Network. Intuitive.” and with it is "Introducing an entirely new era of networking." If you're like me, you’re likely intrigued and asking yourself, “How do I get started?”


    ( Читать дальше )