...
Gliffy | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Design Patterns
Direct Database Access
Gliffy | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
|
How it works
...
(either GraphQL or REST)
Backend-for-Frontend
...
A dedicated backend application interacts directly with the Ed-FI database, bypassing the Ed-Fi API.
If there is a user interface (UI), then it interfaces with that backend. In that case, the backend is likely an example of a Backend-for-Frontend (BFF). The BFF could be implementing either a REST or GraphQL interface.
When to use
The Ed-Fi Alliance strongly discourages this pattern for the following reasons:
It bypasses the authorization security in the Ed-Fi API, potentially affecting both read and write operations.
This approach may put too much strain on the primary data storage, causing resource contention for other Ed-Fi client applications that are using the Ed-Fi API.
The Ed-Fi database is not a standard. Thus, different implementations or even different versions of the same implementation could have unstated breaking changes at the database layer. For example, the Ed-Fi ODS/API Platform and the Ed-Fi Data Management Service (unreleased at the time of writing) have very different backend database structures. An integration built on the ODS/API’s
EdFi_ODS
database would not be compatible with the Data Management Service’s database.
Implementation Notes
Although no longer considered advisable, the performance benefits make this a tempting option, and indeed many applications have been built on this model in the past. In such cases, it is advisable to limit the direct database interaction to read operations only, and to run from a read-only database copy. The copy could be a snapshot or replica. Using a read-only copy mitigates the resource contention concern on the primary database. Limiting to read operations eliminates half of the authorization security concern.
Also see Row-Level Authorization below.
Backend-for-Frontend
Gliffy | ||
---|---|---|
|
How it works
When to use
There is only a single front-end application that needs access to the Ed-Fi resources.How it works:
Implementation Notes
Also see Row-Level Authorization below.
Central Aggregating Gateway
Gliffy | ||
---|---|---|
|
How it works
When to use
...
There are multiple front-end applications with different use cases.How it works: .
Implementation Notes
Also see Row-Level Authorization below.
Row-Level Authorization
Anchor | ||||
---|---|---|---|---|
|
...
Define the problem:
Course-grained access to fine-grained resources (“chattiness”)
Network latency
Getting rid of composites
Alternate security protocols
...