Open chibenwa opened 7 months ago
Summer topic, but let's start thinking about it
we should limit copy and paste to the maximum. We should use Partial to the maximum. Likely we should move the Antora doc of the distributed server back into /docs to ease this.
I see a lot of docs are common between distributed-app and postgres-app.
Are you suggesting we only write the docs needed for postgres-app for now, and wait for the postgresql
branch got merged into master then refactor the Antora docs to be reused for both distributed-app and postgres-app?
I see a lot of docs are common between distributed-app and postgres-app.
Are you suggesting we only write the docs needed for postgres-app for now, and wait for the postgresql branch got merged into master then refactor the Antora docs to be reused for both distributed-app and postgres-app?
The goal is to have those common parts as partials I think.
Waiting for postgres to be merged to the main branch could be a thing. But can we expect the community to adopt postgres app without proper doc part of it as well? I ain't sure.
An other way would be to move back distributed doc to root doc in master branch, rebase postgres on master, and then propose the necessary changes on postgres branch for postgres doc?
An other way would be to move back distributed doc to root doc in master branch, rebase postgres on master, and then propose the necessary changes on postgres branch for postgres doc?
Sounds good to me.
Didn't have too much time to look deeper in this, but quickly:
Needs a deeper look on which parts are common
What I can think of when looking at the distributed documentation:
Architecture: Storage is pg specific I think (slightly different) but other sections can partial
Run
Configuration => links are different, but rest same. partials?
Operate
Solving cassandra inconsistencies
, Setting Cassandra user permissions
, Cassandra table level configuration
and Updating Cassandra schema version
sectionsDatabase setup
and Cassandra
sectionExtending server behavior => can be fully partials
Performance benchmark => partials
Note: can use attributes in partial pages to customize some terms. For example there is a lot of Distributed James server
mentions, that could be replaced by an attribute which would allow to replace those mentions by Postgres James Server
for example. Need to see how far we are willing to use those attributes. For example Configuration page, would be very similar for postgres for most of the page, just the links to conf sample files would be mainly different. Would it make sense to use attributes? Or would it make it too complex cause too many for this case?
Note: how to use variable (not sure if it is called "variable" or not, somewhere in Antora document write it is "attribute" )
Eg:
The All.adoc
=== All
The docker container image is {jamesImageName}
Using variable for pass dynamic value
:jamesImageName: james-cassandra
include::partial$All.adoc[]
:jamesImageName: james-postgres
include::partial$All.adoc[]
Then the document is generated:
I tried the another way (as Antora write it) but it does not work
include::partial$All.adoc[jamesImageName,james-postgres] // not work
include::partial$All.adoc[jamesImageName=james-postgres] // not work
include::partial$All.adoc["jamesImageName"="james-postgres"] // not work
Would it make sense to use attributes? Or would it make it too complex cause too many for this case?
Right now, I think it's fine. eg when running with Java/Docker, the process is quite similar between distributed Cassandra and Postgres. We simply need to change the image or JAR names, and we'll have a new adaptable document.
@vttranlina the way you used redefining the attribute value before including the partial in the page is the way, form what I found.
Would like to add though that you can define a default value for the attribute on top of the partial page as well. Thus we could think of having distributed version values as default (no need to override them before including partials in distributed pages) then only override for postgres
List of tasks I am thinking of:
Objectives and motivation
page for postgresArchitecture
section run
sectionConfiguration
sectionOperate
sectionExtending server behavior
sectionPerformance benchmark
sectionDo we need extra sections btw that are exclusive to postgres doc?
DOD: we have a full Antora documentation dedicated to the PG server just like distributed server.
we should limit copy and paste to the maximum. We should use Partial to the maximum.
Likely we should move the Antora doc of the distributed server back into /docs to ease this.
We will do that after the branch is merged with master to ease this.