> Paxos.com I'm confused by the relationship between Paxos, the company, and Paxos, the algorithm. Do the authors of Paxos work for Paxos? Edit: https://en.m.wikipedia.org/wiki/Paxos_(computer_science) Ah; both are named for a fictional financial systen
Write Fast Apps Using Async Python 3.6 and Redis
51–60 of 134 posts
Re: Write Fast Apps Using Async Python 3.6 and Redis
#52Earlier quoted context omitted.
You normally use something like redis to store the state. If you were going to share state in memory between threads, how would you handle the case where the second request goes to a different server or that the process has restarted? You'd need redis anyway, so you might as well just use it in all cases.
I get that everyone's responses are thinking some big public thing. I'm thinking small toy implementation for my home network. The toy experiment is how to do what's trivial in Node with Python. Mainly because I like working with python. I think the answer might be: Python is the wrong tool for the job.
What you're referring to works equally well in the single-process case for both.
Re: Write Fast Apps Using Async Python 3.6 and Redis
#53Re: Write Fast Apps Using Async Python 3.6 and Redis
#54Earlier quoted context omitted.
problem with Sanic that it does not implement streaming properly. so it is very easy to kill any Sanic process, 10-20 seconds. again any.
Would you mind elaborating?
Re: Write Fast Apps Using Async Python 3.6 and Redis
#55Earlier quoted context omitted.
You normally use something like redis to store the state. If you were going to share state in memory between threads, how would you handle the case where the second request goes to a different server or that the process has restarted? You'd need redis anyway, so you might as well just use it in all cases.
I get that everyone's responses are thinking some big public thing. I'm thinking small toy implementation for my home network. The toy experiment is how to do what's trivial in Node with Python. Mainly because I like working with python. I think the answer might be: Python is the wrong tool for the job.
Re: Write Fast Apps Using Async Python 3.6 and Redis
#56Earlier quoted context omitted.
well it can also make things faster. well in your example it won't. but consider you need to load 4 requests and do operations on each of them. if you schedule them in an async fashion you can begin operating on the first one that's ready and not the first one you defined. and this is also often the case. a website does not just do one request to the database. mostly it runs multiple ones and often they don't interfe…
> if you schedule them in an async fashion you can begin operating on the first one that's ready and not the first one you defined. This type of operation is a given in any production quality webserver, whether it runs with multiple threads and blocking IO or using a non-blocking approach with greenlets. For a web application, this is an implementation detail that should not be explicit within the request handling co…
Re: Write Fast Apps Using Async Python 3.6 and Redis
#57Earlier quoted context omitted.
I get that everyone's responses are thinking some big public thing. I'm thinking small toy implementation for my home network. The toy experiment is how to do what's trivial in Node with Python. Mainly because I like working with python. I think the answer might be: Python is the wrong tool for the job.
The problem is that accessing shared state concurrently in a multi-process context is a non-trivial problem, so specific software emerged that handles these problems for you. The simplest solution is to use a small DB system like sqlite. It is built into Python (import sqlite3) performs reasonably well and you do not have to run an additional service. Now if a small DB like sqlite already feels overblown to you (and…
Re: Write Fast Apps Using Async Python 3.6 and Redis
#58Earlier quoted context omitted.
You normally use something like redis to store the state. If you were going to share state in memory between threads, how would you handle the case where the second request goes to a different server or that the process has restarted? You'd need redis anyway, so you might as well just use it in all cases.
I get that everyone's responses are thinking some big public thing. I'm thinking small toy implementation for my home network. The toy experiment is how to do what's trivial in Node with Python. Mainly because I like working with python. I think the answer might be: Python is the wrong tool for the job.
Python is excellent for toy implementations, and real ones too in many cases.
Re: Write Fast Apps Using Async Python 3.6 and Redis
#59Earlier quoted context omitted.
You normally use something like redis to store the state. If you were going to share state in memory between threads, how would you handle the case where the second request goes to a different server or that the process has restarted? You'd need redis anyway, so you might as well just use it in all cases.
I get that everyone's responses are thinking some big public thing. I'm thinking small toy implementation for my home network. The toy experiment is how to do what's trivial in Node with Python. Mainly because I like working with python. I think the answer might be: Python is the wrong tool for the job.
Python is excellent for toy implementations, and real ones too in many cases.
Re: Write Fast Apps Using Async Python 3.6 and Redis
#60Earlier quoted context omitted.
> if you schedule them in an async fashion you can begin operating on the first one that's ready and not the first one you defined. This type of operation is a given in any production quality webserver, whether it runs with multiple threads and blocking IO or using a non-blocking approach with greenlets. For a web application, this is an implementation detail that should not be explicit within the request handling co…
I think you're talking about different things; the idea is not that you can multiplex the requests coming in, but also the requests going out to the database and etc for each web request handling function.