--
You received this message because you are subscribed to the Google Groups "envoy-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to envoy-dev+unsubscribe@googlegroups.com.
To post to this group, send email to envo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/envoy-dev/a7ac989c-8dde-4ba2-9bd8-2e0cbade1d19%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
We don't have any guides or easy ways to generate doxygen docs currently. The headers are well documented.The repo was recently reorged in a way that should make it much easier to learn from existing filters: https://github.com/envoyproxy/envoy/tree/master/source/extensions
On Tue, Apr 17, 2018 at 3:10 PM, <aco...@redhat.com> wrote:I am starting a proof-of-concept for an AMQP-HTTP bridge implemented as an Envoy filter (or maybe a pair of them).
I'll be using the AMQP library at http://qpid.apache.org/releases/qpid-proton-0.22.0/proton/cpp/api/index.html
Depending on how well it goes, it may become a serious project. No progress yet, just throwing it out there in case anyone has thoughts.
--
You received this message because you are subscribed to the Google Groups "envoy-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to envoy-dev+unsubscribe@googlegroups.com.
To post to this group, send email to envo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/envoy-dev/ad54a167-2be1-4961-a30e-3bbc432fe58b%40googlegroups.com.
I think what you are doing is probably the best way forward. You should be able to directly use the HTTP1 or HTTP2 encoder/decoder (codec) to convert between HTTP messages and bytes.
On Tue, Apr 24, 2018 at 6:32 PM, Matt Klein <mkl...@lyft.com> wrote:I think what you are doing is probably the best way forward. You should be able to directly use the HTTP1 or HTTP2 encoder/decoder (codec) to convert between HTTP messages and bytes.
Yeah that current code is structured such that it assumes a connection.I think unfortunately your options are either to attempt to refactor somehow to avoid requiring a Network::Connection or probably simpler to do what you suggest which is to provide some type of fake Network::Connection which only implements the required methods.
My solution is to have onRead() save the generated data in a member buffer and call Connection::write() with an *empty* buffer. That generates an empty call to onWrite() so I can send the generated data. It works but could empty writes be optimized away someday? If so is there a way to write to the connection but only via my downstream filters?
My solution is to have onRead() save the generated data in a member buffer and call Connection::write() with an *empty* buffer. That generates an empty call to onWrite() so I can send the generated data. It works but could empty writes be optimized away someday? If so is there a way to write to the connection but only via my downstream filters?Yeah I can't guarantee this will never change and I agree it's kind of hacky. I would probably just do it for now and add liberal comments. The better solution is probably to have a filter specific write call that only invokes filter downstream of the calling filter. If you want to work on that it would be nice addition to the filter API.
On Wed, May 2, 2018 at 3:34 AM, Matt Klein <mkl...@lyft.com> wrote:My solution is to have onRead() save the generated data in a member buffer and call Connection::write() with an *empty* buffer. That generates an empty call to onWrite() so I can send the generated data. It works but could empty writes be optimized away someday? If so is there a way to write to the connection but only via my downstream filters?Yeah I can't guarantee this will never change and I agree it's kind of hacky. I would probably just do it for now and add liberal comments. The better solution is probably to have a filter specific write call that only invokes filter downstream of the calling filter. If you want to work on that it would be nice addition to the filter API.
If changing the existing write() might break things, I'll add writeDownstream()
I need to learn more about envoy's outbound route/cluster side, but based on my experience so far I'm optimistic it will be up to the task.
--
You received this message because you are subscribed to a topic in the Google Groups "envoy-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/envoy-dev/0S8zMhLPfgE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to envoy-dev+unsubscribe@googlegroups.com.
To post to this group, send email to envo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/envoy-dev/bbf369dc-e067-4bbd-a65c-e7f1259167e5%40googlegroups.com.
If changing the existing write() might break things, I'll add writeDownstream()The correct solution here is to add functionality to the network filter callbacks to perform writes. You can model this after how HTTP filters work when encoding headers, data, etc.I.e., in https://github.com/envoyproxy/envoy/blob/master/include/envoy/network/filter.h you will need to add write() to ReadFilterCallbacks, and you might need to add WriteFilterCallbacks, with a write function. Optimally, the Connection accessor would be made constant, so any modifiers to the connection need to operate through the callbacks which can handle filter iteration. This will be a bit of work, but not too terrible.
I need to learn more about envoy's outbound route/cluster side, but based on my experience so far I'm optimistic it will be up to the task.Unfortunately, this side of things has not yet had an investment in extensibility, although this has come up before. I think for your use case, the easiest way of accomplishing what you need to do is going to be to make the HTTP connection pool concept statically pluggable and configurable: https://github.com/envoyproxy/envoy/blob/master/source/common/upstream/cluster_manager_impl.cc#L922. I think this could bed one relatively easily using the standard static registration systems that we normally do. Once this is done, I think it would be pretty straightforward to build an HTTP -> AMQP connection pool.