Code Monkey home page Code Monkey logo

readme's People

Contributors

pwtail avatar

Stargazers

 avatar

Watchers

 avatar

readme's Issues

I need your feedback!

FastAPI is kind of mainstream solution for making async APIs, and also you surely are aware of the greenlet hack that sqlalchemy uses to enable async support. So I greatly would like to get your feedback on this.

This repo (balrog project) proposes an alternative approach to the async support.

@tiangolo @Kludex

I need your feedback! [greenlets]

I've made an RFC for async django orm

I would be immensely grateful if you could have a look and give some feedback. This issue is good place for that!

@zzzeek

Since RFC text is changing rapidly, here is the original text on greenlets:

Is it a solution?

In my opinion, not. As I said, it is a hack. Here is the list of downsides (obviously not full):

First and the biggest: you write synchronous functions using async I/O at the same time - something considered as a hack
by the Python documentation itself. By doing so you actually acknowledge the fact that your codebase is otherwise unportable and cannot
take big changes. Obviously it gets more complex (and django for example is pretty complex by itself).

Then, the stacks of frames is also broken. It gets split between the greenlets that your code is executed in.
Thus, the debugging experience suffers. Moreover, greenlet is written partly in C and asyncio AFAIK did not
promise to always work with greenlets.

Also, you need to strictly split your API into the public and the private part. The public API should be wrapped in greenlets,
the private one should not.

The performance also can suffer, because every async coroutine hitting database is wrapped. So, you see, there are a
number of downsides.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.