Code Monkey home page Code Monkey logo

Comments (8)

iffyio avatar iffyio commented on June 11, 2024

This sounds reasonable to me.

Not sure if I like the filter names local_receive_and_send_to_endpoint and endpoint_receive_and_send_to_local, but I feel like they are clear on what is happening at each point. If anyone has alternatives, would love to hear them.

If we can say that the proxy receives data upstream and sends response back downstream, we should be able to call them onReceive and onSend?

from quilkin.

markmandel avatar markmandel commented on June 11, 2024

My concern with onReceive and onSend (or similar), is that without memorising and internalising the flow, it could be easy to think:

"Wait, am I receiving from the local port, or the endpoint?" or "am I sending from the local port or the endpoint?" and then have to look at the docs (probably several times 😄 )

I had similar thoughts about maybe doing local and endpoint (or onLocal)... but I'm concerned the same confusion may still exist 🤔

from quilkin.

iffyio avatar iffyio commented on June 11, 2024

Another suggestion is onSendUpstream and onSendDownstream that has the direction implied in the name, is this clearer do you think? We would also be able to use direction = upstream | downstream globally for filter configurations that need a direction like the rate limiter

from quilkin.

markmandel avatar markmandel commented on June 11, 2024

I'm definitely on board with the on_ nomenclature - I like that it has the event feel.

how would on_local_receive and on_endpoint_receive work for you? It is basically what kicks off the event - a packet is received at either end. Then where it goes is up to you.

I'm just trying to limit the amount of terms a developer has to internalise. We already have "local" and "endpoint" - if we add more things (upstream/downstream), it's yet another thing to memorise.

WDYT?

I started doing some of the refactoring work on this, since it touches a lot of things, and it sounds like we're now just discussing naming.

from quilkin.

iffyio avatar iffyio commented on June 11, 2024

My reservation is mostly about how we'll be using endpoint to mean something specific in this case and that we'll need to clarify it in other places it since any party with an address is an endpoint normally. I was thinking upstream/downstream could replace local/endpoint since it's already a known terminology in networking and won't need explanation - and it could for example be akward to say direction: endpoint in rate limiter config.
This isn't a big deal we can also leave as-is with local_receive_and_send_to_endpoint

from quilkin.

markmandel avatar markmandel commented on June 11, 2024

Checking terminology (and piggybacking on some conversations re: xDS as well)
https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/endpoint/v3/endpoint_components.proto

Endpoint is an existing term, but they also they use the term upstream to define an endpoint as well.

So now I'm coming around again 😄 to upstream/downstream terminology (especially if we take on xDS terminology, which is more complex than just local/endpoint)

I would probably argue on_downstream_receive and on_upstream_receive rather then send, just because the event is fired on packet being received, rather than sent.

@luna-duclos do you have thoughts, coming off the back of xDS conversations?

from quilkin.

iffyio avatar iffyio commented on June 11, 2024

on_downstream_receive/on_upstream_receive works as well for me.

from quilkin.

markmandel avatar markmandel commented on June 11, 2024

I BELIEVE WE HAVE CONSENSUS 🎉

from quilkin.

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.