Load Balancer
Introduction
Load Balancer is an element of the K2 architecture that can be used to distribute the load among multiple application servers. The K2 API thus has the ability to connect to multiple application servers simultaneously. When sending a request, the least busy server is evaluated first and it receives the request for processing.
Picture: Load Balancer and K2 API
Example of using Load Balancer and K2 API:
The K2 API receives the request for processing. Load Balancer is addressed for the fastest request processing. The Load Balancer sends a request to all ASs and finds out their current load. It evaluates the least busy server and passes this information to the K2 API. The K2 API thus sends the request directly via the selected application server to the Load Balancer.
LoadBalancer can also be used for web K2, which when the user logs on, finds the most suitable application server and connects the user to it.
Picture: Load Balancer and Web K2
Example of using Load Balancer and Web K2:
Web K2 accepts the user's login request. The web K2 Load Balancer will contact the request to process the request as quickly as possible. The Load Balancer sends a request to all AS and finds out their current load. Web K2 passes the information on the least busy server. Web K2 will use the best evaluated server and thus the fastest processing of the user's login request will take place. Every other request of a given user is already processed by a specific selected AS.
Each K2 API and K2 web installation has its own Load Balancer. In the installation, you can set a specific list of application servers and the configuration of the Load Balancer, which can affect the algorithm for selecting a suitable application server.
Load Balancer evaluates the most suitable application server for request processing in two modes:
- Loading and evaluating the best AS before each connection request (preLoadingEnabled = false)
- Before each request to create a connection, the application servers are bypassed with a request for their statistics, which are processed and evaluated. The most appropriate AS is then used for the given request.
- Load and evaluate the best AS continuously (preLoadingEnabled = true)
- Statistics are read in the specified time interval and the best AS is evaluated. Each connection request is evaluated based on the calculated result of the statistics.
Load Balancer parameters
- requestTimeout:(default 1s) Each connection request is evaluated based on the calculated result of the statistics. If a connection fails with the AS by this time, or the AS does not respond by this time, the AS will be dropped for this particular evaluation. Upon the next request, it will be added to the list of possible application servers again.
- validTimeout: (default 0 u preLoadingEnabled = false, 1000- preLoadingEnabled = true) - the time for which the detected statistics and thus the best AS are valid.
- maxHistoryCount:(default 0) - number of records in history. If the number is 0, the history is not recorded. It is used only for debugging the optimal setting of parameters, when we can look into the history of the distribution of requests and adjust the parameters accordingly.
- preLoadingEnabled:(default false) - enable / disable mode with continuous loading of statistics. If set to true, then validTimeout means the time interval in which the statistics are updated.
- The appServers section defines the application servers that will be used by the Load Balancer. The default is the one used in the K2 API / K2 Web configuration
- Ex. for K2 API (Web K2 is similar only, configuration is done in JSON) "<add server =". "pipe =" ScriptService "/>”
- server: IP or PC name
- pipe: pipe AS name
- the multiplier section is used to set the weight of individual statistics and thus to influence the calculation algorithm
- Ex. for K2 API (Web K2 is similar only, configuration is done in JSON) <add uid="bscSystemCPUAvg" value="1"/>"
- uid: statistic identifier
bscSystemCPUAvg - average CPU usage over time
bscSystemFreeMemory - currently free operation memory
bscAppPoolSpandAvg - average waiting time for the K2 AS request before it is serviced
bscAppNCLSessions - number of connected web K2 users
bscAppAnonymousSessions - number of anonymous threads for K2 API
bscAppSchedulerSessions - number of running scheduled tasks
- value: the value by which the received statistic value will be multiplied by AS. This makes it possible to influence the weight of a given parameter.
A value of 0 disables the evaluation of this parameter during the calculation.
If in any mode the Load Balancer does not connect with the AS in the required time interval, or the AS does not supply statistics in the specified time, it is excluded from the evaluation for the given AS pass. In the next pass, the Load Balancer will try to connect to the AS again.
News in version
News in K2 alba.01
Basic Code Lists and Supporting Modules K2
Division of fields for setting floating maturity separately for purchase and sale
On the Suppl/cust tab in the purchase and sale tabs, the fields for setting the floating maturity have been divided:
• Month shift,
• Number of days since the beginning of the month.
It is now possible to define a variable maturity in the Payment Terms section, one for purchase and another for sale.
Marketing
Create Activities script
As of version 2024.01, the original scripts that created activities for the parenthetical records in the listed books have been deprecated. These are scripts PartCreateActivity.PAS (Partners), Kont_akt.pas (Person Kont.) and also Act_FromDoc.PAS (purchase and sales documents in general). These scripts have been replaced by the new CreateActivity.pas script.
Communication
Canceling the Internal mail client and the "Setting up mail accounts" function
As of K2 album.01, [b]Internal Mail Client[/b] has been cancelled to work in K2, leaving only [b]External Mail Client [/b]to set up mail accounts for the script.
In the tree menu, instead of the original function [i]Mail[/i], the function [i]Mail account settings[/i] is included.
Sale/Purchase
Cancellation of EDI scripts (EDI.pas and EDI_Purchase.pas) - K2 alba.01
As of version K2 alba.01, the scripts for the original EDI were deprecated from the standard. These are EDI.pas and EDI_Purchase.pas scripts.
News in the Pricelists module (K2 alba.01)
1) From version 2024, the old pricing will be cancelled, including user right 312 (Browsing the 5th page – Sales prices).
2) In current Pricelists the option to define External lots has been added to the "Other items of the price list" section. The price then applies only if the value of this external lot is entered in the sales item.
Patterns (cancellation)
Starting with the K2 album version (2024), support for creating records using Patterns (keyboard shortcut Shift + F6) is ended.
News in EDI
An option to define default sales and purchase ledgers for importing EDI messages has been added to the EDI tab on the Customers and suppliers tab. If the field is filled, then the value from this field will take precedence over the value of the parameters of the same name from the EDI configuration.
In the EDI Message Queue book, an option was added to attach an xml file with a message for a given record in the book. The automatic connection occurs after the successful processing of the record in the EDI Message Queue book. The prerequisite for automatic connection of xml files is to have the Connect EDI message parameter set in the EDI configuration in multicompany and to have the type defined in the Document configuration code list in the next parameter Document type for EDI messages (see documentation description).
Cancellation of article ordering scripts
The following scripts for ordering article have been moved to the Archive:
Creating orders for article in demand (GoodsOrder.pas)
Creation of orders for article in demand - Order (GoodsOrder_Order.pas)
Creation of orders for article in demand - plan (GoodsOrder_Plan.pas)
Create orders for article in demand (GoodsOrder_Script.pas)
For ordering article - creation of orders, transfers, internal production orders - the action of the Realization of requirements module is used. Detailed description of individual parts: creation of orders, creation of transfers, creation of internal production orders.
Logistics
Warehouse locations - new right, enhancement in bulk creation
For working with warehouse locations we made following enhancements:
- Format of location abbreviation: To create, to edit and to delete formats of location abbreviations is allowed only for users with the right Code lists / Locations / Edit formats of location abbreviations.
- Bulk creation of locations: In the step, in which the proposals of location abbreviations are generated, is possible to adjust the items - to delete, to edit or to add new location abbreviation.
New parameters in the Warehouse Recalculation function
Recalculation of warehouses was supplemented with two new options:
Automatic creation of a queue of article for recalculation - after turning on this option, the recalculation will automatically select article that need to be recalculated. These are article that have moved in the given period or that are in stock.
Do not recalculate stock records - if this option is checked, the recalculation of stock records is not corrected. There is no deletion and filling of stock tables.
Barcodes
We have included a new Barcode module in IS K2. This module is a list of all barcodes created across all of K2. At the same time, it is also possible to set a definition for barcodes in which the formatter can be used. Based on this definition, barcodes are then created.
The ability to enter a barcode has also been added to all WMS modules.
Script Start the mobile terminals function
We have created a new Run MTModule function script (RunMTModule.PAS). Based on the specified RID, this script can start a specific function of mobile terminals. This option can also be used within the web K2.
Contracts
Contracts - Links added
We have added Links to the documents Contract - sale, Contract - purchase and Contract - others on the Attachments tab.
Finance
Cancellation of the Internal Bank module
Since the K2 version of the album, support for the Internal Bank modules has been cancelled.
Penalty in the K2 alba version
The original penalty tool (FAV_PEN0M.PAS), which was used to calculate late payment interest for late payment of invoices, has been replaced by a new Penalty function (InvoicePenalty.PAS). The function is triggered on invoices issued and other receivables. In the function, it is possible to filter the documents that we want to penalize according to the specified criteria. The function creates penalty invoices for the selected documents with the calculation of interest for late payment. You can find a description of the function in the attached file.
Management reports
OLAP - Costs and incomes: dimensions Code3 - Code6
The Costs and incomes cube supports creation of dimensions for Code3, Code4, Code5 and Code6.
Accounting
Cancellation of the report Economic analysis - shortened
The report Economic analysis - shortened (UCT_EKAZ.AM), which displayed only non-zero rows of the current economic analysis, was canceled. Instead of this report, the report Economic Analysis - 4 Columns (UCT_EKAN4S.AM) is available, to which the parameter Show_Null_lines = No can be added.
A new book with a list of control reports
In the Control report - calculation script, after pressing the List of control reports button, a book containing all calculated control reports will be displayed.
The book with the list of Control reports can now also be added to favorites on the desktop.
To view the List of Control Reports, you must have the new right - Control Reports - Viewing (2250).
New law - Control report - Viewing
To display the List of control reports, you must have the right - Control reports - Viewing (2250).
Splitting Account Name into multi company
In the Chart of Accounts, divided into multi companies, different Account Names for individual multi companies can be entered on one account.
Automatic posting of documents function
We have created a new function Automatic posting of documents, which posts selected types of documents for the specified period. The function can be included in the Task Scheduler and run automatically.
Road tax - new button on the vehicle card for tax exemptions and discounts
A new Exemptions and discounts button has been added to the Vehicles tab for the purposes of calculations for the Road Tax Return. Under the button, the Tax Exemption § 3 fields are available - by choosing from the number list, the necessary letter of the paragraph is selected and the Tax Discount Percentage field - the number of percentages is entered.
When moving from a lower version, these fields are filled according to the type of notes for exemption and discount indicated in the lower version.
Intrastat
Script for transferring customs tariffs to other legislations as well
From version K2 iris.04, a script was added to the standard to facilitate the filling of the Customs Tariff field for other legislations on the goods cards. The Customs tariff field is divided into legislations, because each country can have its own legislation regarding the division of goods into customs tariffs, but in practice it is common that the customs tariffs are the same with exceptions.
Therefore, if the article cards have the Customs Tariff field filled and additional legislations are added to the goods card, then this script, after running, will allow the current value of the customs tariff from the legislation, which is set to the current multicompany (own companies), to be transferred to other legislations for the cards as well article. Therefore, the same customs tariff value will be filled for all legislation defined on the product cards (if the customs tariff for another legislation is already filled, then the record will be skipped). At the same time, the given record will also be created in the Customs tariff code for the given legislation, if the record is not found.
The script is executed above a product card filter that the user creates, which will not include those article cards where the customs tariff value will be different.
Assets
New Depreciation posting key field on the asset card
On the asset card, we have added a Depreciation posting key field to the Basic data tab (under the Additional data button).
When creating an asset card, the Depreciation posting key field is not filled in automatically – posting key is added to the depreciation from the Asset book settings.
If we enter the Depreciation posting key on asset card, when creating or recalculating depreciation, this posting key will be entered into the "Depreciation" and "Depreciation of partial removal" movement.
Stocktaking processing – when codes are changed, the description field is filled in for asset movements
During stocktaking processing, the description: Stocktaking processing + number of Stocktaking Document is now added to the created asset movements of the "Code change" type.
Addition of texts to asset stocktaking reports
Lines with texts were added to the Asset stocktaking (AssetStocktaking.AM, AssetStocktaking_X.AM) and Asset Stocktaking List (AssetStocktakingList.AM, AssetStocktakingList_X.AM) reports on the last page of the reports:
Asset stocktaking + Stocktaking number / Stocktaking sheet + Stocktaking sheet number, Initiation of stocktaking, End of stocktaking, Method of ascertaining the actual conditions, Signature of the person responsible for ascertaining the fact, Signature of the person responsible for carrying out the stocktaking.
Cancellation of old asset
In the K2 Alba version, the old asset is canceled. In this context, the following were removed from the tree menu and from the menu of print reports and functions:
- Books of old asset
- Node for Old asset
- Old asset scripts, reports and filters
When reinstalling on K2 Alba from a lower version, Use new assets must be checked in the Client Parameters. You can no longer convert to new assets in K2 Alba.
Payroll
Canceling scripts for Payroll, Human Resources and Payroll standard extensions
As of the K2 ALBA release, the following scripts and their related reports above the payroll module have been deprecated:
- [i]Collective employer notification[/i] (MZD_HOZ.PAS)
- [i]Notice of employment[/i] (MZD_ONZ.PAS)
- [i]Attachment to the application for benefit[/i] (MZD_NEM.PAS)
- [i]Pension insurance record sheet [/i](MZD_ELDP.PAS)
- [i]Notification by employer upon termination of incapacity for work[/i] (MZD_HZUPN.PAS)
- [i]Notification of intention to apply discount on insurance premium[/i] (PREMP_OZUSPOJ.PAS)
- [i]ISPV9[/i] (MZD_ISPV9.PAS)
All these scripts are fully replaced by new books that will be available from the tree menu after installing the standard extension for [i]Personnel and Payroll[/i].
[b]If the [i]Payroll and Human Resources[/i] module is used, the following steps must be performed after reinstalling the K2 ALBA version:[/b]
- Installation of the standard extension for [i]Personnel and Payroll[/i]
- Running an optional version initialization - [i]Initialize data for K2HR[/i] - this action will populate the newly created books with data, i.e. transfer the data from the original scripts to the standard extension tables so that all the records stored in them are also available within this new functionality. This initialization must be run before new ledger entries are created.
Web and e-shop
Flag "Paid" x "Unpaid" - change in logic for confirmed contracts
On the e-shop, in the [b]List of contracts[/b] section, the logic of the flag [b]"Paid" x "Unpaid"[/b] has changed.
For confirmed orders, only whether all invoices or advances, paid. It is no longer resolved whether there are invoices for all items.
If there is no invoice or advance for the confirmed contract, the "Unpaid" flag will be displayed.
For unconfirmed contracts, the logic remains unchanged.
Administrator
License management - obtaining AS callstacks
In [i]License management[/i], tab [i]Logged in users[/i], buttons were added above the record for AS for the possibility to remotely [b]obtain the callstack [/b]of the application server, or [b]a series of callstacks [/b]of the application server.
The result of the operation will be stored in the user directory of the user who started the action.
New K2.ini parameters - switching surfaces
New parameters have been added to K2.ini to hide the option to switch surfaces and environment settings (visual styles, display size and universal forms preferences):
DISABLELAYOUTMENU=1 ... Menu [i]Settings \ Desktops [/i] is disabled - cannot switch desktops or manipulate them
DISABLEUIMENU=1 ... Menu [i]Settings \ Environment Settings[/i] is disabled - cannot switch visual styles, display size and preferences of universal forms
DISABLEVCXMENU=1 ... Menu [i]Settings \ Environment Settings \ Visual Styles[/i] is disabled - cannot switch visual styles
Administration of Scheduled Tasks - adding checks to the "Administration of Scheduled Tasks" right
Starting with versions ori.09, iris.05 and alba.01, we modified the options for working with [b]scheduled tasks[/b]. For the [i]Administration of Scheduled Tasks[/i] right, we have added controls for other actions.
A user without this right cannot now:
- run scheduled tasks
- delete records from history
- terminate running tasks
- create and edit scheduled tasks.
Administration of Scheduled Tasks - Setting of scheduled background actions
In the Task Scheduler, there is a new option to enable [u]separate threads that will quickly process one-off immediate tasks[/u].
In [i]Administration of Scheduled Tasks[/i], we can turn this feature on using the [b][i]"Setting Scheduled Tasks in Background" button[/i][/b]. We will set the maximum number of threads to be created, the user under which jobs will be processed and the number of days after which jobs will be automatically deleted.
In basic scheduler mode, threads for processing one-time immediate jobs are processed only on the default server.
In Balancer mode, threads for processing one-time immediate jobs are processed on all K2_AS with a scheduler.
Scheduled Tasks administration - New occurrence of "Once with multiple attempts on error"
We have added a new occurrence type [b]"Once with multiple attempts on error"[/b] to the [i]Scheduled Tasks[/i] settings.
After selecting this occurrence, 2 new parameters will be displayed:
- How many times to try to run the task again
- Delay between individual attempts
If the task does not end with the status "OK", "OK with a warning" or "OK with an error", the system will try to start the task again after a set delay, and this will do so a maximum of as many times as specified in the parameter "How many times to try to start the task again".
Elasticsearch search
In IS K2, you can use the Elasticsearch tool, which is used for fast and efficient searches within the e-shop and IS K2.
Web K2
Marking records in web K2
In web K2, records can now be marked with the mouse using the keyboard shortcut:
Ctrl + mouse click, or
Shift + mouse click.
Selection of calendar color in web K2
In web K2, it is possible to define your own color for individual calendars.
New style of web K2
In the new Web style in web K2, the user can customize the appearance according to his preferences (color, transparency,...).