-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: service anatomy #38
Conversation
Co-authored-by: Ruben Bartelink <[email protected]>
Co-authored-by: Ruben Bartelink <[email protected]>
Co-authored-by: Ruben Bartelink <[email protected]>
docs/docs/anatomy.md
Outdated
const access = AccessStrategy.Unoptimized() | ||
return Dynamo.createCached(name, codec, fold, initial, access, config) | ||
} | ||
export function createLatestKnown<E,S,C>(name: string, codec: ICodec<E, string, C>, fold: (s: S, e: E[]) => S, initial: S, config: Config) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is last in mdb - prob last here too as pretty rare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, definitely more common to use snapshots than latest event in dynamo. In MDB I've got more services on LatestKnownEvent than AdjacentSnapshots.
Co-authored-by: Ruben Bartelink <[email protected]>
@@ -168,22 +185,23 @@ export type Config = | |||
// prettier-ignore | |||
export namespace MessageDb { | |||
import AccessStrategy = MessageDB.AccessStrategy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm should AccessStrategy be prefixed too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as in MessageDBAccessStrategy.Unoptimized()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather the other stuff lost its prefix
DynamoStore.DynamoStoreCategory.create(....)
// vs
DynamoStore.Category.create(...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, but some names are very generic (client, category, context)
and then there are other conventional names like Config, Store, Streams also in the same scope
Given the names should only really be used in the context of one of those Config binding wiring blocks, the fact they are a bit long is no real harm
Also Category would clash with Equinox.Category (and I wanted to rename ISyncContext to Context but again same concerns stop me esp given how overloaded the term Context is)
A lot of these things get close enough to files that have domain logic too - things like Category etc can easily encroach on and/or require constant disambiguation.
Can't see where I saw the argument for the long names - it was in some Azure Core guidlines or sometihng (not they should be conodered arbiters of taste for even 5 mins!)
Co-authored-by: Ruben Bartelink <[email protected]>
No description provided.