I have released a new version of Total.js framework with great new features, updates and bug fixes.
Total.js v3.4.0
Finally, the new version of Total.js framework is here! This new version brings great new features, updates and some bugfixes. We recommend to update your older version of Total.js framework!
- Changelog
- Update from
$ npm install total.js
- Website: https://www.totaljs.com
- Follow us on Twitter
News
Auto-merging static files in View Engine
This is really a great new feature, because you can merge files directly in the view engine via @{import()}
method like this:
Configuration
We have added a new sub-type into the configuration called generate
. This sub-type generates a random value and stores it for future restarts. For example: the code below will generate 10 characters string with chars/numbers:
Improved cluster
Total.js Cluster got really good and very helpful improvements.
Auto-scalability:
Main thread watches all threads in 5 seconds interval and if child processes respond in more than 70 ms then the main thread will open a new child process. If child processes aren't fully utilized then child processes will be killed automatically.
Debug Mode in Cluster:
Finally, you can use debug mode in cluster mode too. The framework restarts threads automatically if some server-side script is changed.
Server-less architecture:
(currently beta) We have prepared our architecture of server-less in Total.js framework and currently we prepare a cloud environment for it. We called it: THREADS. Our architecture offers total brutal performance with help of auto-scalability cluster for each thread.
- each thread is independent application
- each thread inherits all functionality from root of the application (e.g. DB instance)
- each thread is provided in cluster
- each thread optimizes performance automatically
- each thread can have own schemas and routes with own endpoints
- adding of new thread is very easy
- threads are targeted for high-performance REST services
It's not easy to provide THREADS, but you can learn from example: Threads example.
Schema extensions
We have added a simple extandable machanism for extending operations in the schemas. Extensions are available in all schema operations.
Example:
Updates
This version supports a new method called UPDATE()
. This method will run scripts from /updates/
directory according to the version. It's much simple alternative to startup
scripts, because update scripts are evaluated in the main thread and after all dependencies are loaded.
- tries to load all versions in the form e.g.
/updates/1.0.0.js
- then it evaluates each file in order in the main thread (all dependencies are loaded)
- then it renames evaluated files in the form e.g.
/updates/1.0.0.js_bk
- and then the application will continue
- evaluated scripts aren't evaluated again after restart
Other new features
- added
Ipv4
address in the console output - added a new schema type called
base64
HttpFile
contains finally.extension
property- added auto-session cleaner for unused items
- NOSQL Counter supports
.reset()
method - added a support for
.mjs
extensions - updated
.env
parser, now it can parse.env-debug
or.env-release
according to the mode - added a simple DDOS IP protection, can be enabled via config:
allow_reqlimit : Number
- improved serialization with
controller.success()
- unit-testing supports colored outputs, added by dacrhu
Good to know: GZIP compression is enabled only for plain-text (HTML, JSON, etc.) bodies which have more than 4096 bytes.
Fixes
This version fixes some bugs. Again we have had a problem with traversal vulnerability - fixed.
Fixed UID generator
We have found a big problem with UID generator in Total.js v3, validations won't work in 2021. Yeah, this is big problem and this new version solves it. Don't worry about old UIDs, they are valid. But a big problem will be with a new UIDs in 2021. Just update your older version and everything will be fine.
Other posts from Total.js Platform
- 2024-11-13Benchmarking Node.js Frameworks: selecting your framework for 2025!
- 2024-11-01October report 2024
- 2024-10-22Performance Testing: Total.js vs. NestJS
- 2024-10-01September report 2024
- 2024-09-27Total.js UI Builder: #2 designing your first interface
- 2024-09-26Total.js V5: Middlewares
- 2024-09-23Beginner Guide to Total.js UI: # 05 Client-side routing
- 2024-09-23Total.js UI #4: Data Binding (Part 2 – Practical Example)
- 2024-09-20Introduction to Total.js UI Builder: A Beginner’s Guide
- 2024-09-13Total.js v5: #06 Understanding File Routing