alphacep / vosk-server

WebSocket, gRPC and WebRTC speech recognition server based on Vosk and Kaldi libraries
Apache License 2.0
918 stars 248 forks source link

uWSGI for Websocket and gRPC ? #56

Closed apntt closed 4 years ago

apntt commented 4 years ago

I saw you comment "Websocket and grpc servers are similar. I need to think how to run gtpc inside the docker too."

May I suggest you to use uWSGI for websocket and gRPC.

it's easy to configure with a simple file and robust !

Just a prosposal if you have no other lead.

nshmyrev commented 4 years ago

Just a prosposal if you have no other lead.

We need to share the data object (Model) across workers, how is that implemented in uWSGI? I see only shared area, but not the objects.

apntt commented 4 years ago

I will investigate and come back to you.

nshmyrev commented 4 years ago

Feel free to reopen if you have some more information on this.

apntt commented 4 years ago

Unfornately not, i run many tests on uWSGI but worker can share file, like you said it but each worker load the file (=model) in memory so obviously the memory expload very quickly depending size of model and number of worker.

Sorry i don't bring help on this...