diff --git a/frameworks/Java/spring/spring-mongo.dockerfile b/frameworks/Java/spring/spring-mongo.dockerfile
index e700a21cabd..cc51f6c844c 100644
--- a/frameworks/Java/spring/spring-mongo.dockerfile
+++ b/frameworks/Java/spring/spring-mongo.dockerfile
@@ -4,7 +4,7 @@ COPY src src
COPY pom.xml pom.xml
RUN mvn package -q
-FROM bellsoft/liberica-openjre-debian:21
+FROM bellsoft/liberica-openjre-debian:23
WORKDIR /spring
COPY --from=maven /spring/target/hello-spring-1.0-SNAPSHOT.jar app.jar
# See https://docs.spring.io/spring-boot/reference/packaging/efficient.html
diff --git a/frameworks/Java/spring/spring.dockerfile b/frameworks/Java/spring/spring.dockerfile
index f52c1f36df1..1f102057b99 100644
--- a/frameworks/Java/spring/spring.dockerfile
+++ b/frameworks/Java/spring/spring.dockerfile
@@ -4,7 +4,7 @@ COPY src src
COPY pom.xml pom.xml
RUN mvn package -q
-FROM bellsoft/liberica-openjre-debian:21
+FROM bellsoft/liberica-openjre-debian:23
WORKDIR /spring
COPY --from=maven /spring/target/hello-spring-1.0-SNAPSHOT.jar app.jar
# See https://docs.spring.io/spring-boot/reference/packaging/efficient.html
diff --git a/frameworks/Java/spring/src/main/resources/application.yml b/frameworks/Java/spring/src/main/resources/application.yml
index efde83cda61..16a76fe321a 100644
--- a/frameworks/Java/spring/src/main/resources/application.yml
+++ b/frameworks/Java/spring/src/main/resources/application.yml
@@ -15,7 +15,7 @@ spring:
username: ${database.username}
password: ${database.password}
hikari:
- maximum-pool-size: 256
+ maximum-pool-size: 512
database:
name: hello_world
host: tfb-database
diff --git a/frameworks/PHP/ripple/README.md b/frameworks/PHP/ripple/README.md
new file mode 100644
index 00000000000..ce4d89d0bc2
--- /dev/null
+++ b/frameworks/PHP/ripple/README.md
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+
+
+
+Ripple is a modern, high-performance native PHP coroutine engine designed to solve PHP's challenges in high concurrency, complex network communication and data operations.
+The engine uses an innovative architecture and efficient programming model to provide powerful and flexible backend support for modern web and web applications.
+By using ripple, you will experience the advantages of managing tasks from a global view of the system and efficiently handling network traffic and data.
+
+## Install
+
+````bash
+composer require cloudtay/ripple
+````
+
+## Latest documentation
+
+You can visit `ripple`’s [documentation](https://ripple.cloudtay.com/) to start reading
+
+We recommend that you start with [Manual Installation](https://ripple.cloudtay.com/docs/install/professional) to better
+understand the workflow of ripple
+
+If you want to quickly deploy and use `ripple` services, you can directly
+visit [Quick Deployment](https://ripple.cloudtay.com/docs/install/server)
+
+## Appendix
+
+### Applicable component library
+
+> We allow users to choose applicable component libraries by themselves. All components can be used as described in the
+> document without additional configuration.
+
+**🚀 [Guzzle](https://docs.guzzlephp.org/en/stable/)**
+PHP is the most widely used HTTP client
+
+**🔥 [AmPHP](https://amphp.org/)**
+Provides rich PHP asynchronous components for users to encapsulate by themselves
+
+**🚀 [Driver](https://github.com/cloudtay/ripple-driver)**
+The official high-performance driver library provides seamless access to your traditional applications.
+
+**🚀 [Webman-coroutine](https://github.com/workbunny/webman-coroutine)**
+The workbunny team's integrated webman coroutine extension provides coroutine support for Webman.
+
+**🟢[ripple](https://github.com/cloudtay/ripple)**
+Provides standard coroutine architecture and tools for rapid development or packaging of traditional applications
+
+### Event Library Guide
+
+| Extension Types | Recommended Use | Compatibility | Description |
+|:---------------:|:---------------:|:-------------:|:--------------------------------------------------------------------------------------------------------------------:|
+| `libev` | 🏅️ | 🟢️ | `Ev` is a more efficient event extension that performs consistently in various systems and is recommended to be used |
+| `Native` | ️ | 🟢 | Support the use of PHP's built-in select mechanism |
+| `event` | | 🌗 | The event characteristics under different systems are not uniform, and their use is not recommended |
+
+## Special thanks
+
+
+
+
+
+[Jetbrains](https://www.jetbrains.com/?from=ripple) provides free development tools for this project
+
+### Contact information
+
+`Email` jingnigg@gmail.com
+
+`WeChat` jingnigg
+
+---
diff --git a/frameworks/PHP/ripple/benchmark_config.json b/frameworks/PHP/ripple/benchmark_config.json
new file mode 100644
index 00000000000..4c625c29bbe
--- /dev/null
+++ b/frameworks/PHP/ripple/benchmark_config.json
@@ -0,0 +1,29 @@
+{
+ "framework": "ripple",
+ "tests": [
+ {
+ "default": {
+ "json_url": "/json",
+ "db_url": "/db",
+ "query_url": "/queries?queries=",
+ "fortune_url": "/fortunes",
+ "update_url": "/updates?queries=",
+ "plaintext_url": "/plaintext",
+ "port": 8080,
+ "approach": "Realistic",
+ "classification": "Fullstack",
+ "database": "MySQL",
+ "framework": "ripple",
+ "language": "PHP",
+ "flavor": "PHP8.3",
+ "orm": "Raw",
+ "platform": "ripple",
+ "os": "Linux",
+ "database_os": "Linux",
+ "display_name": "ripple",
+ "notes": "",
+ "versus": "php"
+ }
+ }
+ ]
+}
diff --git a/frameworks/PHP/ripple/composer.json b/frameworks/PHP/ripple/composer.json
new file mode 100644
index 00000000000..679f58c8cd2
--- /dev/null
+++ b/frameworks/PHP/ripple/composer.json
@@ -0,0 +1,9 @@
+{
+ "require": {
+ "ext-pdo": "*",
+ "cloudtay/ripple-http": "^1.0",
+ "cloudtay/ripple": "^1.0"
+ },
+ "minimum-stability": "beta",
+ "prefer-stable": true
+}
diff --git a/frameworks/PHP/ripple/fortunes.php b/frameworks/PHP/ripple/fortunes.php
new file mode 100644
index 00000000000..32f765eabb6
--- /dev/null
+++ b/frameworks/PHP/ripple/fortunes.php
@@ -0,0 +1,18 @@
+
+
+Fortunes
+
+
+
+ | id |
+ message |
+
+
+
+ | = \htmlspecialchars($row['id']) ?> |
+ = \htmlspecialchars($row['message']) ?> |
+
+
+
+
+
diff --git a/frameworks/PHP/ripple/ripple.dockerfile b/frameworks/PHP/ripple/ripple.dockerfile
new file mode 100644
index 00000000000..fb521c874f4
--- /dev/null
+++ b/frameworks/PHP/ripple/ripple.dockerfile
@@ -0,0 +1,32 @@
+FROM php:8.3-cli
+
+RUN apt-get update -yqq >> /dev/null
+RUN apt-get install -y libevent-dev \
+ libssl-dev \
+ pkg-config \
+ build-essential \
+ unzip >> /dev/null
+
+RUN docker-php-ext-install pdo_mysql \
+ opcache \
+ posix \
+ pcntl \
+ sockets >> /dev/null
+
+RUN pecl install event >> /dev/null
+
+RUN docker-php-ext-enable posix pcntl sockets
+RUN docker-php-ext-enable --ini-name zz-event.ini event
+
+COPY --from=composer --link /usr/bin/composer /usr/local/bin/composer
+
+# Initialize
+WORKDIR /ripple
+COPY --link . .
+
+# Configure
+RUN composer install --quiet
+
+# Start
+EXPOSE 8080
+ENTRYPOINT ["php","server.php"]
diff --git a/frameworks/PHP/ripple/server.php b/frameworks/PHP/ripple/server.php
new file mode 100644
index 00000000000..8a615fb91c5
--- /dev/null
+++ b/frameworks/PHP/ripple/server.php
@@ -0,0 +1,200 @@
+format('D, d M Y H:i:s T');
+ }
+
+
+ /**
+ * @return int
+ */
+ public static function randomInt(): int
+ {
+ try {
+ return \random_int(1, 10000);
+ } catch (Throwable $e) {
+ return mt_rand(1, 10000);
+ }
+ }
+
+ /**
+ * @param mixed $value
+ *
+ * @return int
+ */
+ public static function clamp(mixed $value): int
+ {
+ if (!\is_numeric($value) || $value < 1) {
+ return 1;
+ }
+ if ($value > 500) {
+ return 500;
+ }
+ return \intval($value);
+ }
+
+ /**
+ * @param string $template
+ * @param array $data
+ *
+ * @return string
+ */
+ public static function render(string $template, array $data = []): string
+ {
+ foreach ($data as $key => $value) {
+ $$key = $value;
+ }
+
+ \ob_start();
+ include $template;
+ return \ob_get_clean();
+ }
+}
+
+$manager = new Manager();
+$worker = new class() extends \Ripple\Worker {
+ /*** @var \Ripple\Http\Server */
+ public Server $server;
+
+ /**
+ * @param \Ripple\Worker\Manager $manager
+ *
+ * @return void
+ */
+ public function register(Manager $manager): void
+ {
+ $this->count = 64;
+ $this->server = new Server('http://0.0.0.0:8080');
+ }
+
+ /**
+ * @return void
+ */
+ public function boot(): void
+ {
+ Setup::dateRefresh();
+ repeat(static fn () => Setup::dateRefresh(), 1);
+
+ Setup::$pdo = new \PDO(
+ 'mysql:host=tfb-database;port=3306;dbname=hello_world',
+ 'benchmarkdbuser',
+ 'benchmarkdbpass',
+ [
+ \PDO::ATTR_DEFAULT_FETCH_MODE => \PDO::FETCH_ASSOC,
+ \PDO::ATTR_EMULATE_PREPARES => false,
+ \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION,
+ ]
+ );
+
+ Setup::$queryWorldWhereID = Setup::$pdo->prepare('SELECT id, randomNumber FROM World WHERE id = ?');
+ Setup::$updateWorldRandomNumber = Setup::$pdo->prepare('UPDATE World SET randomNumber = ? WHERE id = ?');
+ Setup::$queryFortune = Setup::$pdo->prepare('SELECT * FROM `Fortune`');
+ $this->server->onRequest(fn (Server\Request $request) => $this->onRequest($request));
+ $this->server->listen();
+ }
+
+ /**
+ * @param \Ripple\Http\Server\Request $request
+ *
+ * @return void
+ */
+ public function onRequest(Server\Request $request): void
+ {
+ switch ($request->SERVER['REQUEST_URI']) {
+ case '/json':
+ $request->respondJson(
+ ['message' => 'Hello, World!'],
+ ['Date' => Setup::$dateFormatted]
+ );
+ break;
+
+ case '/db':
+ $statement = Setup::$queryWorldWhereID;
+ $statement->execute([Setup::randomInt()]);
+ $request->respondJson($statement->fetch(), ['Date' => Setup::$dateFormatted]);
+ break;
+
+ case '/queries':
+ $queries = Setup::clamp($request->GET['queries'] ?? 1);
+ $results = [];
+ $statement = Setup::$queryWorldWhereID;
+ while ($queries--) {
+ $statement->execute([Setup::randomInt()]);
+ $results[] = $statement->fetch();
+ }
+ $request->respondJson($results, ['Date' => Setup::$dateFormatted]);
+
+ break;
+ case '/fortunes':
+ $rows = Setup::$pdo->query('SELECT * FROM `Fortune`')?->fetchAll();
+ $rows[] = ['id' => 0, 'message' => 'Additional fortune added at request time.'];
+ \usort($rows, function ($a, $b) {
+ return $a['message'] <=> $b['message'];
+ });
+
+ $request->respondHtml(
+ Setup::render('fortunes.php', ['rows' => $rows]),
+ [
+ 'Date' => Setup::$dateFormatted,
+ 'Content-Type' => 'text/html; charset=UTF-8'
+ ]
+ );
+ break;
+
+ case '/updates':
+ $queries = Setup::clamp($request->GET['queries'] ?? 1);
+ $results = [];
+ $statement = Setup::$queryWorldWhereID;
+ $update = Setup::$updateWorldRandomNumber;
+ while ($queries--) {
+ $statement->execute([Setup::randomInt()]);
+ $row = $statement->fetch();
+ $row['randomNumber'] = Setup::randomInt();
+ $results[] = $row;
+ $update->execute([$row['randomNumber'], $row['id']]);
+ }
+ $request->respondJson($results, ['Date' => Setup::$dateFormatted]);
+ break;
+
+ case '/plaintext':
+ $request->respond(
+ 'Hello, World!',
+ [
+ 'Content-Type' => 'text/plain; charset=utf-8',
+ 'Date' => Setup::$dateFormatted
+ ]
+ );
+ break;
+
+ default:
+ $request->respond('Not Found', [], 404);
+ }
+ }
+};
+
+$manager->addWorker($worker);
+$manager->run();
+wait();
diff --git a/frameworks/Python/api_hour/requirements.txt b/frameworks/Python/api_hour/requirements.txt
index 19dcab407ab..9045239a633 100644
--- a/frameworks/Python/api_hour/requirements.txt
+++ b/frameworks/Python/api_hour/requirements.txt
@@ -1,4 +1,4 @@
-aiohttp==3.10.2
+aiohttp==3.10.11
-e git+https://github.com/Eyepea/aiohttp_jinja2.git@c9675e5c1e1ee7741b30aea8d8fbffcde016c7a0#egg=aiohttp_jinja2-master
aiopg==0.7.0
-e git+https://github.com/Eyepea/API-Hour.git@577abbdcbb8cc2810dad46e260b338b15db4d0e3#egg=api_hour-master
diff --git a/frameworks/Ruby/rails/Gemfile b/frameworks/Ruby/rails/Gemfile
index b188913327b..3ec7067d123 100644
--- a/frameworks/Ruby/rails/Gemfile
+++ b/frameworks/Ruby/rails/Gemfile
@@ -1,6 +1,5 @@
source 'https://rubygems.org'
-gem 'oj', '~> 3.16'
gem 'rails', '~> 7.2.0'
gem 'redis', '~> 5.0'
gem 'tzinfo-data'
diff --git a/frameworks/Ruby/rails/Gemfile.lock b/frameworks/Ruby/rails/Gemfile.lock
index 9773df3e123..de6ba5433a9 100644
--- a/frameworks/Ruby/rails/Gemfile.lock
+++ b/frameworks/Ruby/rails/Gemfile.lock
@@ -137,7 +137,7 @@ GEM
irb (1.14.1)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
- json (2.7.2)
+ json (2.8.1)
kgio (2.11.4)
localhost (1.3.1)
logger (1.6.1)
@@ -172,11 +172,7 @@ GEM
racc (~> 1.4)
nokogiri (1.16.7-x86_64-linux)
racc (~> 1.4)
- oj (3.16.6)
- bigdecimal (>= 3.0)
- ostruct (>= 0.2)
openssl (3.2.0)
- ostruct (0.6.0)
pg (1.5.8)
process-metrics (0.3.0)
console (~> 1.8)
@@ -275,7 +271,6 @@ PLATFORMS
DEPENDENCIES
agoo
falcon (~> 0.47)
- oj (~> 3.16)
pg (~> 1.5)
puma (~> 6.4)
rackup
diff --git a/frameworks/Ruby/rails/app/controllers/json_controller.rb b/frameworks/Ruby/rails/app/controllers/json_controller.rb
index e7234f692f3..1a87495f93c 100644
--- a/frameworks/Ruby/rails/app/controllers/json_controller.rb
+++ b/frameworks/Ruby/rails/app/controllers/json_controller.rb
@@ -4,6 +4,6 @@ class JsonController < ApplicationControllerMetal
def index
add_headers
self.content_type = 'application/json'
- self.response_body = Oj.dump({ 'message' => 'Hello, World!' })
+ self.response_body = { 'message' => 'Hello, World!' }.to_json
end
end
diff --git a/frameworks/Ruby/rails/config/initializers/oj.rb b/frameworks/Ruby/rails/config/initializers/oj.rb
deleted file mode 100644
index 8c00f0456ff..00000000000
--- a/frameworks/Ruby/rails/config/initializers/oj.rb
+++ /dev/null
@@ -1 +0,0 @@
-Oj.optimize_rails
diff --git a/frameworks/Ruby/roda-sequel/Gemfile b/frameworks/Ruby/roda-sequel/Gemfile
index c5dd09c3375..73b6ee99edc 100644
--- a/frameworks/Ruby/roda-sequel/Gemfile
+++ b/frameworks/Ruby/roda-sequel/Gemfile
@@ -2,13 +2,13 @@ source "https://rubygems.org"
gem 'base64' # required by passenger on Ruby 3.4
gem "erubi", "~> 1.12"
+gem "json", "~> 2.8"
gem "passenger", "~> 6.0", platforms: %i[ruby mswin], require: false
gem "puma", "~> 6.2", require: false
gem "sequel", "~> 5.67"
gem "roda", "~> 3.66"
gem "tilt", "~> 2.1", require: "tilt/erb"
gem "unicorn", "~> 6.1", platforms: %i[ruby mswin], require: false
-gem "rapidjson"
group :mysql do
gem "mysql2", "~> 0.5", platforms: %i[ruby mswin]
diff --git a/frameworks/Ruby/roda-sequel/boot.rb b/frameworks/Ruby/roda-sequel/boot.rb
index bc7277e2362..5d852e9e80c 100644
--- a/frameworks/Ruby/roda-sequel/boot.rb
+++ b/frameworks/Ruby/roda-sequel/boot.rb
@@ -1,7 +1,6 @@
# frozen_string_literal: true
require "bundler/setup"
require "time"
-require "rapidjson"
MAX_PK = 10_000
QUERY_RANGE = (1..MAX_PK).freeze
ALL_IDS = QUERY_RANGE.to_a
diff --git a/frameworks/Ruby/roda-sequel/hello_world.rb b/frameworks/Ruby/roda-sequel/hello_world.rb
index 458e1a7c687..c05354e2097 100644
--- a/frameworks/Ruby/roda-sequel/hello_world.rb
+++ b/frameworks/Ruby/roda-sequel/hello_world.rb
@@ -22,13 +22,13 @@ def rand1
# Test type 1: JSON serialization
r.is "json" do
response[CONTENT_TYPE] = JSON_TYPE
- RapidJSON.encode({ message: "Hello, World!" })
+ { message: "Hello, World!" }.to_json
end
# Test type 2: Single database query
r.is "db" do
response[CONTENT_TYPE] = JSON_TYPE
- RapidJSON.encode(World.with_pk(rand1).values)
+ World.with_pk(rand1).values.to_json
end
# Test type 3: Multiple database queries
@@ -40,7 +40,7 @@ def rand1
World.with_pk(id).values
end
end
- RapidJSON.encode(worlds)
+ worlds.to_json
end
# Test type 4: Fortunes
@@ -70,7 +70,7 @@ def rand1
end
World.batch_update(worlds)
end
- RapidJSON.encode(worlds.map!(&:values))
+ worlds.map!(&:values).to_json
end
# Test type 6: Plaintext
diff --git a/frameworks/Ruby/sinatra-sequel/Gemfile b/frameworks/Ruby/sinatra-sequel/Gemfile
index 4aace641277..7a750a78aff 100644
--- a/frameworks/Ruby/sinatra-sequel/Gemfile
+++ b/frameworks/Ruby/sinatra-sequel/Gemfile
@@ -1,6 +1,6 @@
source 'https://rubygems.org'
-gem 'oj'
+gem 'json', '~> 2.8'
gem 'passenger', '~> 6.0', :platforms=>[:ruby, :mswin], :require=>false
gem 'puma', '~> 6.4', :require=>false
gem 'sequel', '~> 5.0'
diff --git a/frameworks/Ruby/sinatra-sequel/boot.rb b/frameworks/Ruby/sinatra-sequel/boot.rb
index b91ea6e1317..655e88dce7d 100644
--- a/frameworks/Ruby/sinatra-sequel/boot.rb
+++ b/frameworks/Ruby/sinatra-sequel/boot.rb
@@ -1,7 +1,6 @@
# frozen_string_literal: true
require 'bundler/setup'
require 'time'
-require 'oj'
MAX_PK = 10_000
ID_RANGE = (1..MAX_PK).freeze
@@ -24,8 +23,6 @@
Bundler.require(:default) # Load core modules
-Oj.mimic_JSON
-
def connect(dbtype)
Bundler.require(dbtype) # Load database-specific modules
diff --git a/frameworks/Ruby/sinatra/Gemfile b/frameworks/Ruby/sinatra/Gemfile
index 95fe5743580..7fc8bdb1a0d 100644
--- a/frameworks/Ruby/sinatra/Gemfile
+++ b/frameworks/Ruby/sinatra/Gemfile
@@ -1,7 +1,7 @@
source 'https://rubygems.org'
gem 'activerecord', '~> 7.2', require: 'active_record'
-gem 'oj'
+gem 'json', '~> 2.8'
gem 'passenger', '~> 6.0', platforms: [:ruby, :mswin], require: false
gem 'puma', '~> 6.4', require: false
gem 'sinatra', '~> 4.0', require: 'sinatra/base'
diff --git a/frameworks/Ruby/sinatra/boot.rb b/frameworks/Ruby/sinatra/boot.rb
index 97fa0c40bdb..f8cc4be86c3 100644
--- a/frameworks/Ruby/sinatra/boot.rb
+++ b/frameworks/Ruby/sinatra/boot.rb
@@ -1,7 +1,6 @@
# frozen_string_literal: true
require 'bundler/setup'
require 'time'
-require 'oj'
MAX_PK = 10_000
ID_RANGE = (1..MAX_PK).freeze
@@ -23,8 +22,6 @@
Bundler.require(:default) # Load core modules
-Oj.mimic_JSON
-
def connect(dbtype)
Bundler.require(dbtype) # Load database-specific modules
diff --git a/frameworks/Rust/astra/Cargo.lock b/frameworks/Rust/astra/Cargo.lock
index 3eb313f1e71..de8ed1f1b7d 100644
--- a/frameworks/Rust/astra/Cargo.lock
+++ b/frameworks/Rust/astra/Cargo.lock
@@ -268,11 +268,12 @@ checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"
[[package]]
name = "libmimalloc-sys"
-version = "0.1.24"
+version = "0.1.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7705fc40f6ed493f73584abbb324e74f96b358ff60dfe5659a0f8fc12c590a69"
+checksum = "23aa6811d3bd4deb8a84dde645f943476d13b248d818edcf8ce0b2f37f036b44"
dependencies = [
"cc",
+ "libc",
]
[[package]]
@@ -292,9 +293,9 @@ checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a"
[[package]]
name = "mimalloc"
-version = "0.1.28"
+version = "0.1.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b0dfa131390c2f6bdb3242f65ff271fcdaca5ff7b6c08f28398be7f2280e3926"
+checksum = "fa01922b5ea280a911e323e4d2fd24b7fe5cc4042e0d2cda3c40775cdc4bdc9c"
dependencies = [
"libmimalloc-sys",
]