4 ms·
I blame them and not the technology stack they used. It's idiotic to mix blocking technologies with non-blocking technologies as blocking the IO loop is fatal f
by amix 15y ago
I blame them and not the technology stack they used. It's idiotic to mix blocking technologies with non-blocking technologies as blocking the IO loop is fatal for performance as you won't be able to process any events while the IO loop is blocked.
And this person still has not learned from their mistake, they think that using SQLAlchemy would have solved their problem. If they wanted to make Twisted work they should have picked a database that can be used in a non-blocking way.
The reason why I like node.js is that everything is built in a non-blocking way. Twisted has the same philosophy until people think they can get away using a blocking library inside the IO loop.
- dextorious 15y agoSO, basically you just learned about non-blocking and think node.js is a golden bullet. It's not. And it's exactly the same situation as anything they could have used in Python, as soon as they add actual code to get work done (as opposed to hand over work and wait for a callback). """The reason why I like node.js is that everything is built in a non-blocking way. Twisted has the same philosophy until people think they can get away using a blocking library inside the IO loop.""" That's not what they were doing, though. At the end of the non-blocking fiesta you want to actually return results to a waiting connection -- actual results, rendered templates etc. That will block and take time -- especially in node.js which is single threaded. So they just traded Python's threads/processes/lightweight threads for node.js processes.
- taf2 15y agoSingle threaded, but small enough processes that multiple processes in node makes up for it. http://nodejs.org/docs/latest/api/child_processes.html http://nodejs.org/docs/latest/api/child_processes.html build a process pool and queue jobs to background processes, it's the same arch, you'd use if you had threads so what's your point?
- amix 15y agoNo, I did not learn about non-blocking approach recently. I have built solutions in Java and in node that scaled to over 300.000 open connections pocessing billions of messages. Besides that you are missing my point, which basically is to not mix blocking with non-blocking code.
- clojurerocks 15y agoThis is another reason why i moved off of django. This arrogant attitude of belittling other people when they have problems. I expect this from the rails community not from python. However django is increasingly becoming a "its the django way or the highway buddy". Which is dissapointing frankly.
- clojurerocks 15y agoNice how i get voted down. Thus proving my point about the python and django communities. So glad i moved to node. I will still consider using python for backend stuff though.
- clojurerocks 15y agoYawn.
- mekoka 15y agoYour point has not been proven. You should forget the meta stuff (python people are like this, django people are like that) and counter with arguments when someone attacks your point of view on the topic at hand. No one knows who you are, just say what you have to say (about the topic) based on your experience. If you draw conclusions, strengthen them with data if possible, or argue why you believe that they're valid. People will call you on them if they feel you're in the wrong. It doesn't mean they hate you. You should do the same. Also, the tone on a keyboard is often easily abrasive. The pen is mightier than the sword. The keyboard is harsher than the mouth. Don't fall for the bait focus on the arguments.
- clojurerocks 15y agoThe problem in part is with hackernews actually. I dont find it very conducive to good discussions. I rarely comment myself actually. Most comments seem to be he said/she said and argumentative. Im actually surpised people dont ask for this site to be improved. And i guess it never will. But it would be nice to have constructive conversations about these things rather then arguments.