What is hypermea?
Hypermea (hy-PER-me-a) is a toolkit that lets you rapidly create production ready, hypermedia driven, microservice compatible APIs.
Note
We have been using hypermea internally for years to create real-life production microservice clusters. We are in the process of shrink-wrapping the package and polishing the documentation.
Version 1.0.0 is coming soon. Until its release, proceed with caution.
Production Ready
When you build your API service with hypermea, out of the box your service has:
- a managed settings configuration system, organized along integration lines
- sophisticated error handling
- expressive logging
- optional git integration
- optional docker integration
- and so much more
The code generated by hypermea has been battle tested in the most demanding production environments. You can trust that your services will be robust and reliable.
To learn more about what hypermea does for you, check out [[TODO]].
Hypermedia-Driven
Hypermedia means using links to navigate and operate an API. Clients do not need to know how your services are architected. Client code is truly decoupled from your services. This lets the back-end team change things server-side without requiring clients to change along.
How is this possible? The idea is simple - so simple that it's hard to believe it works.
Microservice Compatible
A good microservice is a small, independently deployable service, and does one thing well. A developer can hold the entire microservice in her head. Because they are so small, you will need many of them to drive your business. This solves many problems, but it also creates new ones.
- How do you manage such a large number of services?
- Hypermea adopts the API Gateway pattern which guides clients to the resources they use without having to know anything in advance about your service architecture.
- What happens if a microservice starts out small then grows over time and needs to split into smaller microservices?
- Because your services are hypermedia-driven, you can refactor, re-architect, and rearrange at any time without breaking your clients.
Okay, but what is hypermea?
Hypermea is a package that consists of:
- command-line tools for generating new services and managing existing ones
- a core library that adds features to your services
Command-line tools
Use simple commands to create your services. For example, let's start with this resource model:
To implement this in a single service, first create the API:
hypermea api create order-processing
Note
The hypermea
is aliased to hy
. You can use whichever you prefer.
And now to build the resource model above:
hy resource create customers
hy resource create orders
hy link create customers orders
To learn about the commands, command has multi-level help:
hy --help
hy api --help
hy api create --help
To learn more, check out [[TODO]].
Core library
Hypermea's core library is an independently distributable package. It is separate from the command-line tools so your shippable packages are as lean as possible. The core library's purpose is primarily to power the functionality of your hypermea_service
. It also provides an expanding set of methods to make your customizations easier: for example, access the database, standardize error messages, customize resource representations, and more. To learn more, check out [[TODO]].