Not able to run benchmarks for the typescript project
smehta91 opened this issue · 2 comments
Hey !!
Thanks for the amazing video https://www.youtube.com/watch?v=h7UEwBaGoVo
I am trying to do some optimizations in the typescript project (in terms of web server choice, code organization, and more)
But I am running into an issue while running the benchmarks for ts
.
I started the server using
$> node typescript/dist/index.js callback localhost 9999
started client using
$> cargo +nightly run --bin test_client 2 localhost --path / --port 9999
Running the client is crashing the server with
undefined:1
!join foo0
^
SyntaxError: Unexpected token ! in JSON at position 0
at JSON.parse (<anonymous>)
at WebSocket.<anonymous> (/Users/shreymehta/projects/tyrone-biggums/typescript/dist/server/socket.js:13:34)
at WebSocket.emit (events.js:315:20)
at Receiver.receiverOnMessage (/Users/shreymehta/projects/tyrone-biggums/typescript/node_modules/ws/lib/websocket.js:1098:20)
at Receiver.emit (events.js:315:20)
at Receiver.dataMessage (/Users/shreymehta/projects/tyrone-biggums/typescript/node_modules/ws/lib/receiver.js:528:14)
at Receiver.getData (/Users/shreymehta/projects/tyrone-biggums/typescript/node_modules/ws/lib/receiver.js:446:17)
at Receiver.startLoop (/Users/shreymehta/projects/tyrone-biggums/typescript/node_modules/ws/lib/receiver.js:148:22)
at Receiver._write (/Users/shreymehta/projects/tyrone-biggums/typescript/node_modules/ws/lib/receiver.js:83:10)
at writeOrBuffer (_stream_writable.js:352:12)
I can see this project is being worked upon daily. Can you please point me to the commit at which this comparison was done?
Ah yes.
I have used tags to help with these types of issues!
https://github.com/ThePrimeagen/tyrone-biggums/tree/go-vs-ts-video-1
Let me know if that works out or not :)
I didn't really document how to run these things as its all for me to do, but if you get through it and figure out how to run it all, awesome.
I recommend the rust client for testing and then using docker for one of the three servers.
I'm in the process right now rewriting the client in rust. You will be able to test a video 2 very easy.