History log of /unit/src/nxt_application.h (Results 1 – 25 of 65)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 2240:0c49318572c2 13-Sep-2022 OutOfFocus4

Removed dead code.

Signed-off-by: Alejandro Colomar <alx@nginx.com>


Revision tags: 1.28.0-1, 1.28.0, 1.27.0-1, 1.27.0, 1.26.1-1, 1.26.1
# 2014:f8a0992944df 24-Nov-2021 Max Romanov

Sending shared port to application prototype.

Application process started with shared port (and queue) already configured.
But still waits for PORT_ACK message from router to start request processin

Sending shared port to application prototype.

Application process started with shared port (and queue) already configured.
But still waits for PORT_ACK message from router to start request processing
(so-called "ready state").

Waiting for router confirmation is necessary. Otherwise, the application may
produce response and send it to router before the router have the information
about the application process. This is a subject of further optimizations.

show more ...


Revision tags: 1.26.0-1, 1.26.0
# 1980:43553aa72111 28-Oct-2021 Max Romanov

Moving request limit control to libunit.

Introducting application graceful stop. For now only used when application
process reach request limit value.

This closes #585 issue on GitHub.


Revision tags: 1.25.0-1, 1.25.0
# 1910:b9e844d85f21 02-Jul-2021 Oisin Canty

Ruby: process and thread lifecycle hooks.

This feature allows one to specify blocks of code that are called when certain
lifecycle events occur. A user configures a "hooks" property on the app
conf

Ruby: process and thread lifecycle hooks.

This feature allows one to specify blocks of code that are called when certain
lifecycle events occur. A user configures a "hooks" property on the app
configuration that points to a script. This script will be evaluated on boot
and should contain blocks of code that will be called on specific events.

An example of configuration:

{
"type": "ruby",
"processes": 2,
"threads": 2,
"user": "vagrant",
"group": "vagrant",
"script": "config.ru",
"hooks": "hooks.rb",
"working_directory": "/home/vagrant/unit/rbhooks",
"environment": {
"GEM_HOME": "/home/vagrant/.ruby"
}
}

An example of a valid "hooks.rb" file follows:

File.write("./hooks.#{Process.pid}", "hooks evaluated")

on_worker_boot do
File.write("./worker_boot.#{Process.pid}", "worker booted")
end

on_thread_boot do
File.write("./thread_boot.#{Process.pid}.#{Thread.current.object_id}",
"thread booted")
end

on_thread_shutdown do
File.write("./thread_shutdown.#{Process.pid}.#{Thread.current.object_id}",
"thread shutdown")
end

on_worker_shutdown do
File.write("./worker_shutdown.#{Process.pid}", "worker shutdown")
end

This closes issue #535 on GitHub.

show more ...


Revision tags: 1.24.0-1, 1.24.0
# 1872:9f8df8b810e0 20-May-2021 Oisin Canty

Python: support for multiple targets.


Revision tags: 1.23.0-1, 1.23.0, 1.22.0-1, 1.22.0
# 1759:196b4d90c8cc 22-Dec-2020 Valentin Bartenev

Python: multiple values in the "path" option.


Revision tags: 1.21.0-1, 1.21.0
# 1697:73a335d2911d 10-Nov-2020 Max Romanov

Python: supporting ASGI legacy protocol.

Introducing manual protocol selection for 'universal' apps and frameworks.


# 1689:e0d01647db76 05-Nov-2020 Max Romanov

Perl: request processing in multiple threads.

This closes #486 issue on GitHub.


# 1687:b9d99e596725 04-Nov-2020 Max Romanov

Ruby: request processing in multiple threads.

This closes #482 issue on GitHub.


# 1684:a10e10f3071f 04-Nov-2020 Max Romanov

Java: request processing in multiple threads.

This closes #458 issue on GitHub.


# 1681:542b5b8c0647 04-Nov-2020 Max Romanov

Python: request processing in multiple threads.

This closes #459 issue on GitHub.


Revision tags: 1.20.0-1, 1.20.0
# 1601:365bbeccef1c 18-Sep-2020 Max Romanov

Python: app module callable name configuration.

Now it is possible to specify the name of the application callable using
optional parameter 'callable'. Default value is 'application'.

This closes

Python: app module callable name configuration.

Now it is possible to specify the name of the application callable using
optional parameter 'callable'. Default value is 'application'.

This closes #290 issue on GitHub.

show more ...


Revision tags: 1.19.0-1, 1.19.0, 1.18.0-1, 1.18.0
# 1489:4a3ec07f4b19 28-May-2020 Tiago Natel de Moura

Added "rootfs" feature.


# 1488:6976d36be926 09-Mar-2020 Tiago Natel de Moura

Refactor of process management.

The process abstraction has changed to:

setup(task, process)
start(task, process_data)
prefork(task, process, mp)

The prefork() occurs in the main process rig

Refactor of process management.

The process abstraction has changed to:

setup(task, process)
start(task, process_data)
prefork(task, process, mp)

The prefork() occurs in the main process right before fork.

The file src/nxt_main_process.c is completely free of process
specific logic.

The creation of a process now supports a PROCESS_CREATED state. The
The setup() function of each process can set its state to either
created or ready. If created, a MSG_PROCESS_CREATED is sent to main
process, where external setup can be done (required for rootfs under
container).

The core processes (discovery, controller and router) doesn't need
external setup, then they all proceeds to their start() function
straight away.

In the case of applications, the load of the module happens at the
process setup() time and The module's init() function has changed
to be the start() of the process.

The module API has changed to:

setup(task, process, conf)
start(task, data)

As a direct benefit of the PROCESS_CREATED message, the clone(2) of
processes using pid namespaces now doesn't need to create a pipe
to make the child block until parent setup uid/gid mappings nor it
needs to receive the child pid.

show more ...


# 1473:e07d5b451423 14-May-2020 Valentin Bartenev

PHP: implemented "targets" option.

This allows to specify multiple subsequent targets inside PHP applications.
For example:

{
"listeners": {
"*:80": {
"pass": "route

PHP: implemented "targets" option.

This allows to specify multiple subsequent targets inside PHP applications.
For example:

{
"listeners": {
"*:80": {
"pass": "routes"
}
},

"routes": [
{
"match": {
"uri": "/info"
},

"action": {
"pass": "applications/my_app/phpinfo"
}
},
{
"match": {
"uri": "/hello"
},

"action": {
"pass": "applications/my_app/hello"
}
},
{
"action": {
"pass": "applications/my_app/rest"
}
}
],

"applications": {
"my_app": {
"type": "php",
"targets": {
"phpinfo": {
"script": "phpinfo.php",
"root": "/www/data/admin",
},

"hello": {
"script": "hello.php",
"root": "/www/data/test",
},

"rest": {
"root": "/www/data/example.com",
"index": "index.php"
},
}
}
}
}

show more ...


Revision tags: 1.17.0-1, 1.17.0, 1.16.0-1, 1.16.0, 1.15.0-1, 1.15.0, 1.14.0-1, 1.14.0
# 1320:4e70411b9842 24-Dec-2019 Max Romanov

Adding "limits/shm" configuration validation and parsing.


Revision tags: 1.13.0-1, 1.13.0, 1.12.0-1, 1.12.0, 1.11.0-2, 1.11.0-1, 1.11.0
# 1182:325b315e48c4 19-Sep-2019 Tiago de Bem Natel de Moura

Initial applications isolation support using Linux namespaces.


Revision tags: 1.10.0-2, 1.10.0-1, 1.10.0, 1.9.0-1, 1.9.0
# 1007:7435036ed31e 06-Mar-2019 Alexander Borisov

Removed unnecessary abstraction layer.


Revision tags: 1.8.0-1, 1.8.0
# 977:4f9268f27b57 28-Feb-2019 Max Romanov

Introducing Java Servlet Container beta.


# 967:d693ed6d0209 27-Feb-2019 Valentin Bartenev

Fixed processing of SERVER_NAME after 77aad2c142a0.

Previously, the nxt_router_prepare_msg() function expected server host among
other headers unmodified. It's not true anymore since normalization

Fixed processing of SERVER_NAME after 77aad2c142a0.

Previously, the nxt_router_prepare_msg() function expected server host among
other headers unmodified. It's not true anymore since normalization of the
Host header has been introduced in 77aad2c142a0.

The nxt_unit_split_host() function was removed. It didn't work correctly with
IPv6 literals. Anyway, after 77aad2c142a0 the port splitting is done in router
while Host header processing.

show more ...


Revision tags: 1.7.1-1, 1.7.1, 1.7-1, 1.7, 1.6-1, 1.6, 1.5-1, 1.5
# 804:fe8d2dea28dd 09-Oct-2018 Valentin Bartenev

Renamed "go" application type to "external".

There's nothing specific to Go language. This type of application object can
be used to run any external application that utilizes libunit API.


Revision tags: 1.4-2, 1.4
# 743:e0f0cd7d244a 06-Aug-2018 Max Romanov

Unit application library.

Library now used in all language modules.
Old 'nxt_app_*' code removed.

See src/test/nxt_unit_app_test.c for usage sample.


Revision tags: 1.3
# 718:f6866084cc80 11-Jul-2018 Valentin Bartenev

Removed unused "nxt_app_header_field_t" structure.

It's not used since 3b77edf46701.


# 703:2d536dde84d2 25-Jun-2018 Valentin Bartenev

Introduced nxt_length() macro.


Revision tags: 1.2
# 687:492cbccba4fe 07-Jun-2018 Valentin Bartenev

PHP: added setting of php.ini configuration file path.


123