website logo
⌘K
πŸ–οΈIntroduction to hyper cloud
🍎Getting Started
😍What's New
Legacy Get Migration Guide
Blueberry Migration Guide
πŸ’ͺWorkshops
Deno Workshops
NodeJS Workshops
⚑Quickstarts
NodeJS Quickstarts
πŸ”ŒAPI Reference (hyper cloud)
🍎Basics
⚑hyper connect
πŸ”‘JWT Auth
πŸ’ΎData API
🏎️Cache API
πŸ”ŽSearch API
πŸ—„οΈStorage API
πŸ€“Queue API
πŸ”“Sign In
⚑Applications
βš™οΈSettings
πŸ”‘App Keys
πŸ‘₯Teams
Switching Between Accounts
Application Services
Application Service Instances
Adding a Queue Service
Adding a Search Service
Subscriptions
πŸ€‘Upgrade
πŸ“•Terminology
Parameters
πŸ’³Billing
Payment and Pricing Terms
πŸ’ΌLegal
Terms of Service
Acceptable Use Policy
Privacy Policy
πŸ•ΆοΈHyper Vision
Docs powered byΒ archbeeΒ 

Application Services

24min

Each hyper application may contain several application service types: Data, Storage, Cache, Queue, and Search.

Data

The data service manages structured JSON documents into containers called databases. You can add, update, read, and delete these documents using REST API commands. You can also create indexes and query the document store.

Each hyper application contains a single data service instance. All your structured JSON documents will be stored in a single database for a single hyper application.

  • Query selectors for flexible document retrieval
  • Indexes speed document retrieval

Check out our complete ο»ΏData API reference.

Example: Adding a document to your hyper application data service

Deno
Node.js
|
import connect from "https://x.nest.land/hyper-connect@VERSION/mod.js";

const HYPER = Deno.env.get("HYPER"); // example app key connection string: cloud://<key>:<secret>@cloud.hyper.io/<hyper cloud app name>

const hyper = connect(HYPER)();

const doc = {
  id: "1",
  type: "movie",
  title: "Dune",
  year: "2021",
};

const req = await hyper.data.add(doc);
const response = await fetch(req);
if (response.ok) {
  const result = await response.json();
  console.log(result);
}
ο»Ώ

Document Database Design

Document Database Design is a different mindset from relational database design. In order to design a document database, you need to think about how the application is going to use the data and model your data in terms of data access, not data tables. Learn more.

Storage

The storage service gives you the ability to store unstructured data, such as image files. The storage service takes away the hassle of having to use a separate service to store images, avatars, and text files. With the storage service, you can create storage spaces, upload, and download files.

Storage Features

  • Create and remove storage buckets
  • Upload images, videos, and files
  • Use the path parameter to organize your files within folders
  • Secure your files with JWT Bearer Authorization.

Check out our complete ο»ΏStorage API reference.

Example: Uploading a file to a hyper application storage service

JS
|
const file = new File(['Hello World'], 'hello.txt')
const form = new FormData()
form.append('file', file)

const res = await fetch('https://cloud.hyper.io/myapp/storage/mybucket', {
    method: 'POST',
    body: form
})
ο»Ώ

Cache

The Cache service provides a create, read, update and delete interface to a key/value cache. Use it to implement cache invalidation strategies in your application and keep stress off of your data stores when users are requesting very hot paths. The design goal of this service was simplicity and ease of use. You provide a key and a JSON document to your cache store and it is cached. You get the document from your cache by making a simple GET call with the key identifier.

Cache Features

  • ttl or Time To Live, specifies how long you want to cache a document.
  • Query using simple pattern matching which provides the ability to pull a batch of keys in a single request.

Check out our complete ο»ΏCache API reference.

Example: Add a key/value to a hyper application cache service

Curl
|
export JWT=mytokenvalue

curl -X POST  https://cloud.hyper.io/app-blue-diablo-wind/cache/default \                             ─╯
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ${JWT}' \
-d '{"key": "movie-1-1983", "value": {"id": "movie-1", "title": "Ghostbusters"}}'

#> {"ok": true}
ο»Ώ

Learn By Doing!

Dive deeper into hyper by completing our workshops on GitHub.

Quickstarts

Try out our cache quickstart for an in-depth example. See ο»ΏNodeJS Quickstarts

Queue

The Queue service provides the ability to perform background processing without having to manage your own queue servers. It works great for serverless implementations that need to offload short-lived processes to prevent slow-running transactions for the client application.

Common Queue Use Cases

  • Sending emails
  • Sending SMS messages
  • Notifying another system about an interesting event

Check out our complete ο»ΏQueue API reference.

Example: Posting a job to a hyper application queue service

Curl
|
export JWT=tokenvalue

curl -X POST https://cloud.hyper.io/app-moccasin-hailstorm/queue/default -H 'Authorization: Bearer ${JWT}' \
-H 'Content-Type: application/json' \
-d '{"title": "ghostbusters", "year": "1980"}'

#> {"ok": true}
ο»Ώ

Quickstarts

Try out our queue quickstart for an in-depth example. See ο»ΏNodeJS Quickstarts

Search

Tame the complexity of running your own search engine using hyper's powerful search engine without having to deal with separate services. Simply POST documents to a search index and use the query command to get a set of matches. Our search engine sits right next to your data, storage, and cache for highly composable integration possibilities.

Search Features

  • Query Command - using a simple query text and optional filter you have a fully-featured search at your disposal.
  • Bulk Document Indexing - create indexes using an array of documents to reduce round trips and quickly initialize your search engine.

Check out our complete ο»ΏSearch API reference.

Example: Querying a hyper application search service

Curl
|
export JWT=mytoken

# hyper cloud data urls follow this pattern: 
#  https://cloud.hyper.io/{appname}/search/{servicename}
#  Your {appname} will vary
#  Your {servicename} may vary

curl -X POST https://cloud.hyper.io/app-moccasin-hailstorm/search/default/_query \
-H 'Authorization: Bearer ${JWT}' \
-H 'Content-type: application/json' \
-d '{"query": "Frank Herbert", "fields": ["author"] }'
ο»Ώ

Quickstarts

Try out our queue quickstart for an in-depth example. See ο»ΏNodeJS Quickstarts

ο»Ώ

Updated 24 Mar 2022
Did this page help you?
Yes
No
PREVIOUS
Switching Between Accounts
NEXT
Application Service Instances
Docs powered byΒ archbeeΒ 
TABLE OF CONTENTS
Data
Example: Adding a document to your hyper application data service
Document Database Design
Storage
Storage Features
Example: Uploading a file to a hyper application storage service
Cache
Cache Features
Example: Add a key/value to a hyper application cache service
Learn By Doing!
Quickstarts
Queue
Common Queue Use Cases
Example: Posting a job to a hyper application queue service
Quickstarts
Search
Search Features
Example: Querying a hyper application search service
Quickstarts