New Impress Application Server Functionality for Node.js

    I am providing you with a brief report on changes in Impress AS over the past few months. Firstly, we did not go through the frameworks, but rushed into the sphere of application servers , providing scaling in two directions: (1) many applications on one server and (2) many servers for one application. The first direction required the development of sandboxing (screening applications from each other and from the startup environment), and the second direction involved the transition from a cluster to a multi-server cloud. Here we need to clarify the terminology, in the node cluster (cluster) is called the method of multi-threaded application startup in master / worker mode, therefore, we will call a multi-server infrastructure (with a cluster on each server) cloud (orapplication cloud ). This cloud is not connected with the virtualization of the operating system, as it is usually falsely associated with the understanding of the masses. Cloud technologies do not have to be organized on the basis of virtualization technologies, but now there is no other easy way to scale for mass consumption. Cloud virtualization does not guarantee endless virtualization of application applications , and all developers of large, highly loaded systems know that for hundreds of thousands and tens of millions of users, special application solutions must be created that provide application virtualization, spreading tasks on servers and combining them into one, distributed, but centrally managed system. This is the problem we undertook to solve in Impress, I hope I defended the terminology and can proceed to the details.

    Innovations and Versions


    Now there are two current versions 0.0.71 and 0.1.2, which can be installed respectively:
    npm install impress@0.0.71     # старый стиль приложений с поддержкой развертывания на множество серверов
    npm install impress@0.1.2      # новый стиль приложений с сендбоксингом и поддержкой множества серверов
    

    All New Year's holidays were cynically spent on the implementation of sandboxing and deep refactoring of Impress. Up to 80% of the kernel was rewritten and version 0.1.2 was tested on applications written for 0.0.71 with their minimal correction. Functionally, in these versions everything is the same, except for sandboxing and features of writing applications. Refactoring from the old style to the new is very simple and comes down to replacing the call to the application server API. One of these days I will release a small porting instruction, as there are already a sufficient number of external developers using Impress; I would not want to give them such a gift on NG. With the instructions, they will cope with porting in a few minutes, I hope.

    So, the functional innovations present in both versions:
    • The implementation of interprocess communication in the form of broadcast messages between processes through ZeroMQ ( interserver interaction) andIPC (within the same server). This is necessary so that users glued to their process can interact with each other.
    • Added support for WebSocket (it has long been requested) and updated implementation of Server-Sent Events . The demo application has examples of their use. Moreover, these protocols can be accessed on the same port (for example 80), where applications give their pages, just at a different URL, which allows to do without CORS (cross-domain requests, and the other port, for some reason, is already considered a different domain) .
    • Many dependencies are removed , and modules are only used if they are installed and added to the configuration. This is all thanks to the geoip-lite library , which suddenly decided to leave 120MB of temporary files and heavy database drivers, which are not all needed right away. I already sent the patch for geoip-lite to the author, it isn’t in npm yet, but to whom it’s critical - install it via github, here it is already available . UPD : just 2014-01-13 the new version hit npm.
    • The caching of templates, statics, and business logic processors has been optimized, including tracking of the file system and updating the cache when changing files on the disk have been optimized. And in the new version, caching is completely rewritten to provide screening of applications in sandboxes.

    Slide to lure to view the presentation (clickable)


    Now, for the sake of persuasiveness, I will show a cool slide from the presentation . The code examples in the presentation are relevant only for version 0.0.71, and the bulletinous pathos texts are also relevant for 0.1.2, so look at it to get a general idea of ​​the application server. There is also an English version of the presentation. I understand that for a deep familiarization with Impress, good screencasts, various examples and articles explaining these examples are absolutely necessary, they are being prepared and will be available soon. Regarding support, the intensity of development and release of versions, the activity of correcting detected bugs and wishes for revision, you can add up to the impression on Github . Feel free to send questions and post issues. in Russian or English.

    References


    On Github: https://github.com/tshemsedinov/impress
    At npm: https://npmjs.org/package/impress

    Also popular now: