Note: The scope of this work is pretty locked-down. Potential follow-on work is tracked in T402957: [26Q3] Rust evaluator in production.
Description
Some parts of the function evaluator have already been ported to Rust. This quarter, we can combine these parts into a Rust-based service to replicate the functionality of the current Node-based one.
Desired behaviour/Acceptance criteria (returned value, expected error, performance expectations, etc.)
- new service can accept all current versions of the evaluator request format
- new service can run function calls in the executor for the appropriate programming language
- new service runs function calls in separate threads
- new service maintains a pool of "hot" executor interfaces in order to avoid incurring WASI startup costs at request time
- new service returns all (appropriate/feasible) metadata supported by the current Node-based evaluator
- new service implements a time limit
- new service implements a rate limit
Motivation and Context
The function-evaluator is a critical part of the Wikifunctions stack. It is currently (January 2023) implemented in Node using Wikimedia's service-runner within the service 'template'. Although this is a flexible framework and standard for RESTful services across Wikimedia, it is not very performant and as a critical path through which every Wikifunctions call runs. Improving the speed and reliability of this is important.