Coder Social home page Coder Social logo

Comments (9)

jeffijoe avatar jeffijoe commented on September 18, 2024

It's a tough one because once you explain the reasoning behind it, I'll agree that Tranche fits the bill and I can understand the ambiguity that Partition brings, but it also goes back to the DDD concept of context, and in the Propulsion context, partition means XYZ.

With that said, I am still torn about it myself, and to be honest I might even consider stealing Tranche for the same reasons (if not just to sound smarter than I am šŸ˜Ž )

from propulsion.

bartelink avatar bartelink commented on September 18, 2024

Lots of useful input regarding this in the Discord. Working on it in #200 but the key decisions are:

  • Tranches stays
  • DynamoStore Index Tranches should actually be Partitions
  • Propulsion docs will map all the terms early on in a glossary/preamble

from propulsion.

bartelink avatar bartelink commented on September 18, 2024

#203 resolves this

  • usages of tranche on the consumer and checkpointing side make sense at the consumer end - you could have multiple tranches over the same source partition (see #200)
  • but for the DynamoStore Index structure, the ability to split the index is far more correctly termed partition.
    Thanks for the nudges @oskardudycz @jeffijoe

@nordfjord So, going forward the event the code will emit from the next RC onward is now Started2 with "partition" instead of "tranche"

from propulsion.

nordfjord avatar nordfjord commented on September 18, 2024

the ability to split the index is far more correctly termed partition

It's technically also a tranche šŸ˜….

RC onward is now Started2 with "partition" instead of "tranche"

Given this index format is kind of private maybe it's worth avoiding the breaking change and doing

type Event =
  | Started of { [<JsonPropertyName "tranche">] partition: AppendsPartitionId }

I'm not running a DynamoStore in production though and as such don't have skin in the game.

from propulsion.

bartelink avatar bartelink commented on September 18, 2024

It's technically also a tranche šŸ˜….

Technically yes.

Technically the Reader does indeed map partitionId directly to a tranche, but as noted in the docs, there's scope for it to surface multiple tranches from the partition and then use that to enable distributed processing.

Seriously though: for future cases where I build systems that split pools, I will call entitle the divisions/shards "partitions" and identify those by PartitionIds.


Hm, maybe not the craziest idea - it's definitely ugly and cryptic.
But it's not a breaking change as such (except for you) - as long as you dont deploy an older indexer lambda over a new one
I did ponder adding making tranche and partition option fields and then taking them with an Option.orElse ... Option.get...

from propulsion.

bartelink avatar bartelink commented on September 18, 2024

Actually could transparently map by doing a JsonIsomorphism from { partition: Pid option; tranche: Pid option ; pos } to { partition: Pid option; pos }

from propulsion.

nordfjord avatar nordfjord commented on September 18, 2024

Making tranche optional would be a breaking change. So Iā€™d just make a breaking change at that point

from propulsion.

bartelink avatar bartelink commented on September 18, 2024

I am saying that I'd make read of { tranche = t; pos = p} map to { partition = t; pos = p} internally. New writes would write { partitition = r; pos = p}.
But the only readers that wont be able to cope with stuff where its in a partition field are:

  • Lambdas <= rc.2
  • your logic

from propulsion.

bartelink avatar bartelink commented on September 18, 2024

f93ec00
I could make the updated version write a tranche too, but chose to let it write null

from propulsion.

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.