relax.js
Not logged in

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

tiered memory architecture

offline replication

@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 */ ],
  }
)

further reading


Attachments: