3 ms·
Two comments: - It looks like the SQL queries produced by pure_python() and simple_sql() are structurally different, which would make any comparison worthless.
by ngrilly 10y ago
Two comments:
- It looks like the SQL queries produced by pure_python() and simple_sql() are structurally different, which would make any comparison worthless.
- How does the author solve the long running tasks (> 500 ms in the article) problem with Erlang? In Python, it looks like he was using Celery with Redis then RabbitMQ. What does he use in Erlang? (Erlang message queues have no built-in persistence.)
- ken47 10y agoCan't comment on what the author used, but Mnesia can be used to build a primitive, durable MQ: http://learnyousomeerlang.com/mnesia http://learnyousomeerlang.com/mnesia There is also RabbitMQ, which itself is written in Erlang.
- dozzie 10y agoWell, Mnesia could be used to build that, but what for in the first place? You just spawn a worker process under a supervisor and leave it to finish its job. Really, no need for a queue (unless you want to postpone some tasks until some others finish, but this is more synchronization problem and can be solved without fully-blown database).
- loxs 10y agoErlang can have long living processes (green threads) and that's usually how we solve problems. There is absolutely no problem (it's encouraged) to have thousand of processes living minutes or hours if we need so.
- ngrilly 10y agoYes, but how do you manage fault tolerance at the machine level? If the machine is rebooted for some reason, the pending messages will be lost, and will never be processed. A persistent queue is necessary for this reason. This is the reason why people use tools like Celery or RabbitMQ (which is written in Erlang by the way). I don't see how replacing Python with Erlang changes anything in this regard.
- abrookewood 10y agoYou handle that with multiple nodes that sync their state.