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

[Operation]: Sanghas -- Sessions #11

Open
2 of 4 tasks
ks0m1c opened this issue Dec 17, 2023 · 6 comments
Open
2 of 4 tasks

[Operation]: Sanghas -- Sessions #11

ks0m1c opened this issue Dec 17, 2023 · 6 comments
Milestone

Comments

@ks0m1c
Copy link
Contributor

ks0m1c commented Dec 17, 2023

Present Context

Where we collectively investigate and interrogate the problem space and iteratively scope our approach.

Breakdown to landmarks that communicate shared context we are working towards through 2-tiered task list, CRUD list elements as development unfolds.

Strike the scope of code that reveals the most about the problem/solution FIRST not necessarily the easiest or hardest parts


Groundwork

Introduce us to the problem space. Write out what you already know about the terrain you are the recce commander enriching us with details beyond the fog of war.

Where have you tried applying and encountered difficulties?

How have others attempted to scale or explore these challenges?

(Embed internal & external links to related or possible paths of exploration, stackoverflow, documentation, github etc)

Who should be notified?

Emphasis on previous or current practice to discover what is ugly, missing, or unnecessary.

INPUT UR ANSWER HERE

Reflection

Where the eternal wheel returns back to practice and what we finally implemented is to be outlined. You are the historian or archivist bringing clarity to future-yous and us about your foray.

Emphasis on approaching timeless solutions for well-defined problem space through distillation by decanting that which is un-needed and abstracting that which is essential to approaching the problem space.

Add any reflections and internal links to future potential and blindsides.

INPUT UR ANSWER HERE
@rtshkmr
Copy link
Member

rtshkmr commented Dec 30, 2023

Notes from going thru the schema:

  • discussion sessions. Can be across different
  • will be public but won't be indexed so that's how it gets

Comments:

  • comments under sessions, linked by session id. Comments can be tied to a text_title which is a pointer to a text (uuids for text). Using a pointer allows us to do a lookup without caring about the actual structure of the text object, the rendering of that text can be done in a manner specific to the particular text
  • there can be parent child relationship w/ comments
  • Transclusion: child comment can point to a different parent, that's how we might interweave

QQ: how to move away from just text-based content for this schema? i.e. videos

@rtshkmr
Copy link
Member

rtshkmr commented Dec 30, 2023

For video,

it's going to be transcript focused, similar to youglish

@rtshkmr rtshkmr added this to the Minor MVP milestone Jan 6, 2024
@rtshkmr rtshkmr changed the title [Operation]: Sanghas [Operation]: Sanghas -- Sessions Jan 6, 2024
@rtshkmr
Copy link
Member

rtshkmr commented Jan 13, 2024

Notes from Walkthrough 13 Jan

  1. Session:
  • it's like a user-intervened frame
  1. Type switch set
  2. The schema is usually simple, the querying is the complex part
  • that's why there's a bunch of
  1. the pointer field is an an embedded schema
  2. associations: how we tie-up data sets together

Steps to Take to Understand the code by bala

  1. read the queries
  2. read the associations, e.g. filter_child_comments_chrono() <-- filters through a chain of tuples because tuples is a good way to represent hierarchical structure (??)

TODO:

  1. ecto knowledge gaps:
    • Schemas: firm representation
    • Changeset: expresses the other logical mutator aspects <== understand changesets with respect to the form (i.e. representation)
    • Queries: expresses the business logic
      function-data paradigm

takeaways:

1. Running a migration shows the following tables are being used
ॐ ❯ mix ecto.migrate

16:18:30.699 [info] == Running 20231215170225 Vyasa.Repo.Migrations.CreateSanghSessio
ns.change/0 forward

16:18:30.700 [info] create index unique_titles

16:18:30.712 [info] create table sessions

16:18:30.720 [info] execute "CREATE EXTENSION ltree"

16:18:31.232 [info] create table comments

16:18:31.242 [info] create index comments_path_index

16:18:31.244 [info] create index comments_text_title_session_id_chapter_number_index

16:18:31.249 [info] == Migrated 20231215170225 in 0.5s
~/Projects/vyasa feature/Sangh *11 ?1                                                                               L 2.29 RAM 3.94G SWP 3.71G █ 100% WiFi 520 Mbps 16:18:31
ॐ
2. Info about generating schemas
  • the schema name by right should be a singular noun, by convention
  • the schema module tells ecto how to map the schema module to the database table of the same name (which includes how to map the attribute names and such)
3. More about embedded schemas

ref: vhttps://hexdocs.pm/ecto/embedded-schemas.html

  • good candidate for in-memory IRs ...
    • QQ: safe to call it "transient" relationships?

@rtshkmr
Copy link
Member

rtshkmr commented Jan 13, 2024

QQ: what's the intended purpose of the texts schema? -- is it a generic term for all the various texts that will be supported or is it something else?

@rtshkmr
Copy link
Member

rtshkmr commented Aug 12, 2024

@ks0m1c could we close this + add in more granular issues for what is pending for sanghas

@rtshkmr
Copy link
Member

rtshkmr commented Aug 12, 2024

  • signature needs to be done before next milestone

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

No branches or pull requests

2 participants