bung87 / scorper

scorper is a micro and elegant web framework written in Nim
Apache License 2.0
81 stars 6 forks source link

multiple threads support #29

Open bung87 opened 3 years ago

bung87 commented 3 years ago

use workers handle request.

bung87 commented 3 years ago

I may finally turn the multithread model to httpbeast, in the meanwhile may not heavily relys on chronos

bung87 commented 3 years ago

options:
threads with shared ptrs: https://github.com/cheatfate/wanted multiple server per threads bind on same address and port with event driven: httpbeast use nginx as front with multiple processes

shayanhabibi commented 3 years ago

The issue with httpbeast however being that it doesn't support windows platform :(

bung87 commented 3 years ago

we can use https://github.com/xflywind/httpx which use https://github.com/xflywind/ioselectors support windows platform, httpx is basically httpbeast with ioselectors. further more we can replace async macros with chronos's .

shayanhabibi commented 3 years ago

Performance with multithreading atm with httpx seems to suffer on windows

But then how big that impact would be using chronos would be interesting.

I would love to help; unfortunately macros isn't something I've had time to work with; same for networking hahahaha.

bung87 commented 3 years ago

hmm, It's big like change scorper major version , need rewrite all stream handle from std socket to chronos streamtransport , start server like httpbeast does . it's big I think.

sdmcallister commented 3 years ago

@bung87

I may finally turn the multithread model to httpbeast, in the meanwhile may not heavily relys on chronos

Seems like a big change. Would this significantly improve (what seems like already good) performance?

bung87 commented 3 years ago

yes , it will significantly improve performance, It will not much relys on chronos only async macros I think, It will be a big change , I have not decide make changes in scorper repository or create new prjoect, it will be much like move current apis to httpbeast.

在 2021年9月3日,下午9:13,Steve @.***> 写道:

 @bung87

I may finally turn the multithread model to httpbeast, in the meanwhile may not heavily relys on chronos

Seems like a big change. Would this significantly improve (what seems like already good) performance?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.