relax.js
it isn't always easy to go out there and radiate your essence..
information-centric networking for the web.
packages
@relax/async-utils ⋄ @relax/db
design patterns
- uniform data access
- event-driven cache architecture
- serverless
- self-serve build process
tiered memory architecture
@relax/db
doesn't make assumptions about front-end technology, other than encouraging strong typing. it provides a uniform api for accessing data from a variety of upstream sources.
// opaque cache?
const schema = RelaxMap(
{
name: "ContentCard",
resolver: async () => {},
mapper: () => {},
storages: FileCache
},
{
name: "products",
async resolver() {
// query an external system
},
mapper(docs) {
// translate response to internal records
},
storages: [ // define multiple cache levels
FileCache,
OnlineCache,
],
indexes: [ /* mongo-style queries, custom map/reduce scripts */ ],
schemas: [ /* data integrity validation */ ],
}
)
$relax
(replicant, client modes)/api/relax-db
(pouchdb-server/dynamodb-leveldown
)- upstream (
gql-proxy
)
further reading
dynamo-client
pouchdb-find
gql-proxy
nuxt-module
Attachments:
- offline_replication.gif [download] added by xjix on 2022-03-25 20:10:33. [details]