Coder Social home page Coder Social logo

Http over unix socket about aiohttp HOT 17 CLOSED

aio-libs avatar aio-libs commented on May 10, 2024
Http over unix socket

from aiohttp.

Comments (17)

fafhrd91 avatar fafhrd91 commented on May 10, 2024

How about custom scheme, something like unix://socket-path/path ?

from aiohttp.

tailhook avatar tailhook commented on May 10, 2024

Not sure it's a good idea for two reasons:

  1. socket-path should be percent-encoded? (may contain slashes)
  2. https can be used too (unix+https://socket-path/path?)

I prefer some kwarg to a request or a session.

from aiohttp.

fafhrd91 avatar fafhrd91 commented on May 10, 2024

i don't like percent-encoding also, but in that case we can move connection to to separate Connector class/function and remove loop.create_connection from session and client.

how about connector parameter? something like:

   aiohttp.request('get', ..., connector=UnixDomainConnector('/tmp/...'))

then it would be possible to create http proxy connector for example

what do you think?

from aiohttp.

tailhook avatar tailhook commented on May 10, 2024

Yes. Sounds great

from aiohttp.

fafhrd91 avatar fafhrd91 commented on May 10, 2024

Paul, do you want to work on this?

from aiohttp.

tailhook avatar tailhook commented on May 10, 2024

Sure, unless you want to do it quicker :)

from aiohttp.

fafhrd91 avatar fafhrd91 commented on May 10, 2024

go ahead! :)

from aiohttp.

paultag avatar paultag commented on May 10, 2024

I'd love this feature oodles! Just adding a 👍 - thanks for working on this!

from aiohttp.

fafhrd91 avatar fafhrd91 commented on May 10, 2024

@tailhook let's wait with session integration with connector. i'd like to think about such integration.

from aiohttp.

tailhook avatar tailhook commented on May 10, 2024

@fafhrd91, ok, I don't need the feature itself. The debatable question, is that connector might be better used for connection pooling, instead of session. And session left only for cookie handling.

Anyway, feel free to close the issue if you think it done.

from aiohttp.

paultag avatar paultag commented on May 10, 2024

I'd really be able to use this feature; I'd be happy to test code or whatever :)

It'd be super useful!

from aiohttp.

fafhrd91 avatar fafhrd91 commented on May 10, 2024

@tailhook i agree about connection pooling, this is exactly what i'm planing to think about.

from aiohttp.

tianon avatar tianon commented on May 10, 2024

👍 consuming HTTP over unix sockets via aiohttp would be excellent; there are still plans to flesh out the rest of the interface so this is properly possible, right?

from aiohttp.

fafhrd91 avatar fafhrd91 commented on May 10, 2024

yes. i'm planing to commit api changes within next couple days.

from aiohttp.

tianon avatar tianon commented on May 10, 2024

Excellent, thanks for confirming ❤️

from aiohttp.

fafhrd91 avatar fafhrd91 commented on May 10, 2024

i've just commited new changes @ce21cba8869b8b80849850c1d645fe029dc054b2

from aiohttp.

lock avatar lock commented on May 10, 2024

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

from aiohttp.

Related Issues (20)

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.