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: Add section on the OPA document model #2314

Merged
merged 1 commit into from
Apr 21, 2020

Conversation

tsandall
Copy link
Member

When we refreshed the docs last year we removed the page titled 'how
OPA works' and in the process lost the description of the OPA document
model that explains the base and virtual document concepts. Since then
a bunch of people have referred back to those docs after getting
started.

This change re-introduces the model and provides an explanation of
why the model exists.

Fixes #2284

Signed-off-by: Torin Sandall torinsandall@gmail.com

@tsandall tsandall force-pushed the docs-document-model branch 4 times, most recently from 0f0c818 to f47cbfd Compare April 17, 2020 16:19
@tsandall tsandall changed the title WIP: docs: Add section on the OPA document mode docs: Add section on the OPA document mode Apr 17, 2020
@tsandall tsandall changed the title docs: Add section on the OPA document mode docs: Add section on the OPA document model Apr 17, 2020
Copy link
Member

@ashutosh-narkar ashutosh-narkar left a comment

Choose a reason for hiding this comment

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

The content lgtm.

patrick-east
patrick-east previously approved these changes Apr 17, 2020
Copy link
Contributor

@patrick-east patrick-east left a comment

Choose a reason for hiding this comment

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

LGTM

@tsandall tsandall dismissed stale reviews from patrick-east and ashutosh-narkar via 0950f1b April 17, 2020 18:58
@tsandall tsandall force-pushed the docs-document-model branch from f47cbfd to 0950f1b Compare April 17, 2020 18:58
docs/content/philosophy.md Outdated Show resolved Hide resolved
docs/content/philosophy.md Show resolved Hide resolved
docs/content/philosophy.md Outdated Show resolved Hide resolved
@tsandall tsandall force-pushed the docs-document-model branch 5 times, most recently from f02a846 to 9f219f0 Compare April 19, 2020 12:50
in the language.

Sometimes base documents need to be loaded into OPA synchronously with respect to policy
Copy link
Member

Choose a reason for hiding this comment

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

A sentence defining synchronous versus asynchrous would help. "Base documents are loaded at 2 different times: (i) when a piece of software asks for a decision (synchronous) and (ii) whenever the external state of the world changes and those changes need to be replicated into OPA (asynchronous).

Copy link
Member

Choose a reason for hiding this comment

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

I'd be tempted to have 3 choices: synchronous -> input, asynchronous -> data, dynamic (http.send) -> local variables, possibly under data.

during policy evaluation. Similarly, policies are also cached in-memory to ensure
high-performance and and high-availability. For more information on loading external data
into OPA, including tradeoffs, see the [External Data](../external-data) page.
Copy link
Member

Choose a reason for hiding this comment

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

Data loaded synchronously is also cached in-memory.

docs/content/philosophy.md Show resolved Hide resolved
When we refreshed the docs last year we removed the page titled 'how
OPA works' and in the process lost the description of the OPA document
model that explains the base and virtual document concepts. Since then
a bunch of people have referred back to those docs after getting
started.

This change re-introduces the model and provides an explanation of
_why_ the model exists.

This change also replaces the infographic with text containing the
same content as that feels a bit more inline with the rest of the
page.

Fixes open-policy-agent#2284

Signed-off-by: Torin Sandall <torinsandall@gmail.com>
@tsandall tsandall force-pushed the docs-document-model branch from 9f219f0 to 6bf8653 Compare April 21, 2020 12:15
@tsandall tsandall merged commit dd04920 into open-policy-agent:master Apr 21, 2020
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.

Documentation on base/virtual document lost in upgrade
4 participants