Python/Erlang: What’s the difference between Twisted, Stackless, Greenlet, Eventlet, Coroutines? Are they similar to Erlang processes?

First of all, non-blocking I/O has nothing in common with green threads or coroutines, but it can affect how they’re scheduled. Now: Twisted is a classic non-blocking I/O framework — application code is written in async style using callbacks. Gevent and eventlet use the greenlet library for coroutines/greenthreads/greenlets. There is one dedicated greenlet for running … Read more

Can SQLAlchemy be configured to be non-blocking?

You can use SQLA in a non-blocking style using gevent. Here’s an example using psycopg2, using psycopg2’s coroutine support: https://bitbucket.org/zzzeek/green_sqla/ I’ve also heard folks use the same idea with pymysql. As pymysql is in pure Python and uses the sockets library, gevent patches the socket library to be asynchronous.

Linux Blocking vs. non Blocking Serial Read

The code you mention is IMO poorly coded and commented. That code does not conform to POSIX practices for portability as described in Setting Terminal Modes Properly and Serial Programming Guide for POSIX Operating Systems. That code does not mention that it uses non-canonical (aka raw) mode, and reuses the “blocking” and “nonblocking” terminology to … Read more

Spring WebFlux differences when Netty vs. Tomcat is used under the hood

Currently there are 2 basic concepts to handle parallel access to a web-server with various advantages and disadvantages: Blocking Non-Blocking Blocking Web-Servers The first concept of blocking, multi-threaded server has a finite set amount of threads in a pool. Every request will get assigned to specific thread and this thread will be assigned until the … Read more

Can I make a fully non-blocking backend application with http-kit and core.async?

With the async approach you get to send the data to the client when its ready, instead of blocking a thread the whole time its being prepared. For http-kit, you should be using an async handler described in the documentation. After delegating the request to an async handler in a proper way, you can implement … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)