Code Monkey home page Code Monkey logo

Comments (2)

patriknw avatar patriknw commented on June 14, 2024

Consumer defined filters (Edge is consumer) is probably most important, so that an edge service can receive only the subset of events that it is interested in. Consumer filters are declarative, so you send the definitions over gRPC and it will be the JVM producer service that will evaluate them.

Take a look at https://doc.akka.io/docs/akka-projection/snapshot/grpc.html#filters (not the producer defined section).

I think dynamic consumer filters would be useful, but you could start with the static (initial) approach to get a feel of it.

Producer defined filter is easier, just a producerFilter: (EventEnvelope[Any]) => Boolean. The producer filter can be static, well the logic in the function can change at runtime.

from akka-edge-rs.

patriknw avatar patriknw commented on June 14, 2024

One addition to my previous statement about producer filter. The producerFilter function as mentioned, but we also have a consumer defined filter when edge is producer. That is passed in the ConsumerEventStart here https://github.com/akka/akka-projection/blob/231716fc3ed1e3f27f9649544d739d105b5e8ded/akka-projection-grpc/src/main/protobuf/akka/projection/grpc/event_consumer.proto#L58

That is the same type of FilterCriteria that you have implemented in previous PRs, but now they should be evaluated on the edge side (producer side). For reference, the scala impl of the filter evaluation is here https://github.com/akka/akka-projection/blob/231716fc3ed1e3f27f9649544d739d105b5e8ded/akka-projection-grpc/src/main/scala/akka/projection/grpc/internal/FilterStage.scala#L109

from akka-edge-rs.

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.