the-benchmarker / web-frameworks

Which is the fastest web framework?
MIT License
6.91k stars 641 forks source link

Multiple engines #3958

Closed waghanza closed 12 months ago

waghanza commented 3 years ago

Hi,

This PR allows to test each frameworks on various setups.

Actual

All frameworks are tested once. For example, ruby framework are tested with puma (since widely spread in ruby communities)

Purpose

Test framework with multiple engines (for the sake of this feature we keep focus on engines, not compilation options, vms, ...). The idea the is to test frameworks with various engines, when accurate indeed.


List of engines


ahopkins commented 3 years ago

Great idea. You can also add uvicorn for Python (ASGI).

waghanza commented 3 years ago

Is uvicorn suitable for production now ? I mean we are using gunicorn (with uvicorn workers), but perhaps this is outdated @ahopkins

ahopkins commented 3 years ago

That pattern is valid and mainly used because gunicorn has a rich feature set. For the ASGI frameworks, I would suggest variants:

As you can see, I imagine having all these variants across all the languages is likely to lead to a long list. Sanic (for example) can be run directly by gunicorn, by any of the above methods, and also using its own internal server.

Have you had any thoughts of how to present all this data without being too verbose? Maybe the variants list is displayed only by language?

waghanza commented 3 years ago

Maybe a discussion should be a great place to collect ideas

dominikzogg commented 3 years ago

@waghanza would be cool if those variants are structured like php/chubbyhp/php-fpm, php/chubbyphp/swoole... would be easier to maintain

waghanza commented 3 years ago

@waghanza would be cool if those variants are structured like php/chubbyhp/php-fpm, php/chubbyphp/swoole... would be easier to maintain

Yep. This is what I opted for

Example, for rails

|
-- ruby
           |
           --- rails
                        |
                        --- all files for implementation
                        |
                        .falcon <- specific file for `falcon` variant
                        |
                        .iodine <- specific file for `iodine` variant

The idea is too keep the basics, and change file if required (composer.json, as long as source code, extensions could differs)

And also, some variant requires custom docker images (graalvm in java)

waghanza commented 3 years ago

@the-benchmarker/web-frameworks I have successfully enable variants for ruby. The implementation is not ideal, but can work as a MVP.

If you have time to try it, I'll be glad to review any PR (and have some feedbacks) ❤️

The idea is :

waghanza commented 2 years ago

@dominikzogg Any idea about context https://github.com/the-benchmarker/web-frameworks/pull/3958/checks?check_run_id=3899021842#step:6:58 ?

dominikzogg commented 2 years ago

@waghanza it seems the npm install is missing

waghanza commented 2 years ago

ah of course, npm install should be made before compilation

ariaieboy commented 2 years ago

you can add roadrunner for php

ahopkins commented 1 year ago

image

Passing CI!! :tada: Does that mean this gets merged sometime soon? What is the plan for finalizing this?

waghanza commented 1 year ago

Will try to stabilize first (some frameworks are still failing), and need to think how to display results (if I merge this as-is it will break UI) @ahopkins

ahopkins commented 1 year ago

Will try to stabilize first (some frameworks are still failing), and need to think how to display results (if I merge this as-is it will break UI) @ahopkins

Spot checking some of the Python failures, seems like some missing wheels maybe? I feel like this might be a recurring problem with this strategy as requirements are constantly shifting. Can we just display some message about build failures on those combinations?

waghanza commented 1 year ago

For now, I prefer to show failures by hand (dig into the log myself), but having a feature that can expose it automate is a great plus (and I plan to add it at some point).

Which framework are you refereing to @ahopkins ?

ahopkins commented 1 year ago

Which framework are you refereing to @ahopkins ?

I don't remember specifically which, but I looked at a few of the Python builds and they all seemed to die with some failure to install dependencies: usually multidict and sometimes yarl.

waghanza commented 1 year ago

I think a lot of python failures are due to uwsgi @ahopkins. Let's see if non-LTS version will fix smth

waghanza commented 1 year ago

@adamluzsi rack-app seems to timeout, but only with puma (camping also)

waghanza commented 1 year ago

@adamluzsi

/usr/local/bundle/gems/rack-app-7.7.0/lib/rack/app/cli/fetcher/server.rb:1:in `require': cannot load such file -- rack/server (LoadError)
    from /usr/local/bundle/gems/rack-app-7.7.0/lib/rack/app/cli/fetcher/server.rb:1:in `<top (required)>'
    from /usr/local/bundle/gems/rack-app-7.7.0/lib/rack/app/cli/fetcher.rb:3:in `require'
    from /usr/local/bundle/gems/rack-app-7.7.0/lib/rack/app/cli/fetcher.rb:3:in `<module:Fetcher>'
    from /usr/local/bundle/gems/rack-app-7.7.0/lib/rack/app/cli/fetcher.rb:1:in `<top (required)>'
    from /usr/local/bundle/gems/rack-app-7.7.0/lib/rack/app/cli.rb:4:in `require'
    from /usr/local/bundle/gems/rack-app-7.7.0/lib/rack/app/cli.rb:4:in `<class:CLI>'
    from /usr/local/bundle/gems/rack-app-7.7.0/lib/rack/app/cli.rb:2:in `<top (required)>'
    from /usr/local/bundle/gems/rack-app-7.7.0/lib/rack/app.rb:11:in `require'
    from /usr/local/bundle/gems/rack-app-7.7.0/lib/rack/app.rb:11:in `<class:App>'
    from /usr/local/bundle/gems/rack-app-7.7.0/lib/rack/app.rb:5:in `<top (required)>'
    from config.ru:3:in `require'
    from config.ru:3:in `block in <main>'
    from /usr/local/bundle/gems/rack-3.0.0/lib/rack/builder.rb:106:in `eval'
    from /usr/local/bundle/gems/rack-3.0.0/lib/rack/builder.rb:106:in `new_from_string'
    from /usr/local/bundle/gems/rack-3.0.0/lib/rack/builder.rb:97:in `load_file'
    from /usr/local/bundle/gems/rack-3.0.0/lib/rack/builder.rb:67:in `parse_file'
    from /usr/local/bundle/gems/puma-6.0.0/lib/puma/configuration.rb:364:in `load_rackup'
    from /usr/local/bundle/gems/puma-6.0.0/lib/puma/configuration.rb:286:in `app'
    from /usr/local/bundle/gems/puma-6.0.0/lib/puma/runner.rb:158:in `load_and_bind'
    from /usr/local/bundle/gems/puma-6.0.0/lib/puma/single.rb:44:in `run'
    from /usr/local/bundle/gems/puma-6.0.0/lib/puma/launcher.rb:186:in `run'
    from /usr/local/bundle/gems/puma-6.0.0/lib/puma/cli.rb:75:in `run'
    from /usr/local/bundle/gems/puma-6.0.0/bin/puma:10:in `<top (required)>'
    from /usr/local/bundle/bin/puma:25:in `load'
    from /usr/local/bundle/bin/puma:25:in `<top (required)>'
    from /usr/local/lib/ruby/3.1.0/bundler/cli/exec.rb:58:in `load'
    from /usr/local/lib/ruby/3.1.0/bundler/cli/exec.rb:58:in `kernel_load'
    from /usr/local/lib/ruby/3.1.0/bundler/cli/exec.rb:23:in `run'
    from /usr/local/lib/ruby/3.1.0/bundler/cli.rb:484:in `exec'
    from /usr/local/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
    from /usr/local/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
    from /usr/local/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
    from /usr/local/lib/ruby/3.1.0/bundler/cli.rb:31:in `dispatch'
    from /usr/local/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
    from /usr/local/lib/ruby/3.1.0/bundler/cli.rb:25:in `start'
    from /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.3.7/libexec/bundle:48:in `block in <top (required)>'
    from /usr/local/lib/ruby/3.1.0/bundler/friendly_errors.rb:103:in `with_friendly_errors'
    from /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.3.7/libexec/bundle:36:in `<top (required)>'
    from /usr/local/bin/bundle:25:in `load'
    from /usr/local/bin/bundle:25:in `<main>'
adamluzsi commented 1 year ago

As long as the application code is loaded once, there shouldn't be an issue. rack-app has no web server-specific logic. The only thing I can think of is the initial application routing building that happens on the first call.

waghanza commented 1 year ago

and seems to be with the last major of puma @adamluzsi https://github.com/puma/puma/blob/master/6.0-Upgrade.md

jeremyevans commented 1 year ago

@waghanza The rack/server issue is because that code was extracted to a gem named rackup when rack 3 was released. So if you add the rackup gem, it should continue to work.

adamluzsi commented 1 year ago

Can you give it a try to not use the CLI? Maybe it's a client issue only; try using puma directly from the command line.

adamluzsi commented 1 year ago

Okay, adding rackup, or deprecating the cli altogether sounds like the options.

waghanza commented 1 year ago

Up to you then @adamluzsi. Maybe add this on rack-app side is accurate 😛

adamluzsi commented 1 year ago

Okay, I go with deprecating the CLI because the puma cli should work out of the box with the framework. However, I need time to delve into these changes.

Could you replace the rack-app CLI usage with the puma CLI?

waghanza commented 1 year ago

Not sure to understand @adamluzsi. The app run with bundle exec puma

adamluzsi commented 1 year ago

Okay, I included the rackup gem in the lib to avoid doing work for you. Try to upgrade to the latest version (v8).

waghanza commented 1 year ago

@jeremyevans seems that also camping suffer for puma 6 migration (but I'm not even sure if keeping it here is valuable)

jeremyevans commented 1 year ago

Camping says it supports rack 1+, but it doesn't look compatible with rack 3 (https://github.com/camping/camping/blob/master/lib/camping-unabridged.rb#L16 shows uppercase header, when all headers must be lowercase in rack 3). This is known upstream, but not yet fixed: https://github.com/camping/camping/issues/130

Maybe leaving camping at puma 5, or temporarily disabling benchmarking until it fixed, seems like the best choice of action.

waghanza commented 1 year ago

I've adapted a little bit this long running PR. The idea is to avoid changing actual results, I mean not to change actual UI.

For example, the idea is to leave yii and yii-swoole folders, but re-design internal tooling so we can merge both, when a new UI will be ready (this will be done with a tiniest PR)

waghanza commented 1 year ago

@johantonelli @jonpither @oliyh @armincerf when compiling yada with clojure -Auberjar --main-class server, I have

[uberdeps] Packaging yada.jar...
+ src/main/clojure/**
+ classes/**
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
+ aleph/aleph #:mvn{:version "0.6.1"}
.   io.netty/netty-codec #:mvn{:version "4.1.87.Final"}
.     io.netty/netty-buffer #:mvn{:version "4.1.87.Final"}
! Duplicate entry "META-INF/io.netty.versions.properties" from "io.netty/netty-buffer #:mvn{:version "4.1.87.Final"}" already seen in "io.netty/netty-codec #:mvn{:version "4.1.87.Final"}"
.       io.netty/netty-common #:mvn{:version "4.1.87.Final"}
! Duplicate entry "META-INF/io.netty.versions.properties" from "io.netty/netty-common #:mvn{:version "4.1.87.Final"}" already seen in "io.netty/netty-codec #:mvn{:version "4.1.87.Final"}"
-     skipping duplicate lib io.netty/netty-common #:mvn{:version 4.1.87.Final}
.     io.netty/netty-transport #:mvn{:version "4.1.87.Final"}
! Duplicate entry "META-INF/io.netty.versions.properties" from "io.netty/netty-transport #:mvn{:version "4.1.87.Final"}" already seen in "io.netty/netty-codec #:mvn{:version "4.1.87.Final"}"
-       skipping duplicate lib io.netty/netty-buffer #:mvn{:version 4.1.87.Final}
-       skipping duplicate lib io.netty/netty-common #:mvn{:version 4.1.87.Final}
.       io.netty/netty-resolver #:mvn{:version "4.1.87.Final"}
! Duplicate entry "META-INF/io.netty.versions.properties" from "io.netty/netty-resolver #:mvn{:version "4.1.87.Final"}" already seen in "io.netty/netty-codec #:mvn{:version "4.1.87.Final"}"
-         skipping duplicate lib io.netty/netty-common #:mvn{:version 4.1.87.Final}
.   io.netty/netty-codec-http #:mvn{:version "4.1.87.Final"}
! Duplicate entry "META-INF/io.netty.versions.properties" from "io.netty/netty-codec-http #:mvn{:version "4.1.87.Final"}" already seen in "io.netty/netty-codec #:mvn{:version "4.1.87.Final"}"
-     skipping duplicate lib io.netty/netty-buffer #:mvn{:version 4.1.87.Final}
-     skipping duplicate lib io.netty/netty-codec #:mvn{:version 4.1.87.Final}
-     skipping duplicate lib io.netty/netty-common #:mvn{:version 4.1.87.Final}
.     io.netty/netty-handler #:mvn{:version "4.1.87.Final"}
! Duplicate entry "META-INF/io.netty.versions.properties" from "io.netty/netty-handler #:mvn{:version "4.1.87.Final"}" already seen in "io.netty/netty-codec #:mvn{:version "4.1.87.Final"}"
-       skipping duplicate lib io.netty/netty-buffer #:mvn{:version 4.1.87.Final}
-       skipping duplicate lib io.netty/netty-codec #:mvn{:version 4.1.87.Final}
-       skipping duplicate lib io.netty/netty-common #:mvn{:version 4.1.87.Final}
-       skipping duplicate lib io.netty/netty-resolver #:mvn{:version 4.1.87.Final}
-       skipping duplicate lib io.netty/netty-transport #:mvn{:version 4.1.87.Final}
.       io.netty/netty-transport-native-unix-common #:mvn{:version "4.1.87.Final"}
! Duplicate entry "META-INF/io.netty.versions.properties" from "io.netty/netty-transport-native-unix-common #:mvn{:version "4.1.87.Final"}" already seen in "io.netty/netty-codec #:mvn{:version "4.1.87.Final"}"
-         skipping duplicate lib io.netty/netty-buffer #:mvn{:version 4.1.87.Final}
-         skipping duplicate lib io.netty/netty-common #:mvn{:version 4.1.87.Final}
-         skipping duplicate lib io.netty/netty-transport #:mvn{:version 4.1.87.Final}
-     skipping duplicate lib io.netty/netty-transport #:mvn{:version 4.1.87.Final}
-   skipping duplicate lib io.netty/netty-handler #:mvn{:version 4.1.87.Final}
.   io.netty/netty-handler-proxy #:mvn{:version "4.1.87.Final"}
! Duplicate entry "META-INF/io.netty.versions.properties" from "io.netty/netty-handler-proxy #:mvn{:version "4.1.87.Final"}" already seen in "io.netty/netty-codec #:mvn{:version "4.1.87.Final"}"
-     skipping duplicate lib io.netty/netty-buffer #:mvn{:version 4.1.87.Final}
-     skipping duplicate lib io.netty/netty-codec #:mvn{:version 4.1.87.Final}
-     skipping duplicate lib io.netty/netty-codec-http #:mvn{:version 4.1.87.Final}
.     io.netty/netty-codec-socks #:mvn{:version "4.1.87.Final"}
! Duplicate entry "META-INF/io.netty.versions.properties" from "io.netty/netty-codec-socks #:mvn{:version "4.1.87.Final"}" already seen in "io.netty/netty-codec #:mvn{:version "4.1.87.Final"}"
-       skipping duplicate lib io.netty/netty-buffer #:mvn{:version 4.1.87.Final}
-       skipping duplicate lib io.netty/netty-codec #:mvn{:version 4.1.87.Final}
-       skipping duplicate lib io.netty/netty-common #:mvn{:version 4.1.87.Final}
-       skipping duplicate lib io.netty/netty-transport #:mvn{:version 4.1.87.Final}
-     skipping duplicate lib io.netty/netty-common #:mvn{:version 4.1.87.Final}
-     skipping duplicate lib io.netty/netty-transport #:mvn{:version 4.1.87.Final}
-   skipping duplicate lib io.netty/netty-resolver #:mvn{:version 4.1.87.Final}
.   io.netty/netty-resolver-dns #:mvn{:version "4.1.87.Final"}
! Duplicate entry "META-INF/io.netty.versions.properties" from "io.netty/netty-resolver-dns #:mvn{:version "4.1.87.Final"}" already seen in "io.netty/netty-codec #:mvn{:version "4.1.87.Final"}"
-     skipping duplicate lib io.netty/netty-buffer #:mvn{:version 4.1.87.Final}
-     skipping duplicate lib io.netty/netty-codec #:mvn{:version 4.1.87.Final}
.     io.netty/netty-codec-dns #:mvn{:version "4.1.87.Final"}
! Duplicate entry "META-INF/io.netty.versions.properties" from "io.netty/netty-codec-dns #:mvn{:version "4.1.87.Final"}" already seen in "io.netty/netty-codec #:mvn{:version "4.1.87.Final"}"
-       skipping duplicate lib io.netty/netty-buffer #:mvn{:version 4.1.87.Final}
-       skipping duplicate lib io.netty/netty-codec #:mvn{:version 4.1.87.Final}
-       skipping duplicate lib io.netty/netty-common #:mvn{:version 4.1.87.Final}
-       skipping duplicate lib io.netty/netty-transport #:mvn{:version 4.1.87.Final}
-     skipping duplicate lib io.netty/netty-common #:mvn{:version 4.1.87.Final}
-     skipping duplicate lib io.netty/netty-handler #:mvn{:version 4.1.87.Final}
-     skipping duplicate lib io.netty/netty-resolver #:mvn{:version 4.1.87.Final}
-     skipping duplicate lib io.netty/netty-transport #:mvn{:version 4.1.87.Final}
-   skipping duplicate lib io.netty/netty-transport #:mvn{:version 4.1.87.Final}
.   io.netty/netty-transport-native-epoll$linux-aarch_64 #:mvn{:version "4.1.87.Final"}
! Duplicate entry "META-INF/io.netty.versions.properties" from "io.netty/netty-transport-native-epoll$linux-aarch_64 #:mvn{:version "4.1.87.Final"}" already seen in "io.netty/netty-codec #:mvn{:version "4.1.87.Final"}"
-     skipping duplicate lib io.netty/netty-buffer #:mvn{:version 4.1.87.Final}
-     skipping duplicate lib io.netty/netty-common #:mvn{:version 4.1.87.Final}
-     skipping duplicate lib io.netty/netty-transport #:mvn{:version 4.1.87.Final}
.     io.netty/netty-transport-classes-epoll #:mvn{:version "4.1.87.Final"}
! Duplicate entry "META-INF/io.netty.versions.properties" from "io.netty/netty-transport-classes-epoll #:mvn{:version "4.1.87.Final"}" already seen in "io.netty/netty-codec #:mvn{:version "4.1.87.Final"}"
-       skipping duplicate lib io.netty/netty-buffer #:mvn{:version 4.1.87.Final}
-       skipping duplicate lib io.netty/netty-common #:mvn{:version 4.1.87.Final}
-       skipping duplicate lib io.netty/netty-transport #:mvn{:version 4.1.87.Final}
-       skipping duplicate lib io.netty/netty-transport-native-unix-common #:mvn{:version 4.1.87.Final}
-     skipping duplicate lib io.netty/netty-transport-native-unix-common #:mvn{:version 4.1.87.Final}
.   io.netty/netty-transport-native-epoll$linux-x86_64 #:mvn{:version "4.1.87.Final"}
! Duplicate entry "META-INF/io.netty.versions.properties" from "io.netty/netty-transport-native-epoll$linux-x86_64 #:mvn{:version "4.1.87.Final"}" already seen in "io.netty/netty-codec #:mvn{:version "4.1.87.Final"}"
! Duplicate entry "META-INF/maven/io.netty/netty-transport-native-epoll/pom.xml" from "io.netty/netty-transport-native-epoll$linux-x86_64 #:mvn{:version "4.1.87.Final"}" already seen in "io.netty/netty-transport-native-epoll$linux-aarch_64 #:mvn{:version "4.1.87.Final"}"
! Duplicate entry "META-INF/maven/io.netty/netty-transport-native-epoll/pom.properties" from "io.netty/netty-transport-native-epoll$linux-x86_64 #:mvn{:version "4.1.87.Final"}" already seen in "io.netty/netty-transport-native-epoll$linux-aarch_64 #:mvn{:version "4.1.87.Final"}"
-     skipping duplicate lib io.netty/netty-buffer #:mvn{:version 4.1.87.Final}
-     skipping duplicate lib io.netty/netty-common #:mvn{:version 4.1.87.Final}
-     skipping duplicate lib io.netty/netty-transport #:mvn{:version 4.1.87.Final}
-     skipping duplicate lib io.netty/netty-transport-classes-epoll #:mvn{:version 4.1.87.Final}
-     skipping duplicate lib io.netty/netty-transport-native-unix-common #:mvn{:version 4.1.87.Final}
.   io.netty/netty-transport-native-kqueue$osx-x86_64 #:mvn{:version "4.1.87.Final"}
! Duplicate entry "META-INF/io.netty.versions.properties" from "io.netty/netty-transport-native-kqueue$osx-x86_64 #:mvn{:version "4.1.87.Final"}" already seen in "io.netty/netty-codec #:mvn{:version "4.1.87.Final"}"
-     skipping duplicate lib io.netty/netty-buffer #:mvn{:version 4.1.87.Final}
-     skipping duplicate lib io.netty/netty-common #:mvn{:version 4.1.87.Final}
-     skipping duplicate lib io.netty/netty-transport #:mvn{:version 4.1.87.Final}
.     io.netty/netty-transport-classes-kqueue #:mvn{:version "4.1.87.Final"}
! Duplicate entry "META-INF/io.netty.versions.properties" from "io.netty/netty-transport-classes-kqueue #:mvn{:version "4.1.87.Final"}" already seen in "io.netty/netty-codec #:mvn{:version "4.1.87.Final"}"
-       skipping duplicate lib io.netty/netty-buffer #:mvn{:version 4.1.87.Final}
-       skipping duplicate lib io.netty/netty-common #:mvn{:version 4.1.87.Final}
-       skipping duplicate lib io.netty/netty-transport #:mvn{:version 4.1.87.Final}
-       skipping duplicate lib io.netty/netty-transport-native-unix-common #:mvn{:version 4.1.87.Final}
-     skipping duplicate lib io.netty/netty-transport-native-unix-common #:mvn{:version 4.1.87.Final}
.   io.netty.incubator/netty-incubator-transport-native-io_uring$linux-aarch_64 #:mvn{:version "0.0.16.Final"}
.     io.netty.incubator/netty-incubator-transport-classes-io_uring #:mvn{:version "0.0.16.Final"}
.   io.netty.incubator/netty-incubator-transport-native-io_uring$linux-x86_64 #:mvn{:version "0.0.16.Final"}
! Duplicate entry "META-INF/maven/io.netty.incubator/netty-incubator-transport-native-io_uring/pom.xml" from "io.netty.incubator/netty-incubator-transport-native-io_uring$linux-x86_64 #:mvn{:version "0.0.16.Final"}" already seen in "io.netty.incubator/netty-incubator-transport-native-io_uring$linux-aarch_64 #:mvn{:version "0.0.16.Final"}"
! Duplicate entry "META-INF/maven/io.netty.incubator/netty-incubator-transport-native-io_uring/pom.properties" from "io.netty.incubator/netty-incubator-transport-native-io_uring$linux-x86_64 #:mvn{:version "0.0.16.Final"}" already seen in "io.netty.incubator/netty-incubator-transport-native-io_uring$linux-aarch_64 #:mvn{:version "0.0.16.Final"}"
-     skipping duplicate lib io.netty.incubator/netty-incubator-transport-classes-io_uring #:mvn{:version 0.0.16.Final}
.   manifold/manifold #:mvn{:version "0.3.0"}
.     org.clojure/tools.logging #:mvn{:version "1.2.4"}
.     riddley/riddley #:mvn{:version "0.2.0"}
.   org.clj-commons/byte-streams #:mvn{:version "0.3.1"}
.     org.clj-commons/primitive-math #:mvn{:version "1.0.0"}
.   org.clj-commons/dirigiste #:mvn{:version "1.0.3"}
-   skipping duplicate lib org.clj-commons/primitive-math #:mvn{:version 1.0.0}
.   potemkin/potemkin #:mvn{:version "0.4.5"}
.     clj-tuple/clj-tuple #:mvn{:version "0.2.2"}
+ org.clojure/clojure #:mvn{:version "1.11.1"}
.   org.clojure/core.specs.alpha #:mvn{:version "0.2.62"}
.   org.clojure/spec.alpha #:mvn{:version "0.3.218"}
+ yada/lean #:mvn{:version "1.2.16"}
.   yada/aleph #:mvn{:version "1.2.16"}
.     yada/core #:mvn{:version "1.2.16"}
.       byte-streams/byte-streams #:mvn{:version "0.2.4-alpha4"}
! Duplicate entry "byte_streams/InputStream.class" from "byte-streams/byte-streams #:mvn{:version "0.2.4-alpha4"}" already seen in "org.clj-commons/byte-streams #:mvn{:version "0.3.1"}"
! Duplicate entry "byte_streams/InputStream$Streamable.class" from "byte-streams/byte-streams #:mvn{:version "0.2.4-alpha4"}" already seen in "org.clj-commons/byte-streams #:mvn{:version "0.3.1"}"
! Duplicate entry "byte_streams/Utils.class" from "byte-streams/byte-streams #:mvn{:version "0.2.4-alpha4"}" already seen in "org.clj-commons/byte-streams #:mvn{:version "0.3.1"}"
! Duplicate entry "byte_streams/ByteBufferInputStream.class" from "byte-streams/byte-streams #:mvn{:version "0.2.4-alpha4"}" already seen in "org.clj-commons/byte-streams #:mvn{:version "0.3.1"}"
! Duplicate entry "byte_streams/graph.clj" from "byte-streams/byte-streams #:mvn{:version "0.2.4-alpha4"}" already seen in "org.clj-commons/byte-streams #:mvn{:version "0.3.1"}"
! Duplicate entry "byte_streams/protocols.clj" from "byte-streams/byte-streams #:mvn{:version "0.2.4-alpha4"}" already seen in "org.clj-commons/byte-streams #:mvn{:version "0.3.1"}"
! Duplicate entry "byte_streams/utils.clj" from "byte-streams/byte-streams #:mvn{:version "0.2.4-alpha4"}" already seen in "org.clj-commons/byte-streams #:mvn{:version "0.3.1"}"
! Duplicate entry "byte_streams/pushback_stream.clj" from "byte-streams/byte-streams #:mvn{:version "0.2.4-alpha4"}" already seen in "org.clj-commons/byte-streams #:mvn{:version "0.3.1"}"
! Duplicate entry "byte_streams/Utils.java" from "byte-streams/byte-streams #:mvn{:version "0.2.4-alpha4"}" already seen in "org.clj-commons/byte-streams #:mvn{:version "0.3.1"}"
! Duplicate entry "byte_streams/InputStream.java" from "byte-streams/byte-streams #:mvn{:version "0.2.4-alpha4"}" already seen in "org.clj-commons/byte-streams #:mvn{:version "0.3.1"}"
! Duplicate entry "byte_streams/char_sequence.clj" from "byte-streams/byte-streams #:mvn{:version "0.2.4-alpha4"}" already seen in "org.clj-commons/byte-streams #:mvn{:version "0.3.1"}"
! Duplicate entry "byte_streams/ByteBufferInputStream.java" from "byte-streams/byte-streams #:mvn{:version "0.2.4-alpha4"}" already seen in "org.clj-commons/byte-streams #:mvn{:version "0.3.1"}"
! Duplicate entry "byte_streams.clj" from "byte-streams/byte-streams #:mvn{:version "0.2.4-alpha4"}" already seen in "org.clj-commons/byte-streams #:mvn{:version "0.3.1"}"
-         skipping duplicate lib clj-tuple/clj-tuple #:mvn{:version 0.2.2}
.         primitive-math/primitive-math #:mvn{:version "0.1.6"}
! Duplicate entry "primitive_math/Primitives.class" from "primitive-math/primitive-math #:mvn{:version "0.1.6"}" already seen in "org.clj-commons/primitive-math #:mvn{:version "1.0.0"}"
! Duplicate entry "primitive_math/Primitives.java" from "primitive-math/primitive-math #:mvn{:version "0.1.6"}" already seen in "org.clj-commons/primitive-math #:mvn{:version "1.0.0"}"
! Duplicate entry "primitive_math.clj" from "primitive-math/primitive-math #:mvn{:version "0.1.6"}" already seen in "org.clj-commons/primitive-math #:mvn{:version "1.0.0"}"
.       clj-time/clj-time #:mvn{:version "0.14.2"}
.         joda-time/joda-time #:mvn{:version "2.9.7"}
.       hiccup/hiccup #:mvn{:version "1.0.5"}
.       org.clojure/data.codec #:mvn{:version "0.1.0"}
.       org.clojure/tools.reader #:mvn{:version "1.0.0-beta4"}
.       prismatic/schema #:mvn{:version "1.1.7"}
.       ring/ring-core #:mvn{:version "1.6.3"}
.         commons-fileupload/commons-fileupload #:mvn{:version "1.3.3"}
.         commons-io/commons-io #:mvn{:version "2.5"}
.         crypto-equality/crypto-equality #:mvn{:version "1.0.0"}
.         crypto-random/crypto-random #:mvn{:version "1.2.0"}
.           commons-codec/commons-codec #:mvn{:version "1.6"}
.         ring/ring-codec #:mvn{:version "1.0.1"}
-           skipping duplicate lib commons-codec/commons-codec #:mvn{:version 1.6}
.   yada/bidi #:mvn{:version "1.2.16"}
.     bidi/bidi #:mvn{:version "2.0.16"}
-     skipping duplicate lib yada/core #:mvn{:version 1.2.16}
-   skipping duplicate lib yada/core #:mvn{:version 1.2.16}
[uberdeps] Packaged yada.jar in 12190 ms
waghanza commented 1 year ago

Not sure how to handle https://github.com/the-benchmarker/web-frameworks/actions/runs/4392804894/jobs/7692798145#step:7:173 @kubo39

waghanza commented 1 year ago

@wolfy-j @butschster @rustatian with the last road-runner version, I have

/usr/src/app # ./rr serve
2023-03-11T17:31:34.481Z        DEBUG   rpc             plugin was started      {"address": "tcp://127.0.0.1:6001", "list of the plugins with RPC methods:": ["jobs", "kv", "informer", "resetter", "app", "metrics"]}
[INFO] RoadRunner server started; version: 2.12.3, buildtime: 2023-02-16T13:08:41+0000
2023-03-11T17:31:34.648Z        ERROR   container/poller.go:16  vertex got an error     {"id": "jobs.Plugin", "error": "static_pool_allocate_workers: WorkerAllocate:\n\tgoridge_frame_receive: FileNotFound: Could not open input file: app.php\n"}
github.com/roadrunner-server/endure/pkg/container.(*Endure).poll.func1
        github.com/roadrunner-server/endure@v1.4.6/pkg/container/poller.go:16
error: static_pool_allocate_workers: WorkerAllocate:
        goridge_frame_receive: FileNotFound: Could not open input file: app.php

plugin: jobs.Plugin

config is

version: "2.7"
http:
  address: 0.0.0.0:3000
server:
  command: "php public/index.php"

for https://github.com/the-benchmarker/web-frameworks/tree/variants/php/spiral

kubo39 commented 1 year ago

@waghanza

This is because of the missing DC variable in preGeneratedCommand from deimos-openssl library. https://github.com/D-Programming-Deimos/openssl/blob/v3.3.0/dub.sdl#L10

try to add this two lines for dub.sdl.

dependency "vibe-d:tls" version="~>0.9.5"
subConfiguration "vibe-d:tls" "notls"
waghanza commented 1 year ago

@rustatian When running ./rr serve with

version: "2.7"
http:
  address: 0.0.0.0:3000
server:
  command: "php public/index.php"

I have

/usr/src/app # ./rr serve
2023-04-08T13:12:22.186Z        DEBUG   rpc             plugin was started      {"address": "tcp://127.0.0.1:6001", "list of the plugins with RPC methods:": ["kv", "informer", "resetter", "app", "metrics", "jobs"]}
[INFO] RoadRunner server started; version: 2.12.3, buildtime: 2023-02-16T13:08:41+0000
2023-04-08T13:12:22.218Z        ERROR   container/poller.go:16  vertex got an error     {"id": "http.Plugin", "error": "static_pool_allocate_workers: WorkerAllocate:\n\tgoridge_frame_receive: FileNotFound: Could not open input file: app.php\n"}
github.com/roadrunner-server/endure/pkg/container.(*Endure).poll.func1
        github.com/roadrunner-server/endure@v1.4.6/pkg/container/poller.go:16
error: static_pool_allocate_workers: WorkerAllocate:
        goridge_frame_receive: FileNotFound: Could not open input file: app.php

plugin: http.Plugin

with docker

FROM php:8.2-fpm-alpine3.16

RUN apk add git zlib-dev libzip-dev build-base autoconf nginx openrc curl-dev icu-dev oniguruma-dev linux-headers 
#RUN apt-get -qq update && apt-get -qy install git zlib1g-dev  libzip-dev build-essential autoconf nginx libcurl4-gnutls-dev libicu-dev libonig-dev
WORKDIR /usr/src/app

RUN docker-php-ext-install zip opcache

  RUN docker-php-ext-install sockets

  COPY 'public/index.php' 'public/index.php'
  COPY 'composer.json' 'composer.json'

    RUN curl -sSL https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
    RUN composer install --no-dev --prefer-dist --classmap-authoritative
    RUN composer dumpautoload -o
    RUN vendor/bin/rr get-binary

  CMD ./rr serve

The code is in https://github.com/the-benchmarker/web-frameworks/tree/variants/php/chubbyphp-roadrunner

waghanza commented 1 year ago

@ujibang is it possible to use config files for restheart (instead of json vars as environment values) ?

ujibang commented 1 year ago

yes indeed. do you want me to use a conf file?

waghanza commented 1 year ago

Yes please. Having json inside the config file that helps me, build the dockerfile was not as good idea (yaml inside json)

waghanza commented 1 year ago

I'm currently updating results so as this PR can be merged to master.

The next step is to have any UI that could fit multiples engines

waghanza commented 1 year ago

I will update results for next week using this branch, still some work to do

waghanza commented 12 months ago

I have a compilation issue @bung87 for scorper

/root/.nimble/pkgs/chronos-3.1.0/chronos/selectors2.nim(298, 12) Error: undeclared identifier: 'sigprocmask'
candidates (edit distance, scope distance); see '--spellSuggest':
 (6, 6): 'EINPROGRESS' [const declared in /root/.nimble/pkgs/chronos-3.1.0/chronos/oserrno.nim(1274, 5)]
 (6, 6): 'EINPROGRESS' [const declared in /root/.nimble/pkgs/chronos-3.1.0/chronos/oserrno.nim(1274, 5)]
 (6, 6): 'EINPROGRESS' [const declared in /root/.nimble/pkgs/chronos-3.1.0/chronos/oserrno.nim(1274, 5)]
 (6, 6): 'SIG_BLOCK' [const declared in /nim/lib/posix/posix_linux_amd64_consts.nim(403, 7)]
 (6, 6): 'SIG_BLOCK' [const declared in /nim/lib/posix/posix_linux_amd64_consts.nim(403, 7)]
 (6, 6): 'procCall' [proc declared in /nim/lib/system.nim(2965, 6)]

compiation command is

 nim c  \
    --excessiveStackTrace:off \
    -d:release \
    --opt:speed \
    --passC:-flto \
    --passL:-flto \
    server.nim

I'm on nimlang/nim:1.6.12-alpine

bung87 commented 12 months ago

give a another try, I just maked a bug fix for Chronos yesterday.

waghanza commented 12 months ago

same using devel @bung87

bung87 commented 12 months ago

same using devel @bung87

have you clear the chronos-3.1.0? chronos has no git tag, so it need download newest.

waghanza commented 12 months ago

yes @bung87. the compilation is made inside the container, and all caches are removed

Step 7/14 : RUN nimble install -y
 ---> Running in b04e7d61b960
  Verifying dependencies for server@0.1.0
    Prompt: No local packages.json found, download it from internet? -> [forced yes]
Downloading Official package list
    Success Package list downloaded.
 Installing scorper@#devel
Downloading https://github.com/bung87/scorper using git
  Verifying dependencies for scorper@#devel
 Installing chronos@>= 3.0.2
Downloading https://github.com/status-im/nim-chronos using git
  Verifying dependencies for chronos@3.1.0
 Installing stew@any version
Downloading https://github.com/status-im/nim-stew using git
  Verifying dependencies for stew@0.1.0
 Installing unittest2@any version
Downloading https://github.com/status-im/nim-unittest2 using git
  Verifying dependencies for unittest2@0.0.6
 Installing unittest2@0.0.6
   Success: unittest2 installed successfully.
 Installing stew@0.1.0
   Success: stew installed successfully.
 Installing bearssl@any version
Downloading https://github.com/status-im/nim-bearssl using git
  Verifying dependencies for bearssl@0.2.0
      Info: Dependency on unittest2@any version already satisfied
  Verifying dependencies for unittest2@0.0.6
 Installing bearssl@0.2.0
   Success: bearssl installed successfully.
 Installing httputils@any version
Downloading https://github.com/status-im/nim-http-utils using git
  Verifying dependencies for httputils@0.3.0
      Info: Dependency on stew@any version already satisfied
  Verifying dependencies for stew@0.1.0
      Info: Dependency on unittest2@any version already satisfied
  Verifying dependencies for unittest2@0.0.6
      Info: Dependency on unittest2@any version already satisfied
  Verifying dependencies for unittest2@0.0.6
 Installing httputils@0.3.0
   Success: httputils installed successfully.
      Info: Dependency on unittest2@any version already satisfied
  Verifying dependencies for unittest2@0.0.6
 Installing chronos@3.1.0
   Success: chronos installed successfully.
 Installing npeg@any version
Downloading https://github.com/zevv/npeg using git
  Verifying dependencies for npeg@1.2.1
 Installing npeg@1.2.1
   Success: npeg installed successfully.
 Installing zippy@any version
Downloading https://github.com/guzba/zippy using git
  Verifying dependencies for zippy@0.10.9
 Installing zippy@0.10.9
   Success: zippy installed successfully.
 Installing jsony@any version
Downloading https://github.com/treeform/jsony using git
  Verifying dependencies for jsony@1.1.5
 Installing jsony@1.1.5
   Success: jsony installed successfully.
      Info: Dependency on stew@any version already satisfied
  Verifying dependencies for stew@0.1.0
      Info: Dependency on unittest2@any version already satisfied
  Verifying dependencies for unittest2@0.0.6
 Installing urlly@>= 0.2.0 & < 0.3.0
Downloading https://github.com/treeform/urlly using git
  Verifying dependencies for urlly@0.2.0
 Installing urlly@0.2.0
   Success: urlly installed successfully.
 Installing scorper@#devel
   Success: scorper installed successfully.
 Installing server@0.1.0
   Success: server installed successfully.
Removing intermediate container b04e7d61b960
bung87 commented 12 months ago

weird, can't reproduce, I just cloned this repository , switch to Nim Compiler Version 1.6.12 [MacOSX: amd64] use the command upper, and I also checked the chronos source files that installed, it does have the bugfix I fixed yesterday.

waghanza commented 12 months ago

probably due to alpine then

waghanza commented 12 months ago

I have the same error with Nim Compiler Version 1.6.12 [Linux: amd64] @bung87 seems related to https://github.com/status-im/nim-chronos/blob/f748387462b2472a941e916285f04fc14fd1180a/chronos/selectors2.nim#L298

bung87 commented 12 months ago

I have the same error with Nim Compiler Version 1.6.12 [Linux: amd64] @bung87 seems related to https://github.com/status-im/nim-chronos/blob/f748387462b2472a941e916285f04fc14fd1180a/chronos/selectors2.nim#L298

but I've fixed yesterday , see https://github.com/status-im/nim-chronos/commit/38cc233700dbd1601bf44ec5884ccc4d48b44bf9