New Total.js Framework version 2.6

Tue May 30 2017 07:59:56 GMT+0200 (Central European Summer Time), Peter Širka

New Total.js version 2.6

This version is more of a hotfix than a new version, but so many changes forced me to create a new release v2.6. Please upgrade your Total.js from NPM $ npm install total.js or Download Total.js from GitHub directly.

News

Node.js Cluster

I have added a support for Node.js cluster. It's experimental functionality and so far it seems to work as expected.

Easy way to run Total.js in a cluster:

const options = {};

options.ip = '0.0.0.0';
options.port = 8001;

// F.cluster.http(THREAD_COUNT, mode, [options])
require('total.js').cluster.http(4, 'release', options);
// or require('total.js').cluster.http('auto', 'release', options);

Improved schemas

Schema can inherit from another schema. A new asynchronous method schema.inherit() copies all fields, validation, preparations, default values, transformations, workflows, hooks, operations and CRUD operations from inherited schema.

NEWSCHEMA('Person', function(schema) {
    schema.define('name', String, true);
    schema.define('age', Number, true);
});

NEWSCHEMA('Customer', function(schema) {

    // Inheritance (+ it's asynchronous)
    schema.inherit('Person');

    // Define another fields
    schema.define('email', 'Email', true);
});

A support for another HTTP module

This is the answer to these Performance tests on GitHub. Some frameworks use uws library which is a custom HTTP server written in C. I have also wrapped Total.js using uws but it can't parse request.body and therefore isn't applicable in production.

require('total.js');

// Runs the framework using custom HT
F.custom(mode, http, request_prototype, response_prototype, [options]);

Total.js Watcher

Watcher replaces debug.js file and it's in Total.js core. So the code below runs the application and Total.js Watcher watches all changes. When a change is detected the Watcher restarts the app automatically.

Without options:

// Runs the current app with a watcher
require('total.js/debug');

With options:

// ===================================================
// FOR DEVELOPMENT
// Total.js - framework for Node.js platform
// https://www.totaljs.com
// ===================================================

const options = {};

// options.ip = '127.0.0.1';
// options.port = parseInt(process.argv[2]);
// options.config = { name: 'Total.js' };
// options.sleep = 3000;
// options.inspector = 9229;
// options.debugger = 40894;

require('total.js/debug')(options);

Improvements

  • improved sorting in NoSQL embedded database
  • improved processing of all requests

Bug fixes

  • fixed controller.send() a bad declaration of connection.id for id and blacklist arguments
  • fixed a waiting mode in GETSCHEMA()
  • fixed cache instance.cache() in RESTBuilder
  • fixed NoSQL filtering in builder.or() and builder.and() commands (critical)
  • fixed a bug in ImageMagick/GraphicsMagick when the path contains spaces (critical)
  • fixed controller.memorize() (critical)

These bugs show me how great Total.js Framework is. Total.js website was facing more than 1000 requests per second previous month and sometimes the CMS crashed. I took me a while to figure out that controller.memorize() doesn't work correctly, basicly the caching didn't work. Then i also realized that i added Total.js Flow to the CMS running on Total.js website and created a flow to do Geolocation by IP for each GET request. So caching not working and geolocation for each GET request, it's unbelievable what the framework managed to handle.


Become a Premium Member and support our developement.


Tags

Follow us

Latest blogs
Flow v6 is here!
Thu Mar 07 2019 11:53:54 GMT+0100 (Central European Standard Time)
A critical security fix
Wed Feb 13 2019 22:15:39 GMT+0100 (Central European Standard Time)
New release: Total.js v3.2
Wed Feb 13 2019 22:14:39 GMT+0100 (Central European Standard Time)
Total.js Wiki v2
Fri Jan 04 2019 22:15:01 GMT+0100 (Central European Standard Time)
Total Year 2018
Thu Jan 03 2019 21:14:00 GMT+0100 (Central European Standard Time)

Latest comments
Nice tip
Mauro Junior
Thu Sep 20 2018 21:41:02 GMT+0200 (Central European Summer Time)
Not only for Total.js. You can communicate with different websocket servers.
Peter Širka
Mon Apr 23 2018 20:08:20 GMT+0200 (Central European Summer Time)
Marko: you need to create a buffer with this codepage and write byte-to-byte string. I recommend ...
Peter Širka
Mon Apr 23 2018 20:06:21 GMT+0200 (Central European Summer Time)
Is WEBSOCKETCLIENT only for internal ws connections between totaljs apps?
Stelios Stephanua
Fri Mar 16 2018 06:04:22 GMT+0100 (Central European Standard Time)
Total.js is amazing! ;)
Leonardo Hessel
Tue Dec 19 2017 19:51:15 GMT+0100 (Central European Standard Time)

Pixabay


Read more

Flow v6 is here!

News: We have released a new version of Flow. This version brings great new features and UI improvements.

Thu Mar 07 2019 11:53:54 GMT+0100 (Central European Standard Time)
A critical security fix

News: We were notified about the critical security bug in Total.js framework. Read a prevention.

Wed Feb 13 2019 22:15:39 GMT+0100 (Central European Standard Time)
New release: Total.js v3.2

News: This new release brings a critical security fix and small new improvements. Update Total.js now.

Wed Feb 13 2019 22:14:39 GMT+0100 (Central European Standard Time)
Total.js Wiki v2

Products: I have released a new version of Total.js Wiki. New version brings new improvements.

Fri Jan 04 2019 22:15:01 GMT+0100 (Central European Standard Time)
Total Year 2018

Business: Last year was perfect for Total.js platform. Total.js platform grows up and it has great results.

Thu Jan 03 2019 21:14:00 GMT+0100 (Central European Standard Time)
Total.js Code Editor v1

Products: Try our real-time collaboration tool for Total Developers. Code Editor offers great features for development.

Fri Dec 07 2018 22:55:13 GMT+0100 (Central European Standard Time)