Git Product home page Git Product logo

Comments (7)

db7 avatar db7 commented on May 30, 2024

We don't have such use cases, but I agree with you. Still you'll need to decide how many partitions (goroutines) the processor should have. The check for the partitions is done here.

from goka.

db7 avatar db7 commented on May 30, 2024

I think the easiest way how to implement this would be if you look for the input topic with most partitions in prepareTopics() and use that as the number of partitions in the processor. If you do otherwise, you'll also need to adapt the main processor loop so that it applies % operation on the partition of the incoming messages.

from goka.

burdiyan avatar burdiyan commented on May 30, 2024

@db7 I was thinking about changing copartitioned method to be like this:

 func (gg *GroupGraph) copartitioned() Edges {
+       if len(gg.joinCheck) == 0 {
+               return nil
+       }
+
        return append(gg.inputStreams, gg.inputTables...)
 }

So if there's no join topics, this method would return nil, and ensureCopartitioned would have nothing to work with.

But from what you're saying seems like that wouldn't be enough, right?

from goka.

db7 avatar db7 commented on May 30, 2024

This piece of code is important:

// check co-partitioned (external) topics have the same number of partitions
npar, err = ensureCopartitioned(tm, gg.copartitioned().Topics())
if err != nil {
	return 0, err
}

It returns the number of partitions that the processor will have. Here you should do something like
if "no group table and no joins", then pick npar form the topic with most partitions, otherwise call ensureCopartitioned.

from goka.

burdiyan avatar burdiyan commented on May 30, 2024

I started implementing that, but facing multiple edge cases and many tests started to fail. Will dig into that later. For now, working this limitation around by creating multiple processors in our systems.

from goka.

db7 avatar db7 commented on May 30, 2024

Ok. If you like, you can tell me the branch with your changes and I can try later to understand what is going on.

from goka.

frairon avatar frairon commented on May 30, 2024

I'll close it as it didn't have any activity for 2 years now

from goka.

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.