Design discussion for KommandKit - async, multithreaded, ORC-ready web framework

2023-04-22 Thread pwernersbach
Some thoughts: * ARC and ORC use a shared heap, so theoretically you can pass GC’d data around via Isolated[T], and not have to worry about architecting everything to be thread-local. How well this works in practice is TBD. * As @elcritch said, you will need to marry a channel or multithread

State of HTTP Servers in Nim

2023-04-16 Thread pwernersbach
Makes sense. The lack of non-experimental compiler supported string views makes it really easy to write string parsing code that makes unnecessary temporary copies. For instance, this will copy in some cases: var readOnlyObject = ObjectType(readOnlyString: “foobar”) … let re

State of HTTP Servers in Nim

2023-04-16 Thread pwernersbach
The interesting thing is microasynchttpserver doesn't do anything substantial itself; it just reads the header data from an AsyncSocket, passes the header data to picohttpparser, and schedules the application callback with the data, to be completed via asyncdispatch. So you're essentially benchm

State of HTTP Servers in Nim

2023-04-14 Thread pwernersbach
How is the performance of microasynchttpserver when your code reads the bodies?

State of HTTP Servers in Nim

2023-04-08 Thread pwernersbach
No problem, glad to help! We definitely need more production software written in Nim. If you get microasynchttpserver adapted to modern Nim, or even half way, I’m happy to accept a finished or work-in-progress PR for it. Judging by this post, there’s still a need for microhttpserver. Also, two

State of HTTP Servers in Nim

2023-04-08 Thread pwernersbach
In 2017, I wrote a backend service in Nim that had the following requirements: 1. CPU and memory bound (in different parts of the business logic) 2. HTTP API 3. Dozens of simultaneous HTTP API connections 4. Each client POST’ing 64MB of data. Due to (3) & (4), the cost of buffering each

amysql - Async MySQL Connector write in pure Nim.

2020-11-17 Thread pwernersbach
This is cool. When I wrote , I had to introduce a lot of scaffolding code to use Qt's synchronous C++ MySQL library, as there was no better MySQL library available in Nim. I'm tempted to resurrect