Skip to content
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

Merged
merged 10 commits into from
Sep 27, 2023
Merged

docs: service anatomy #38

merged 10 commits into from
Sep 27, 2023

Conversation

nordfjord
Copy link
Collaborator

No description provided.

@nordfjord nordfjord changed the title start section on service anatomy docs: service anatomy Sep 24, 2023
docs/docs/anatomy.md Outdated Show resolved Hide resolved
Co-authored-by: Ruben Bartelink <[email protected]>
docs/docs/anatomy.md Outdated Show resolved Hide resolved
docs/docs/anatomy.md Outdated Show resolved Hide resolved
docs/docs/anatomy.md Outdated Show resolved Hide resolved
nordfjord and others added 2 commits September 24, 2023 21:52
Co-authored-by: Ruben Bartelink <[email protected]>
Co-authored-by: Ruben Bartelink <[email protected]>
docs/docs/anatomy.md Outdated Show resolved Hide resolved
docs/docs/anatomy.md Outdated Show resolved Hide resolved
docs/docs/anatomy.md Outdated Show resolved Hide resolved
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) {
Copy link
Contributor

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

Copy link
Collaborator Author

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.

docs/docs/anatomy.md Outdated Show resolved Hide resolved
Co-authored-by: Ruben Bartelink <[email protected]>
docs/docs/anatomy.md Outdated Show resolved Hide resolved
docs/docs/anatomy.md Outdated Show resolved Hide resolved
@@ -168,22 +185,23 @@ export type Config =
// prettier-ignore
export namespace MessageDb {
import AccessStrategy = MessageDB.AccessStrategy
Copy link
Contributor

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as in MessageDBAccessStrategy.Unoptimized()

Copy link
Collaborator Author

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(...)

Copy link
Contributor

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!)

@nordfjord nordfjord merged commit d149f44 into main Sep 27, 2023
@nordfjord nordfjord deleted the docs/anatomy-of-service branch September 27, 2023 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants