Commit Graph

362 Commits

Author SHA1 Message Date
Chirag Aggarwal e2dc03145f Enable coroutine hooks for HTTP server 2026-04-06 18:54:19 +05:30
Chirag Aggarwal b048bd3d8e Derive coroutine HTTP pool sizing 2026-04-06 13:38:03 +05:30
Chirag Aggarwal 00c0f8d7fa sync 2026-04-06 13:34:31 +05:30
Chirag Aggarwal 5a81560605 Fix coroutine HTTP startup 2026-04-06 12:04:23 +05:30
Chirag Aggarwal bf77d52695 Fix coroutine HTTP pool sizing 2026-04-06 11:07:06 +05:30
Chirag Aggarwal edb533eaea Use released Utopia coroutine adapter 2026-04-06 10:12:50 +05:30
Chirag Aggarwal af7883f366 Remove coroutine request semaphore 2026-04-06 10:10:09 +05:30
Chirag Aggarwal c7f79fb4c1 Allow nested coroutine HTTP requests 2026-04-06 09:36:56 +05:30
Chirag Aggarwal dacb03053e Tune coroutine HTTP memory budget 2026-04-06 08:53:06 +05:30
Chirag Aggarwal 44701257c7 Limit coroutine HTTP concurrency 2026-04-06 08:20:14 +05:30
Chirag Aggarwal b4aaeab81e Stabilize coroutine request handling 2026-04-06 08:07:47 +05:30
Chirag Aggarwal 35b67d89cd fix: reduce coroutine HTTP descriptor growth 2026-04-05 21:55:18 +05:30
Chirag Aggarwal b2db2725ea feat: add coroutine HTTP server experiment 2026-04-05 21:36:12 +05:30
Chirag Aggarwal c9f7b7f0d9 fix: address PR review findings from code review
- Add Console::error() fallback in Bus::dispatch() so listener failures
  are visible even without telemetry (C1/M7)
- Remove duplicate $max/$sleep assignments in createDatabase (M1)
- Remove duplicate @param in Event::generateEvents docblock (M2)
- Remove unused $plan parameter from plan resource factory (M3)
- Fix inconsistent indentation in certificate init block (L2)
- Add explicit return null in session resource factory (M6)
2026-04-01 15:42:15 +05:30
Chirag Aggarwal 908e408480 Merge remote-tracking branch 'origin/1.9.x' into feat/migrate-di-container
# Conflicts:
#	app/init/resources.php
#	composer.json
#	composer.lock
#	phpstan-baseline.neon
2026-04-01 11:46:13 +05:30
Jake Barnby 1fa1aa8621 (fix): guard against missing Host header in dispatch 2026-03-31 20:58:22 +13:00
Chirag Aggarwal 89db65299d Merge remote-tracking branch 'origin/1.9.x' into feat/migrate-di-container 2026-03-24 10:15:38 +05:30
ArnabChatterjee20k 6c8338c3e9 Revert "added logging"
This reverts commit b630426893.
2026-03-23 10:44:35 +05:30
Chirag Aggarwal 89c072e223 fix analyze 2026-03-23 10:20:45 +05:30
Chirag Aggarwal 6421bc8689 fn name 2026-03-23 10:08:19 +05:30
ArnabChatterjee20k b630426893 added logging 2026-03-20 21:05:24 +05:30
Chirag Aggarwal 10cc6a8040 fix global pools state 2026-03-20 14:09:43 +05:30
ArnabChatterjee20k c7907932e4 Revert "Revert "Documentsdb + vectordb (latest)"" 2026-03-19 20:30:42 +05:30
ArnabChatterjee20k 9917f95dfd Revert "Documentsdb + vectordb (latest)" 2026-03-19 19:18:27 +05:30
Chirag Aggarwal cdb301a293 fix PHPStan errors without regenerating baseline
- Fix dispatch() type hint to use \Swoole\Http\Server instead of Utopia adapter
- Remove unused $register from go() closure in http.php
- Remove unnecessary ?? '' on non-nullable $hostname
- Remove unsupported override: param from addHeader() call
- Update Resolvers.php for new getResource()/execute() signatures
- Migrate Installer/Server.php from static Http::setResource() to container
- Remove stale baseline entries, add 1 for pre-existing Deployment.php issue
2026-03-17 17:30:42 +05:30
Chirag Aggarwal c2795376d8 update server 2026-03-17 16:25:52 +05:30
Chirag Aggarwal c055c32371 enable coroutines 2026-03-17 10:52:35 +05:30
Chirag Aggarwal d9c1b9db2a chore: register request resources seperately 2026-03-17 08:49:43 +05:30
Chirag Aggarwal eb399c7bd0 wip 2026-03-16 23:45:18 +05:30
Chirag Aggarwal aaa2a0525f feat: migrate from static Http::setResource() to DI Container
Upgrade utopia-php/framework from 0.33.x to 0.34.x which removes the
static Http::setResource() API. Resources are now registered on a
Utopia\DI\Container instance.

- Replace 81 Http::setResource() calls in resources.php with $container->set()
- Refactor http.php to use Swoole HttpServer adapter with shared container
- Refactor realtime.php to use FPM adapter with global container
- Refactor cli.php to use direct $cli->setResource() calls
- Update Specs.php to use local container + FPM adapter
- Update Migrate.php to inject console document instead of creating Http instance
- Update GraphQL Schema.php to use instance setResource()
2026-03-16 23:00:36 +05:30
ArnabChatterjee20k 1cb7ea49ec Merge branch '1.8.x' into sync-mongodb 2026-03-10 18:43:50 +05:30
eldadfux 39f3bc7b9d Fix SDK namespace call 2026-03-09 20:08:41 +01:00
ArnabChatterjee20k 844891c0ae updated 2026-03-09 14:29:39 +05:30
ArnabChatterjee20k 681d930da3 renamed vectordb to vectordb 2026-03-09 13:51:48 +05:30
ArnabChatterjee20k e84a26be76 Merge remote-tracking branch 'origin/1.8.x' into sync-mongodb 2026-03-05 12:11:44 +05:30
loks0n b45ff6b646 refactor: replace queueForExecutions with Bus event bus
Introduce a generic event bus (Utopia\Bus) with typed events, listener
base class, Span instrumentation, and coroutine dispatch. Replace all
direct queueForExecutions and inline execution usage calls with
ExecutionCompleted event and dedicated listeners (Log, Usage).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 19:36:48 +00:00
ArnabChatterjee20k 58f4fff864 added 2026-02-25 16:20:44 +05:30
eldadfux 2b5307715a Merge remote 1.8.x
Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	composer.lock
2026-02-24 14:25:56 +01:00
eldadfux 3b1b7bd611 Update composer.lock and enhance error logging in HTTP requests
- Updated versions for several dependencies in composer.lock, including utopia-php/database (5.3.3), utopia-php/detector (0.2.4), utopia-php/dns (1.6.5), utopia-php/framework (0.33.40), utopia-php/queue (0.15.6), and utopia-php/storage (1.0.1).
- Improved error logging in app/http.php and app/controllers/general.php to handle null routes gracefully, ensuring that the HTTP method and request URI are logged correctly even when the route is not defined.
2026-02-23 19:35:52 +01:00
ArnabChatterjee20k 2d0140f705 Merge remote-tracking branch 'origin/1.8.x' into documents-db-api 2026-02-18 16:01:55 +05:30
Jake Barnby ce64011551 Merge branch '1.8.x' into feat-mongodb 2026-02-18 08:42:56 +00:00
loks0n f1501d139b Rename Swoole Tables: domains -> riskyDomains, hostnames -> certifiedDomains
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 13:22:07 +00:00
loks0n b83e3ef36e Make Swoole Tables injectable Http resources
Register both `domains` and `hostnames` tables as Http resources so they
can be injected via the framework instead of relying on closures or globals.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 13:15:25 +00:00
loks0n 56cbcba2b1 Resize domains Swoole Table from 1M to 100K rows
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:37:59 +00:00
Luke B. Silver 1f78506952 Merge branch '1.8.x' into perf/domain-cache 2026-02-17 12:22:42 +00:00
loks0n b9258df955 Replace per-worker Config cache with shared Swoole Table for hostname cert tracking
The hostname certificate cache was using Config::getParam/setParam which stores a plain PHP array local to each worker. This meant every worker independently hit the DB for the same hostnames. Replace with a Swoole Table shared across all workers via shared memory.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:19:53 +00:00
loks0n 08848e4c5c Load static files before Swoole fork for copy-on-write memory sharing
Move Files::load() from EVENT_WORKER_START (per-worker) to before the
Swoole server starts. This allows forked workers to share the loaded
file data via OS copy-on-write instead of each worker allocating its
own copy (~22MB per worker).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 11:31:25 +00:00
ArnabChatterjee20k e6e0cef91e linting 2026-02-16 13:55:34 +05:30
ArnabChatterjee20k fd96bcbd3f Merge remote-tracking branch 'origin/1.8.x' into documents-db-api 2026-02-16 12:20:53 +05:30
Jake Barnby caafe2678b Merge branch '1.8.x' into feat-mongodb 2026-02-14 04:50:00 +00:00