bbaldino
05/14/2020, 6:42 PMuser/{userId}
and want to make sure all requests for a given userId
are handled in the order they were received. I've tried doing this in the route implement, but because there are multiple threads calling it there's still wiggle room as to the order in which they're handled: I know the network is already a variable, but I'm trying to get as close as possible to handling them in the order in which they were received. I looked at doing this in a feature, but even then the request is already dispatched to a worker thread so they've already been parallelized, is there a lower level hook? Or maybe this whole endeavor is misguided?Shawn
05/14/2020, 7:13 PMbbaldino
05/14/2020, 7:14 PMbbaldino
05/14/2020, 7:14 PMbbaldino
05/14/2020, 7:15 PMuserId
, in this exampleShawn
05/14/2020, 7:21 PMuserId
, probably)bbaldino
05/14/2020, 7:22 PMbbaldino
05/14/2020, 7:22 PMShawn
05/14/2020, 7:28 PMShawn
05/14/2020, 7:29 PMbbaldino
05/14/2020, 7:29 PMbbaldino
05/14/2020, 7:32 PMconnectionGroupSize
, workerGroupSize
, and callGroupSize
all to 1
in the embeddedServer
config still results in parallelization, but from what I can see in the code, ktor still lets Jetty
create its own threadpool, so that may be where the multi-threading is coming inbbaldino
05/14/2020, 7:32 PM<http://Dispatchers.IO|Dispatchers.IO>
threadthanksforallthefish
05/15/2020, 6:29 AMuserid
as key for your message, message A is processed before message B) or more lightweight. just be sure ordering is guaranteed by the system you choosebbaldino
05/15/2020, 3:38 PM