Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add uwebsockets.js #6506

Merged
merged 25 commits into from
Jul 28, 2023
Merged

add uwebsockets.js #6506

merged 25 commits into from
Jul 28, 2023

Conversation

jim-king-2000
Copy link
Contributor

I wanna add uwebsockets.js to the benchmarks since it defeats all of the other frameworks here.

@jim-king-2000
Copy link
Contributor Author

It seems that the npm here does not support github:uNetworking/uWebSockets.js#v20.30.0. Any idea?

@waghanza
Copy link
Collaborator

It seems that the npm here does not support github:uNetworking/uWebSockets.js#v20.30.0. Any idea?
git is not installed

however @jim-king-2000, the author of uws (@uNetworkingAB) does not want to be included in here
#1064

@jim-king-2000
Copy link
Contributor Author

however @jim-king-2000, the author of uws (@uNetworkingAB) does not want to be included in here
#1064

Could you please check it with him again? If he insists to not be included, we have to close this PR.

@waghanza
Copy link
Collaborator

lets way about 10 days if no reaction and we will merge, but I'm sure he will :-)

@jim-king-2000
Copy link
Contributor Author

lets way about 10 days if no reaction and we will merge

Sure.

but I'm sure he will :-)

That would be better.

@jim-king-2000
Copy link
Contributor Author

Any update?

Copy link
Collaborator

@waghanza waghanza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When running pm2-runtime start app.js -i max I have

(node:27) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
/usr/src/app/app.js:1
import { App } from 'uWebSockets.js';
^^^^^^
SyntaxError: Cannot use import statement outside a module
    at internalCompileFunction (node:internal/vm:73:18)
    at wrapSafe (node:internal/modules/cjs/loader:1178:20)
    at Module._compile (node:internal/modules/cjs/loader:1220:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at /usr/local/lib/node_modules/pm2/lib/ProcessContainer.js:304:25
    at wrapper (/usr/local/lib/node_modules/pm2/node_modules/async/internal/once.js:12:16)
    at next (/usr/local/lib/node_modules/pm2/node_modules/async/waterfall.js:96:20)
    at /usr/local/lib/node_modules/pm2/node_modules/async/internal/onlyOnce.js:12:16

javascript/uwebsockets/app.js Outdated Show resolved Hide resolved
javascript/uwebsockets/config.yaml Outdated Show resolved Hide resolved
@jim-king-2000
Copy link
Contributor Author

When running pm2-runtime start app.js -i max I have

(node:27) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
/usr/src/app/app.js:1
import { App } from 'uWebSockets.js';
^^^^^^
SyntaxError: Cannot use import statement outside a module
    at internalCompileFunction (node:internal/vm:73:18)
    at wrapSafe (node:internal/modules/cjs/loader:1178:20)
    at Module._compile (node:internal/modules/cjs/loader:1220:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at /usr/local/lib/node_modules/pm2/lib/ProcessContainer.js:304:25
    at wrapper (/usr/local/lib/node_modules/pm2/node_modules/async/internal/once.js:12:16)
    at next (/usr/local/lib/node_modules/pm2/node_modules/async/waterfall.js:96:20)
    at /usr/local/lib/node_modules/pm2/node_modules/async/internal/onlyOnce.js:12:16

Change app.js to app.mjs.

javascript/uwebsockets/config.yaml Outdated Show resolved Hide resolved
@jim-king-2000
Copy link
Contributor Author

Why did it still fail?

@jim-king-2000
Copy link
Contributor Author

@waghanza Would you please take a look at it? What is the error message?

@waghanza
Copy link
Collaborator

(node:166) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
/usr/src/app/app.js:1
import { App } from "uWebSockets.js";
^^^^^^
SyntaxError: Cannot use import statement outside a module
    at internalCompileFunction (node:internal/vm:73:18)
    at wrapSafe (node:internal/modules/cjs/loader:1178:20)
    at Module._compile (node:internal/modules/cjs/loader:1220:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at /usr/local/lib/node_modules/pm2/lib/ProcessContainer.js:304:25
    at wrapper (/usr/local/lib/node_modules/pm2/node_modules/async/internal/once.js:12:16)
    at next (/usr/local/lib/node_modules/pm2/node_modules/async/waterfall.js:96:20)
    at /usr/local/lib/node_modules/pm2/node_modules/async/internal/onlyOnce.js:12:16

@jim-king-2000

javascript/uwebsockets/package.json Outdated Show resolved Hide resolved
@jim-king-2000
Copy link
Contributor Author

Success. What about the attitude of the author of uws?

@waghanza
Copy link
Collaborator

We are going to include uws in here @uNetworkingAB

@jim-king-2000
Copy link
Contributor Author

@waghanza Let's just do it. We could disable it if there is any concern from the author.

@cyrusmsk
Copy link
Contributor

I think adding C++ package is even more interesting than js

@waghanza
Copy link
Collaborator

Be my guest @cyrusmsk

@waghanza waghanza enabled auto-merge (squash) July 28, 2023 20:20
@waghanza waghanza merged commit 77e3ab4 into the-benchmarker:master Jul 28, 2023
4 checks passed
@jim-king-2000
Copy link
Contributor Author

I think adding C++ package is even more interesting than js

Maybe I could try to add uws cpp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants