Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Implementation of websocket API for importer #3073
I'm playing around with websockets with the ultimate goal of building a web importer frontend for the beets importer process. Currently I'm trying to get a proof of concept to work using Flask-SocketIO with eventlet. For this it's necessary to monkey patch several stdlib modules to 'green' them so they're compatible with eventlet.
However, when I perform the monkey patch I get an error:
After some analysis and trial and error, I got things to work by altering the init method of
95c95 < queue.Queue.__init__(self, maxsize) --- > super(CountedQueue, self).__init__(maxsize)
That's nice, but I have a few questions still:
Trying to learn and contribute :).
Wow! This seems like an incredibly cool project! I'm really excited to see where you go with it.
Thanks for your feedback :).
I'm on very new ground here, so it might take me some time to get this done properly. Currently I'm reading up on coroutine based asynchronous programming, and differences between
That lack of understanding gives rise to a very specific problem: how do I make the importer wait for a choice that I made in the browser (or whatever client)? Because of the async nature of things, it's not really normal to want some function to block and wait for an event to happen.
If you -or anyone else for that matter- has tips on how I can improve my knowledge best here, please let me know. Also, I might want to ask for help more. Somehow I tend to fele insecure doing that, which is a shame.
I'll see if I can create a pull request today with that small change.
Okay I think I could really benefit from reading up on some fundamental theory on threading, async event-driven programming and the pipeline design pattern.
Could anyone recommend good books or other sources (blogs, videos) that will help me out? I've found some interesting talks on YouTube, but I notice not everything sticks too well because I lack fundamental knowledge. I'll post this question on the discussion board as well.