<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[hyper]]></title><description><![CDATA[service framework for hyperscale applications]]></description><link>https://blog.hyper.io/</link><image><url>https://blog.hyper.io/favicon.png</url><title>hyper</title><link>https://blog.hyper.io/</link></image><generator>Ghost 3.2</generator><lastBuildDate>Tue, 07 Apr 2026 04:13:49 GMT</lastBuildDate><atom:link href="https://blog.hyper.io/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Introducing Hyper {Nano}: Hyper Cloud in a Bottle ⚡️🍷]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>In <a href="https://blog.hyper.io/clean-architecture-at-hyper/">my previous post about Clean Architecture at Hyper</a>, I briefly mentioned Hyper Nano.</p>
<p>In this post, i'd like to focus on Hyper Nano, and how you can use it to build awesome applications using the Hyper Service Framework and <a href="https://dashboard.hyper.io">Hyper Cloud</a>.</p>
<blockquote>
<p>We are currently offering <a href="https://calendly.com/hyper-cloud/hyper-cloud-technical-tour">hyper cloud tours</a> and</p></blockquote>]]></description><link>https://blog.hyper.io/introducing-hyper-nano-hyper-cloud-in-a-bottle/</link><guid isPermaLink="false">62680ecf7e086e001d8fc0d4</guid><dc:creator><![CDATA[Tyler Hall]]></dc:creator><pubDate>Mon, 02 May 2022 13:00:00 GMT</pubDate><media:content url="https://blog.hyper.io/content/images/2022/04/services.svg" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://blog.hyper.io/content/images/2022/04/services.svg" alt="Introducing Hyper {Nano}: Hyper Cloud in a Bottle ⚡️🍷"><p>In <a href="https://blog.hyper.io/clean-architecture-at-hyper/">my previous post about Clean Architecture at Hyper</a>, I briefly mentioned Hyper Nano.</p>
<p>In this post, i'd like to focus on Hyper Nano, and how you can use it to build awesome applications using the Hyper Service Framework and <a href="https://dashboard.hyper.io">Hyper Cloud</a>.</p>
<blockquote>
<p>We are currently offering <a href="https://calendly.com/hyper-cloud/hyper-cloud-technical-tour">hyper cloud tours</a> and a free <a href="https://calendly.com/hyper-cloud/chat-with-an-architect">Architecture Consultation</a>, If you think we could help you build your next great project, let us know!</p>
</blockquote>
<h2 id="whatishypernano">What is Hyper Nano</h2>
<p>As discussed in my previous post, <a href="https://github.com/hyper63/hyper/tree/main/images/nano">Hyper Nano</a> is the compiled Hyper Service Framework using a set of &quot;local development&quot; adapters, that allows Hyper to be run locally, is simple to spin up and simple to blow away.</p>
<p>It currently is running the following Hyper Services:</p>
<ul>
<li>data (powered by <a href="https://github.com/hyper63/hyper-adapter-pouchdb">PouchDB</a>)</li>
<li>cache (powered by <a href="https://github.com/hyper63/hyper-adapter-sqlite">Sqlite</a>)</li>
<li>storage (powered by your local <a href="https://github.com/hyper63/hyper-adapter-fs">file system</a>)</li>
<li>search (powered by <a href="https://github.com/hyper63/hyper-adapter-minisearch">Sqlite and Minisearch</a>)</li>
<li>queue (powered by <a href="https://github.com/hyper63/hyper-adapter-queue">DnDB and an in-memory queue</a>)</li>
</ul>
<h2 id="usage">Usage</h2>
<p>You can find usage documentation in the <a href="https://github.com/hyper63/hyper/tree/main/images/nano">README</a>, but I wanted to highlight some key features here.</p>
<p>Hyper Nano supports &quot;bootstrap&quot; and &quot;purge&quot; options. Bootstrap can be used to create hyper services on startup. Purge can be used to destroy services on startup.</p>
<blockquote>
<p>This will require the <code>--experimental</code> flag to be set.</p>
</blockquote>
<p>You can read about how to use these features <a href="https://github.com/hyper63/hyper/tree/main/images/nano#bootstrapping-services">here</a></p>
<p>Given this, here are some common workflows you can enable with Hyper Nano.</p>
<h2 id="workflows">Workflows</h2>
<p>Here are some common workflows you can enable with Hyper Nano when building applications with Hyper. I will assume the Hyper Nano binary was downloaded and named <code>hyper-nano</code> and your application domain is named <code>foo-app</code></p>
<p>I will also list some pros and cons of each approach (Tyler's opinion), and share the workflow we use at hyper every day, to build hyper.</p>
<h3 id="localdevelopmentwithpersistentservices">Local Development with Persistent Services</h3>
<p>This is the the most common workflow. You are developing your app, using Hyper as a services tier, on your own machine using <code>localhost</code>, and you'd like to have a persistent set of services. This would be like running Postgres, Redis, Elasticsearch, etc. using <code>docker-compose</code> and mounting volumes onto each, so that the data persist across containers.</p>
<p>First you would download a hyper binary.</p>
<blockquote>
<p>You would most likely not include the hyper binary or it's files in <code>__hyper__</code> under source control, just like you wouldn't commit a local database to source control.</p>
</blockquote>
<p>You would start Hyper Nano using <code>./hyper-nano</code> which would start it listening on port <code>6363</code>. As a one time setup, you would create the Hyper Services you needed, either using the REST api or <code>hyper-connect</code>. Then your application would consume those services using <code>hyper-connect</code> passing <code>http://localhost:6363/foo-app</code>.</p>
<p>Alternatively you could pass flags to bootstrap those services ie. <code>./hyper-nano --experimental --data --cache --domain=foo-app</code> which will create the database and cache service, and noop if they already exist.</p>
<p>After the initial setup any time you wanted to start developing, you would just start Hyper Nano with <code>./hyper-nano</code> and develop away.</p>
<p>If you ever wanted to wipe all the data, you could either use the REST api, <code>hyper-connect</code>, or just simply delete the <code>__hyper__</code> folder used to store data in Hyper Nano. You would then need to recreate those services again, just like if you deleted a database, and had to recreate it.</p>
<p>For data, You would either seed the services or gradually build data up in the persistent services aka. no local seed data required</p>
<p>Pros:</p>
<ul>
<li>Is most familiar development workflow for most folks</li>
<li>Sandboxed to localhost</li>
<li>Doesn't require internet connection</li>
</ul>
<p>Cons:</p>
<ul>
<li>Manual steps to create and remove services that aren't needed when using Hyper Cloud</li>
<li>If the data in the services becomes corrupted, a common occurrence during feature development, and there is no seed data being used. You have to manually correct it, or wipe the data away and build it up again.</li>
<li>Each new feature uses the same Hyper service instances aka. <strong>No feature sandbox</strong></li>
<li>Must maintain a runtime on local ie. Node, Yarn, Deno, installing dependencies, cross versions, etc.</li>
<li>Each developer must do these steps to set up a local environment, which could cause divergence aka. &quot;it works on my machine&quot; scenarios</li>
</ul>
<h3 id="localdevelopmentusingephemeralservices">Local Development Using Ephemeral Services</h3>
<p>This workflow is similar to above, but the idea is that you blow away and recreate the services each time you start work on a new feature.</p>
<p>You would start Hyper Nano with <code>./hyper-nano --experimental --data --cache --purge --domain=foo-app</code>, which would destroy any old data and cache service, and then recreate them. Then you would develop as normal.</p>
<p>For data, since the services are deleted and recreated every time, you would need some sort of seeding mechanism. <a href="https://github.com/hyper63/hyper/tree/main/packages/connect#data"><code>hyper.data.bulk</code> on <code>hyper-connect</code></a> is a great option for performing this.</p>
<p>Pros:</p>
<ul>
<li>No manual steps to create and delete servcies</li>
<li>Sandboxed to localhost</li>
<li><em>Feature</em> development is sandboxed</li>
<li>Doesn't require internet connection</li>
</ul>
<p>Cons:</p>
<ul>
<li>You must have a seeding mechanism (I personally see this as a pro which I will cover in the next workflow)</li>
<li>Must maintain a runtime on local ie. Node, Yarn, Deno, installing dependencies, cross versions, etc.</li>
</ul>
<h3 id="clouddevelopmentusingephemeralservices">Cloud Development using Ephemeral Services</h3>
<p>This workflow uses Ephemeral Hyper Services, but also an Ephemeral development environment as well. Using services like <a href="https://gitpod.io">GitPod</a> or GitHub Workspaces, you would spin up a new environment for each new piece of work being done. This environment setup should download <code>./hyper-nano</code> and start it, using bootstrapping and purging to create services. As part of environment set up, you would also run your seed script to bulk load your services with data.</p>
<p>When you were done developing, you would push up your code to the remote, and then simply close the Cloud Environment. For the next piece of work, rinse and repeat.</p>
<p>Pros:</p>
<ul>
<li>No manual steps to create and delete services</li>
<li>Sandboxed to Cloud Environment</li>
<li><em>Feature</em> development is sandboxed</li>
<li>All are other dependencies are sandboxed ie. Runtime, dependencies, are sandboxed (no <code>nvm</code>!)</li>
<li>Encourage trunk based development</li>
<li>This becomes your onboarding flow for new developers, so your onboarding flow always stays up to date and lean</li>
<li>Less likely for environment divergence to occur aka. no more &quot;it works on my machine&quot;.</li>
</ul>
<p>Cons:</p>
<ul>
<li>Environment setup must be codified for something like GitPod to execute.</li>
<li>Needs an internet connection</li>
<li>You must have a seeding mechanism (I personally see this as a pro in this setup)</li>
</ul>
<h2 id="whathyperdoes">What Hyper Does</h2>
<p>You can probably guess that we use the &quot;Cloud Development using Ephemeral Services&quot; workflow at hyper. We develop exclusively in Cloud Environments, and spin up new services and seed data for each new feature or bug.</p>
<p>When we are done with the feature, we simply close and forget that environment and then spin up a new one.</p>
<p>We use a <a href="https://www.gitpod.io/docs/config-gitpod-file"><code>.gitpod.yml</code> file</a> to configure our Cloud Environment with everything to start developing.</p>
<p>This means our seed data must be kept up to date, which requires some work, but I personally think this is a good thing. It keeps our seed data from becoming stale tech debt, and keeps onboarding new team members lean. It also means that we can tune our seed data to include more and more data sets to support feature development, as more features become part of the application.</p>
<blockquote>
<p>Suppose you had a subscription based platform. You could seed data where one customer is in a &quot;paid&quot; subscription state, another customer is &quot;overdue&quot; subscription state, and another customer is &quot;no subscription&quot; state. It becomes easy to build features for each of those customer states with your set of seed data</p>
</blockquote>
<h2 id="deployingyourapplication">Deploying your Application</h2>
<p>Eventually you're going to need to deploy your application, where your application consumes your actual services in your <a href="https://docs.hyper.io/applications">Hyper Cloud Application</a>.</p>
<p>If you're using <code>hyper-connect</code> to consume your Hyper Services, all you have to do swap out your <a href="https://docs.hyper.io/app-keys">connection string</a> that you pass to <code>hyper-connect</code> and that's it! From local development to using actual services without any code changes 😎, for <em>all</em> of your Services.</p>
<h2 id="conclusion">Conclusion</h2>
<p>Hyper Nano has been a huge boon for us at hyper developing products like Hyper Cloud. Consider trying Hyper Nano in your development workflow and let us know what you think!</p>
<blockquote>
<p>We are currently offering <a href="https://calendly.com/hyper-cloud/hyper-cloud-technical-tour">hyper cloud tours</a> and a free <a href="https://calendly.com/hyper-cloud/chat-with-an-architect">Architecture Consultation</a>, If you think we could help you build your next great project, let us know!</p>
</blockquote>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Clean 🧼 Architecture 🛠 At Hyper ⚡️]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>With the <a href="https://blog.hyper.io/hyper-cloud-beta-is-a-go/">beta launch of hyper cloud</a>, I want to share a little bit about how hyper itself works under the hood, and how we leveraged the architecture to build tools that we use to build hyper, <em>with</em> hyper.</p>
<blockquote>
<p>We are currently offering <a href="https://calendly.com/hyper-cloud/hyper-cloud-technical-tour">hyper cloud tours</a> and a free <a href="https://calendly.com/hyper-cloud/chat-with-an-architect">Architecture</a></p></blockquote>]]></description><link>https://blog.hyper.io/clean-architecture-at-hyper/</link><guid isPermaLink="false">6266ae8c7e086e001d8fbc8b</guid><dc:creator><![CDATA[Tyler Hall]]></dc:creator><pubDate>Wed, 27 Apr 2022 13:00:00 GMT</pubDate><media:content url="https://blog.hyper.io/content/images/2022/04/hyper-architecture-1.png" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://blog.hyper.io/content/images/2022/04/hyper-architecture-1.png" alt="Clean 🧼 Architecture 🛠 At Hyper ⚡️"><p>With the <a href="https://blog.hyper.io/hyper-cloud-beta-is-a-go/">beta launch of hyper cloud</a>, I want to share a little bit about how hyper itself works under the hood, and how we leveraged the architecture to build tools that we use to build hyper, <em>with</em> hyper.</p>
<blockquote>
<p>We are currently offering <a href="https://calendly.com/hyper-cloud/hyper-cloud-technical-tour">hyper cloud tours</a> and a free <a href="https://calendly.com/hyper-cloud/chat-with-an-architect">Architecture Consultation</a>, If you think we could help you build your next great project, let us know!</p>
</blockquote>
<h2 id="cleanarchitecture">Clean Architecture 🧼🛠</h2>
<p>At Hyper, we embrace the <a href="https://blog.hyper.io/the-perfect-application-architecture/">Clean Architecture</a> approach to building software. This means separating side effects from business logic and working hard to keep business logic separated from other components.</p>
<p>What is business logic? It's your secret sauce; the data models that may interact with each other, and the <em>rules</em> that govern how those models interact with each other. <strong>It is not a database, and it is not a frontend framework</strong>. Those pieces are <em>side effects</em> that tie <em>into</em> your business logic. As Robert C. Martin, author of Clean Architecture put it:</p>
<blockquote>
<p>there is <strong>nothing</strong> architecturally significant about arranging data in rows within tables</p>
</blockquote>
<p><img src="https://blog.hyper.io/content/images/2022/04/Overview_of_a_three-tier_application_vectorVersion.svg" alt="Clean 🧼 Architecture 🛠 At Hyper ⚡️"><br>
Source: <a href="https://en.wikipedia.org/wiki/Business_logic">https://en.wikipedia.org/wiki/Business_logic</a></p>
<p>I won't go into great detail here, there are tons of material on this topic. We encourage teams to build software using the tenants of &quot;Clean Architecture&quot; and we've built hyper to encourage doing just that. And not only do we encourage teams to build software using the tenants of Clean Architecture, but this is also how we architected hyper, internally.</p>
<h2 id="underthehood">Under The Hood 🚘</h2>
<p>Hyper is built using a &quot;<a href="https://en.wikipedia.org/wiki/Hexagonal_architecture_(software)">Ports and Adapters</a>&quot; approach.</p>
<p>The general idea with Ports and Adapters is that the business logic layer defines the models and rules on how they interact with each other, and also a set of consumer-agnostic entry and exit points to and from the business layer. These entry and exit points are called &quot;Ports&quot;. All components <em>external</em> to the business layer, interact by way and are interacted <em>with</em>, the Ports. A Port defines an api but knows nothing about the mechanism or the impetus. Those two things are an Adapter's job.</p>
<p>Adapters perform the actual communication between external actors and the business layer. There are generally two types of Adapters: &quot;Driving Adapters&quot; and &quot;Driven Adapters&quot;.</p>
<p>A driving adapter calls into the business layer, by way of a Port. The driving adapters can generally be thought of as the &quot;presentation layer&quot;. It could be a web application, a desktop application, a <em>CLI</em>, anything that initiates some action on the business domain.</p>
<p>A driven adapter is called by the business layer, to interact with some backend tool, ie. a database, storage bucket, cache, etc. The business layer calls into the driven adapter by way of the Port. <strong>Driven adapters implement the Port defined by the business layer</strong>.</p>
<p>So the flow generally looks like</p>
<pre><code>Driving Adapter &lt;--&gt; Port &lt;--&gt; Business Layer &lt;--&gt; Port &lt;--&gt; Driven Adapter
</code></pre>
<p><img src="https://blog.hyper.io/content/images/2022/04/1-9B1EsZPbhElSEFDZU3IpXA.png" alt="Clean 🧼 Architecture 🛠 At Hyper ⚡️"></p>
<p>Source: <a href="https://betterprogramming.pub/hexagonal-architecture-for-ios-part-1-600441c186b7">https://betterprogramming.pub/hexagonal-architecture-for-ios-part-1-600441c186b7</a></p>
<h3 id="benefits">Benefits</h3>
<p>Because the business layer enforces the Ports, and all external interactions with external components happens through the Ports, the business layer is encapsulated. The benefits of this for the system cannot be overstated.</p>
<p>It means the business layer, the models and the rules governing them, can be developed <em>before</em> choosing things like a database, or a frontend framework. Better yet, the business layer can be <em>tested</em> before choosing any of those things. <strong>Covering business logic almost entirely with unit tests is a boon for confidence in the system.</strong></p>
<blockquote>
<p>When building software, a decision is a set of <em>constraints</em>, and ideally the pros of accepting those constraints outweigh the cons. So we ought to defer accepting constraints until we have as much information as possible to inform that decision. Clean Architecture enables us to do just that.</p>
</blockquote>
<p>It also allows for the separation of concerns. Each tier of the architecture can change without requiring changes in the other tiers. This is important because some tiers are more volatile than others; typically the UI of an application changes faster than business rules for example.</p>
<blockquote>
<p>The only time we must touch multiple tiers is if a Port is changed. And that is usually a find and replace</p>
</blockquote>
<h2 id="hypercleanarchitecturelinguafranca">Hyper Clean Architecture Lingua Franca 📚</h2>
<p><img src="https://blog.hyper.io/content/images/2022/04/hyper-architecture.png" alt="Clean 🧼 Architecture 🛠 At Hyper ⚡️"></p>
<h3 id="hyperapps">Hyper Apps 🎮</h3>
<p>The Driving Adapters in the Hyper Service Framework are called &quot;Apps&quot; or &quot;Apis&quot;. We currently have two Apps available shown <a href="https://nest.land/gallery?search=hyper-app">here</a>. The GraphQL app will need to be overhauled eventually, but the Opine app is up to date and provides a RESTful api.</p>
<p>In the future, we would like to see more app offerings. A CLI app, a GRPC app, we've even discussed a Service Worker app, so that Hyper could be run entirely in the browser, on a Service Worker 😎.</p>
<h3 id="hypercore">Hyper Core 🪨</h3>
<p>The business layer in Hyper is called <a href="https://nest.land/package/hyper">core</a> which contains all of the business logic and enforces each Port. Core also defines the Port that a Hyper App calls.</p>
<h3 id="hyperports">Hyper Ports 🔌</h3>
<p>There are multiple Ports defined in the Hyper Service Framework. You can see them all <a href="https://nest.land/gallery?search=hyper-port">here</a>.</p>
<h3 id="hyperadapters">Hyper Adapters 🛠</h3>
<p>The Driven Adapters in the Hyper Service Framework are simply called &quot;Adapters&quot;. You can see many of them <a href="https://nest.land/gallery?search=hyper-adapter">here</a>. Each adapter implements a Port api and does the heavy lifting of communicating with an underlying component.</p>
<h3 id="hyperservices">Hyper Services</h3>
<p>A Hyper Service is combination of the components described above:</p>
<ul>
<li>A Hyper App</li>
<li>Hyper Core</li>
<li>An Adapter Port</li>
<li>A Hyper Adapter</li>
</ul>
<p>For example, a Hyper Data Service might be:</p>
<pre><code>RESTful api -&gt; Core -&gt; Data Port -&gt; CouchDB Adapter
// or
GraphQL api -&gt; Core -&gt; Data Port -&gt; Postgres Adapter
// or
CLI -&gt; Core -&gt; Data Port -&gt; DynamoDB Adapter
</code></pre>
<p>A Hyper Cache Service might be:</p>
<pre><code>GRPC api -&gt; Core -&gt; Cache Port -&gt; Redis Adapter
// or
GraphQL api -&gt; Core -&gt; Cache Port -&gt; Sqlite Adapter
// or
CLI -&gt; Core -&gt; Cache Port -&gt; FlatFile Adapter
</code></pre>
<p>A Hyper Search Service might:</p>
<pre><code>GRPC api -&gt; Core -&gt; Search Port -&gt; Elasticsearch Adapter
// or
RESTful api -&gt; Core -&gt; Search Port -&gt; Minisearch Adapter
// or
CLI -&gt; Core -&gt; Search Port -&gt; Algolia Adapter
</code></pre>
<p>I hope you're noticing something:</p>
<p><strong>Adapters and Apps are <em>interchangeable</em></strong>. This is how we can test our business layer without choosing a database, for example. We just mock the Adapter that communicates with the database.</p>
<p><strong>This also means we can run the Hyper Service Framework using a set of &quot;local development&quot; adapters.</strong></p>
<h2 id="hypernano">Hyper {Nano} 🍷</h2>
<p><a href="https://github.com/hyper63/hyper/tree/main/images/nano">Hyper Nano</a> is the compiled Hyper Service Framework using a set of &quot;local development&quot; adapters. It's the same Hyper RESTful app, and the same Hyper Core, but with a set of adapters that allow it to run locally sandboxed, and simple to quickly spin up and then blow away.</p>
<ul>
<li>data (powered by <a href="https://github.com/hyper63/hyper-adapter-pouchdb">PouchDB</a>)</li>
<li>cache (powered by <a href="https://github.com/hyper63/hyper-adapter-sqlite">Sqlite</a>)</li>
<li>storage (powered by your local <a href="https://github.com/hyper63/hyper-adapter-fs">file system</a>)</li>
<li>search (powered by <a href="https://github.com/hyper63/hyper-adapter-minisearch">Sqlite and Minisearch</a>)</li>
<li>queue (powered by <a href="https://github.com/hyper63/hyper-adapter-queue">DnDB and an in-memory queue</a>)</li>
</ul>
<p>Hyper Nano is great for development or sandboxed short-lived environments ie. GitHub Workspaces or GitPod.</p>
<p>Hyper Nano has some other features that we will cover in another blog post.</p>
<p>At hyper, we use Hyper Nano to develop hyper products. When building <a href="https://dashboard.hyper.io">hyper cloud</a>, we simply spin up a Gitpod Workspace, which installs our dependencies, starts Hyper Nano, and bootstraps our services. The result is a completely sandboxed local development environment in Cloud 😎 ☁️⚡️. Yes, we use <strong>hyper</strong> to build <strong>hyper</strong>.</p>
<p>Then in deployed environments, we use the Hyper Service Framework, but with actual Adapters to actual external services. <strong>Our interactions with Hyper does not change between Hyper Cloud and Hyper Nano</strong></p>
<h2 id="conclusion">Conclusion</h2>
<p>We try to practice what we preach, we dogfood practically everything we build, and hopefully, this provides some insights on how Hyper works internally and why you might consider trying Clean Architecture and Hyper.</p>
<p>We are currently offering <a href="https://calendly.com/hyper-cloud/hyper-cloud-technical-tour">hyper cloud tours</a> and a free <a href="https://calendly.com/hyper-cloud/chat-with-an-architect">Architecture Consultation</a>, If you think we could help you build your next great project, let us know!</p>
<h2 id="acknowledgements">Acknowledgements</h2>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Business_logic">https://en.wikipedia.org/wiki/Business_logic</a> for the 3 tier architecture graphic</li>
<li>Oleksandr Stepanov's <a href="https://betterprogramming.pub/hexagonal-architecture-for-ios-part-1-600441c186b7">awesome post</a> on Hexagonal Architecture, which provides some great visualizations of the architecture</li>
</ul>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Introducing the Alternative Stack: A Hyper Remix Stack⚡️+💿=✨]]></title><description><![CDATA[hyper ⚡️ + Remix 💿 = ✨🚀. 

An out of the box Remix application using Hyper as the services tier.]]></description><link>https://blog.hyper.io/introducing-the-alternative-stack/</link><guid isPermaLink="false">6261a4767e086e001d8fba3e</guid><dc:creator><![CDATA[Tyler Hall]]></dc:creator><pubDate>Fri, 22 Apr 2022 13:00:00 GMT</pubDate><media:content url="https://blog.hyper.io/content/images/2022/04/Screen-Shot-2022-04-22-at-3.08.36-PM.png" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://blog.hyper.io/content/images/2022/04/Screen-Shot-2022-04-22-at-3.08.36-PM.png" alt="Introducing the Alternative Stack: A Hyper Remix Stack⚡️+💿=✨"><p>At hyper, we love web standards. Web Standards are rules established by international standards bodies that define how the web works. These bodies put a lot of effort into ensuring the Web is maximally usable and accessible.</p>
<p>If you've ever ended up on <a href="https://developer.mozilla.org/">MDN Web Docs</a> then you're probably familiar with some of these Web Standards (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API"><code>fetch</code></a> anyone?).</p>
<p>Our love of Web Standards is why we have embraced tools like <a href="https://deno.land/?ref=hyper"><code>Deno</code> 🦕</a> to build hyper.</p>
<p>So whenever we see another framework or tool that is embracing Web Standards, that get's us excited! One of these frameworks is <a href="https://remix.run/?ref=hyper">Remix</a></p>
<h2 id="remixruntheweb">Remix run (the web 🌎)</h2>
<blockquote>
<p>Hyper is a sponsor of <a href="https://remix.run/conf">Remix Conf.</a>. Consider coming to Remix Conf. to learn more about Remix. If you see a hyper shirt, come say hi!</p>
</blockquote>
<p>Remix is a <em>full stack</em> web framework.</p>
<blockquote>
<p>Remix is a full stack web framework that lets you focus on the user interface and work back through web standards to deliver a fast, slick, and resilient user experience.</p>
</blockquote>
<p>Like other frameworks such as <a href="https://nextjs.org/?ref=hyper">NextJS</a>, <a href="https://nuxtjs.org/?ref=hyper">NuxtJS</a>, and <a href="https://kit.svelte.dev/?ref=hyper">SvelteKit</a>, Remix blurs the lines between client and server, providing a unified development experience that embraces the emerging &quot;full stack developer&quot; role.</p>
<p>With Remix, you write frontend (React) and backend code in <code>routes</code> files. Your frontend code sits right next to the server code that handles input submitted from that UI. You use Web Standards like <a href="https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API">fetch</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/API/Request">Request</a>, and <a href="https://developer.mozilla.org/en-US/docs/Web/API/Response">Response</a> to integrate your frontend and backend handlers. It supports TypeScript, bundling, accessibility, and route optimization, right out of the box. So far, building apps with Remix feels very ergonomic and easy to reason about.</p>
<p>Remix does a ton for you. If you'd like to learn more, consider checking out their <a href="https://remix.run/docs/en/v1?ref=hyper">docs</a>.</p>
<h2 id="remixstacks">Remix Stacks</h2>
<p>One of the new features in Remix, that we are really excited about, is <a href="https://remix.run/docs/en/v1/pages/stacks">Remix Stacks</a>. Remix Stacks is a feature of the Remix CLI that allows you to generate a Remix project quickly and easily. There are some official stacks described in their <a href="https://remix.run/docs/en/v1/pages/stacks?ref=hyper">docs</a> that come with:</p>
<ul>
<li>Database</li>
<li>Automatic deployment pipelines</li>
<li>Authentication</li>
<li>Testing</li>
<li>Linting/Formatting/TypeScript</li>
</ul>
<p>Remix Stacks also supports custom templates, where you can build your own Stacks and then use the Remix CLI to spin up those stacks!</p>
<p>We were wanting to build a starter project for <a href="https://dashboard.hyper.io">hyper cloud</a> and Remix. So when Remix Stacks were released, it seemed like a perfect opportunity.</p>
<h2 id="introducingthealternativestack">Introducing the Alternative Stack ⚡️💿</h2>
<p>We are happy to introduce the <a href="https://github.com/hyper63/alternative-stack">Alternative Stack</a>, a custom Remix Stack, using Hyper as a services tier, that comes with everything you need to start building 🛠, and shipping 🚀 with Hyper Cloud and Remix.</p>
<p><img src="https://blog.hyper.io/content/images/2022/04/Screen-Shot-2022-04-22-at-3.08.36-PM-1.png" alt="Introducing the Alternative Stack: A Hyper Remix Stack⚡️+💿=✨"></p>
<p>Out of the box, the Alternative Stack comes with:</p>
<ul>
<li><a href="https://aws.com">AWS deployment</a> with <a href="https://arc.codes/">Architect</a></li>
<li><a href="https://hyper.io">Hyper Cloud</a> integration via<br>
<a href="https://www.npmjs.com/package/hyper-connect"><code>hyper-connect</code></a></li>
<li>Zero-setup ⚡️ local development using<br>
<a href="https://github.com/hyper63/hyper/tree/main/images/nano"><code>hyper nano</code></a></li>
<li><a href="https://docs.hyper.io/hyper-vision">Hyper Vision</a> support, to peer into your hyper services</li>
<li><a href="https://gitpod.io/">GitPod integration</a> for developing in ephermeral cloud environments</li>
<li><a href="https://github.com/features/actions">GitHub Actions</a> for deploy on merge to<br>
production and staging environments</li>
<li>Email/Password Authentication with<br>
<a href="https://remix.run/docs/en/v1/api/remix#createcookiesessionstorage">cookie-based sessions</a></li>
<li>Styling with <a href="https://tailwindcss.com/">Tailwind</a></li>
<li>End-to-end testing with <a href="https://cypress.io">Cypress</a></li>
<li>Local third party request mocking with <a href="https://mswjs.io">MSW</a></li>
<li>Unit testing with <a href="https://vitest.dev">Vitest</a> and<br>
<a href="https://testing-library.com">Testing Library</a></li>
<li>Code formatting with <a href="https://prettier.io">Prettier</a></li>
<li>Linting with <a href="https://eslint.org">ESLint</a></li>
<li>Static Types with <a href="https://typescriptlang.org">TypeScript</a></li>
</ul>
<p>Everything that you need to start developing locally. Then once you're ready, just add some <a href="https://docs.github.com/en/actions/security-guides/encrypted-secrets">GitHub repo's secrets</a> and start deploying on AWS, consuming hyper cloud as your services tier 😎 💸.</p>
<h3 id="usage">Usage</h3>
<p>To use the <a href="https://github.com/hyper63/alternative-stack">Alternative Stack</a>, simply use the Remix CLI:</p>
<pre><code>npx create-remix --template hyper63/alternative-stack
</code></pre>
<p>The CLI will prompty you for some questions, pull down the stack, and set it up for you. Then just run <code>npm run dev</code> and start building!</p>
<h2 id="whatsitdoing">What's it doing?</h2>
<p>So what are each of the parts of the stack doing? Let's go through it.</p>
<blockquote>
<p>The cool thing about Remix Stacks is that they are completely customizable. If you don't like a piece, simply change it after setup, or even fork the original stack and create your own!</p>
</blockquote>
<h3 id="awsdeploymentviagithubactions">AWS Deployment via Github Actions</h3>
<p>The Hyper Remix Stack comes with a Github Workflow that will deploy your application to AWS using <a href="https://arc.codes/">Architect</a>. Architect handles setting up ApiGateway, S3, and Lambda together, so that your application can scale to meet production demand.</p>
<p>The workflow will run all your quality checks: Linting, Type checking, Testing, and Building. If all goes well, the the workflow will deploy your applciation. Out of the box, the workflow will deploy the <code>main</code> branch to a <code>production</code> environment and the <code>dev</code> branch to a <code>staging</code> environment. You can even setup separate credentials between <code>production</code> and <code>staging</code> in cases where you have a separate AWS account for each environment.</p>
<h3 id="hypercloudintegrationwithhyperconnect">Hyper Cloud Integration with <code>hyper-connect</code></h3>
<p><a href="https://hyper.io"><code>hyper cloud</code></a> is a scalable, backend cloud-based service that you can use to spin up databases, caches, storage buckets, search engines, and persistent queues, no dev-ops required.</p>
<p>Instead of figuring out how to deploy services in the cloud, securely, and to scale, just use hyper cloud and then consume your services using the <code>hyper-connect</code> SDK or REST. Focus on building features ⚡️, not cloud plumbing 🪠.</p>
<p>Learn more at <a href="https://docs.hyper.io/">our docs</a></p>
<h3 id="localdevelopmentusinghypernano">Local Development using <code>hyper nano</code></h3>
<p>Although you can use a <a href="https://docs.hyper.io/applications">hyper cloud application</a> to develop, the Alternative Stack also comes integrated with <a href="https://github.com/hyper63/hyper/tree/main/images/nano"><code>hyper nano</code></a>. <code>hyper nano</code> is an instance of <code>hyper</code> that runs all of your hyper services locally, using local hyper service adapters! It works great for local development, and short-lived ephemeral environments like GitHub Workspaces or Gitpod</p>
<blockquote>
<p>At hyper, we exclusively develop using short-lived, cloud-based, environments. And we use <code>hyper nano</code> to do it. In short, we build <code>hyper</code> using <code>hyper</code>.</p>
</blockquote>
<p><code>hyper-connect</code> works seamlessly with both <code>hyper cloud</code> and <code>hyper nano</code>. Consume <code>hyper nano</code> for local development, then your deployed application consumes <code>hyper cloud</code> with no code changes. <code>hyper connect</code> handles that for you.</p>
<h3 id="hypersevicevision">Hyper Sevice Vision 🕶</h3>
<p>If you'd like to see what is being stored in your hyper services, you can use <a href="https://docs.hyper.io/hyper-vision">Hyper Vision</a> to peer into your services.</p>
<p>Hyper Vision is a hosted, read-only, hyper service explorer that you can use to view your services. Just provide Hyper Vision with your application's hyper connection string (<code>process.env.HYPER</code>) and it will introspect your services!</p>
<blockquote>
<p>If you're running <code>hyper nano</code> locally, you will need to use a proxy to make it accessible on the internet. <a href="https://ngrok.com/">ngrok</a> is a great tool for this (though if you develop in ephemeral cloud environments like Gitpod, you get this out of the box 😎).</p>
</blockquote>
<p><img src="https://blog.hyper.io/content/images/2022/04/Screen-Shot-2022-04-22-at-9.19.00-AM.png" alt="Introducing the Alternative Stack: A Hyper Remix Stack⚡️+💿=✨"></p>
<h3 id="gitpodintegration">Gitpod Integration</h3>
<p>The Alternative Stack comes with support for cloud based development, using<br>
<a href="https://gitpod.io">GitPod</a>. Just initialize the Alternative Stack using the Remix CLI, push to Github, and then open in Gitpod by visiting:</p>
<pre><code>https://gitpod.io/#your-repo-url
</code></pre>
<blockquote>
<p>You can also use <a href="https://www.gitpod.io/docs/browser-extension">Gitpod's browser extension</a></p>
</blockquote>
<p>This will build a containerized cloud environment, install dependencies, and start up your services for you, a complete <strong>sandboxed</strong> environment. We use a <a href="https://www.gitpod.io/docs/config-gitpod-file">GitPod <code>.gitpod.yml</code></a> to set up our Cloud environment and expose your services.</p>
<p>Botch a feature and need to wipe the data? Just open a new Gitpod!</p>
<p>Need to fix a bug? Create an issue and then <a href="https://www.gitpod.io/docs/context-urls">open the issue in Gitpod</a>!</p>
<p>You no longer have to maintain a local environment. Just spin up a new one every time!</p>
<blockquote>
<p>At hyper, we love cloud based development, and trunk based development. We exclusively develop in ephemeral, short-lived, cloud-based environments using <a href="https://gitpod.io">GitPod</a>. Any time we start a new feature, or bug fix, we open up a new GitPod instance, which spins up a sandboxed environment.</p>
</blockquote>
<blockquote>
<p>Because each environment starts from scratch, every GitPod instance exercises our Onboarding flow; we onboard for each new feature! This prevents our onboarding flow from becoming stale, or too cumbersome for new team members or contributors.</p>
</blockquote>
<h3 id="stylingtypecheckinglintingtestingohmy">Styling, Type Checking, Linting, Testing, Oh My! 🐯</h3>
<p>The Alternative Stack comes with linting using EsLint, type checking using TypeScript, testing using Vitest, and end to end testing using Cypress.</p>
<p>All of this is integrated with Github Workflow, so all your quality checks pass before deploying your application.</p>
<p><img src="https://blog.hyper.io/content/images/2022/04/Screen-Shot-2022-04-21-at-3.57.28-PM.png" alt="Introducing the Alternative Stack: A Hyper Remix Stack⚡️+💿=✨"></p>
<h2 id="cleanarchitecturewithhyper">Clean Architecture With Hyper</h2>
<p>Hyper embraces the <a href="https://blog.hyper.io/the-perfect-application-architecture/">Clean Architecture</a> approach to building software. This means separating side effects from business logic and striving to keep business logic separated from other details of the application.</p>
<p>This has lots of benefits:</p>
<ul>
<li>Business logic is <em>framework</em> agnostic and can be reused
<ul>
<li>Remix/NextJS/CRA/Preact</li>
<li>Vue</li>
<li>Svelte</li>
<li>CLI (The framework doesn't even need to be web based!)</li>
<li>Mobile app</li>
</ul>
</li>
<li>Business logic is <em>infrastructure</em> agnostic:
<ul>
<li>Database</li>
<li>Cloud Provider</li>
<li>Deployment configuration ie. lambda, Docker, K8s, etc.</li>
</ul>
</li>
<li>Easier to test business logic (unit tests and TypeScript cover most of it!)</li>
<li>Separation of concerns</li>
</ul>
<p><strong>All of the business logic for this application can be found in<br>
<code>app/services</code></strong>. Each service receives its side effects via <a href="https://martinfowler.com/articles/refactoring-dependencies.html#DependencyInjection">dependency injection</a> which are then easy to stub during unit testing.</p>
<p>Our business <code>models</code> are simple schemas built on <a href="https://github.com/colinhacks/zod">zod</a> used to validate the correctness of data flowing in and out of our business logic layer. You could use anything to validate the contracts with your business logic, I chose <code>zod</code> because it's what we use at hyper. <code>Joi</code>, <code>Yup</code>, there are tons of options out there.</p>
<blockquote>
<p>The important part of these schemas is that it puts enforcing our business logic contracts in the layer we control, not buried deep within a database schema, or a managed service where we have limited to no control. Doing that can cause coupling and unintended technical debt.</p>
</blockquote>
<p>Because all side effects are injected via dependency injection, the business logic is incredibly easy to test. The business logic is practically fully tested using <strong>just unit tests</strong>.</p>
<p><img src="https://blog.hyper.io/content/images/2022/04/Screen-Shot-2022-04-21-at-3.51.28-PM.png" alt="Introducing the Alternative Stack: A Hyper Remix Stack⚡️+💿=✨"></p>
<p>The rest of the code in the project is all effectively glue code if you will, into our business logic, based on what our Remix app wants to do, in this case, a note taking app.</p>
<p>Perhaps we have another application that will run NLP across notes, or an administrator application with separate authentication needs. Those applications can reuse our business logic just fine.</p>
<h2 id="whatsnext">What's Next</h2>
<p>Right now, the Notes application only uses a Hyper Data Service. It is pretty simple and doesn't do much. In future iterations, we may add Hyper Cache Integration, to demonstrate just how simple it easy to <a href="https://blog.hyper.io/composing-hyper-data-and-cache/">compose Hyper services using <code>hyper-connect</code></a>, while keeping your business logic decoupled from underlying services. Stay tuned!</p>
<h2 id="conclusion">Conclusion</h2>
<p>We at hyper are very excited about Remix and Remix stacks. A huge shout out to the Remix team and to <a href="https://kentcdodds.com/">Kent C. Dodds</a> for showing us this cool new feature.</p>
<p>Try out the <a href="https://github.com/hyper63/alternative-stack">Alternative Stack</a> today, and let us know what you think!</p>
<p>We are also sponsoring <a href="https://remix.run/conf">Remix Conf.</a> and will be there, so if you see a hyper shirt, come say hi!</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Using CloudFront to Redirect HTTP -> HTTPS on ApiGateway]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>ApiGateway is great service for quickly spinning up a resilient, performant API layer for your application.</p>
<p>An increasingly common practice, as a result of putting frameworks like <a href="https://nextjs.org/">NextJS</a>, <a href="https://kit.svelte.dev/">SvelteKit</a>, and <a href="https://arc.codes/docs/en/get-started/quickstart">Architect</a> behind ApiGateway on a Lambda integration, is to serve static assets, as well as data, using a single ApiGateway.</p>]]></description><link>https://blog.hyper.io/using-cloudfront-to-redirect-http-to-https-on-apigateway/</link><guid isPermaLink="false">6246215c7e086e001d8fb91f</guid><dc:creator><![CDATA[Tyler Hall]]></dc:creator><pubDate>Tue, 05 Apr 2022 13:00:00 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>ApiGateway is great service for quickly spinning up a resilient, performant API layer for your application.</p>
<p>An increasingly common practice, as a result of putting frameworks like <a href="https://nextjs.org/">NextJS</a>, <a href="https://kit.svelte.dev/">SvelteKit</a>, and <a href="https://arc.codes/docs/en/get-started/quickstart">Architect</a> behind ApiGateway on a Lambda integration, is to serve static assets, as well as data, using a single ApiGateway. The ApiGateway is assigned a Custom Domain name, and serves the web application, assets, and the api that serves the data to power it.</p>
<h2 id="theproblem">The Problem</h2>
<p>When typing a url into a browser, if the protocol is not specified, most browsers will default to <code>http</code>. If your site is served up via ApiGateway, this will result in a failure to connect and an error:</p>
<p><img src="https://blog.hyper.io/content/images/2022/03/Screen-Shot-2022-03-31-at-5.55.12-PM.png" alt="Screen-Shot-2022-03-31-at-5.55.12-PM"></p>
<p>This is because ApiGateway only supports <code>https</code>. This isn't a great user experience. Instead of an error, it would be great to redirect <code>http</code> -&gt; <code>https</code>.Unfortunately, this involves more moving parts than is expected. There isn't a setting that you can toggle in ApiGateway; <code>http</code> isn't supported. To get around this, most solutions use CloudFront to perform this redirect. There were some tutorials that already exist on how to do this, but all them were missing some key details. This post will describe how I used CloudFront in front of ApiGateway to redirect <code>http</code> to <code>https</code>.</p>
<h2 id="setupcloudfront">Set up CloudFront</h2>
<p>In order to set up CloudFront to redirect <code>http</code> to <code>https</code>, you will need to set up a CloudFront distribution to:</p>
<ol>
<li>redirect http -&gt; https</li>
<li>forward all traffic to the <strong>invoke url</strong> of your ApiGateway</li>
</ol>
<p>There some quirks to this, that I will get into later in this post</p>
<p>First, navigate to the ApiGateway dashboard and take note of the invoke url for your Gateway.</p>
<p>Next, navigate to the CloudFront dashboard and create a new CloudFront Distribution.</p>
<p>For <strong>Origin Domain</strong> paste in your ApiGateway's invoke URL.</p>
<p>For <strong>Origin Path</strong> if you are using your <strong>default</strong> stage, leave blank.</p>
<p>For <strong>Name</strong>, name the origin whatever you'd like.</p>
<p>Under <strong>Viewer Protocol Policy</strong>, check <strong>Redirect HTTP to HTTPS</strong></p>
<p>Under <strong>Allowed HTTP Methods</strong>, check <strong>GET, HEAD, OPTIONS, PUT, POST, PATCH, DELETE</strong></p>
<p><strong>This Next Piece is Important!</strong></p>
<p>Scroll down to <strong>Cache key and origin requests</strong></p>
<p>Under <strong>Cache Policy</strong> choose <strong>CachingDisabled</strong> policy. This will prevent CloudFront from caching responses from your ApiGateway.</p>
<p>Under <strong>Origin request policy</strong> choose <strong>AllViewer</strong> policy. This will make CloudFront forward all headers it receives from the request to your ApiGateway. <strong>You will need this if your application uses cookies or Authorization header for AuthN/Z</strong>.</p>
<p><strong>If your ApiGateway uses a custom domain, this next piece is important!</strong></p>
<p>Scroll down to <strong>Settings</strong></p>
<p>Under <strong>Alternate domain name (CNAME)</strong> add the custom domain that is currently assigned to your ApiGateway. If you're using ACM, choose the corresponding certificate for that custom domain.</p>
<p>By default, ApiGateway has CORS disabled. If CORS is disabled on your ApiGateway, <strong>DO NOT</strong> remove the custom domain configuration from your ApiGateway. The custom domain configuration <strong>should match</strong> between CloudFront and ApiGateway. This will ensure requests are not rejected by ApiGateway due to CORS.</p>
<p>Create the Distribution. After a few minutes, your Distribution should be <strong>deployed</strong>.</p>
<p>Copy your <strong>Distribution domain name</strong>, and update your DNS, that currently resolves to your ApiGateway, to instead resolve to your Distribution's domain name. It may take some time for DNS to propagate.</p>
<p>This should be all you need to set up CloudFront in front of your ApiGateway, in order to redirect <code>http</code> -&gt; <code>https</code>. You can verify by navigating to your site, being sure to use the <code>http</code> protocol. Do this in a browser, and view the redirect in the network dev tools tab. You can also use <code>cURL</code> with the <code>-L</code> flag to follow redirects and see the redirects listed out listed out.</p>
<h2 id="theimportantbits">The important bits</h2>
<p>Most of this is probably self explanatory. The pieces that aren't as intuitive:</p>
<ol>
<li>The <strong>Origin request policy</strong> <strong>MUST</strong> forward all headers received to ApiGateway. AWS has a precanned policy called <strong>AllViewer</strong> that does this, but you can also create your own. Just make sure the headers you need are forwarded to ApiGateway by CloudFront</li>
<li>If CORS is disabled for ApiGateway, the custom domain configuration <strong>MUST</strong> exist on both the CloudFront distribution and the ApiGateway. Otherwise, ApiGateway will reject the request.</li>
</ol>
<p>Hopefully this was helpful!</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[hyper cloud beta is a go! 🚀]]></title><description><![CDATA[<p>The <a href="https://hyper.io/" rel="nofollow">hyper</a> team is proud to announce ⚡️<a href="https://dashboard.hyper.io/" rel="nofollow">hyper cloud</a>⚡️ is now in beta.</p><blockquote>hyper is a dev-ops team wrapped in a single API. Our easy-to-learn API manages data, cache, storage, search, and queue services.</blockquote><h3 id="okay-it-s-confession-time-">Okay, it's confession time 😬.</h3><p>A long time ago, way before hyper, we may have contributed to</p>]]></description><link>https://blog.hyper.io/hyper-cloud-beta-is-a-go/</link><guid isPermaLink="false">62421c637e086e001d8fb8f6</guid><dc:creator><![CDATA[Trip Ottinger]]></dc:creator><pubDate>Mon, 04 Apr 2022 12:41:08 GMT</pubDate><content:encoded><![CDATA[<p>The <a href="https://hyper.io/" rel="nofollow">hyper</a> team is proud to announce ⚡️<a href="https://dashboard.hyper.io/" rel="nofollow">hyper cloud</a>⚡️ is now in beta.</p><blockquote>hyper is a dev-ops team wrapped in a single API. Our easy-to-learn API manages data, cache, storage, search, and queue services.</blockquote><h3 id="okay-it-s-confession-time-">Okay, it's confession time 😬.</h3><p>A long time ago, way before hyper, we may have contributed to codebases that may have turned into a big pile of 💩. As new features were attempted, unintentional technical debt and complexity increased. Our product slowly became intertwined and deeply coupled with the underlying services. We sacrificed quality to deadline pressure. Our developer happiness turned into frustration 🤯 and developer retention suffered. Adding developers and site reliability engineers frankly didn't solve the problem. Maybe this sounds familiar to you.</p><p>We learned from our mistakes by focusing on specific fundamentals: <a href="https://www.amazon.com/Accelerate-Building-Performing-Technology-Organizations/dp/B07BMBYHXL/ref=sr_1_1?hvadid=241653451130&amp;hvdev=c&amp;hvlocphy=9010526&amp;hvnetw=g&amp;hvqmt=e&amp;hvrand=12362379891764064156&amp;hvtargid=kwd-307609789829&amp;hydadcr=21874_10169699&amp;keywords=accelerate+book&amp;qid=1644845702&amp;sr=8-1" rel="nofollow">shifting left</a>, <a href="https://www.amazon.com/Continuous-Delivery-Deployment-Automation-Addison-Wesley/dp/0321601912" rel="nofollow">continuous delivery</a> and <a href="https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html" rel="nofollow">clean architecture</a>. The result is hyper: a game-changer for front-end developers, startups, agencies, or anyone looking to save time, energy, and money 💵.</p><h3 id="features-are-king-">Features are king 👑.</h3><p>Building the services that power your features is difficult to get right. We took what we've learned about building scalable, secure, and performant service tiers and crafted hyper cloud. With hyper cloud as your services tier, you can focus on building what matters most: features that delight your customers.</p><p>How much of your budget is focused on your backend service personnel? Minimize the human resources required to build and maintain your software product. Bypass the red tape, frustration, bureaucracy, and uncertainty around creating cloud-based backend services. Stop wasting precious resources 💸. Shift your personnel to the side of your solution that your customers need: features and business logic.</p><p>With a few clicks, you get robust and scalable backend cloud <a href="https://hyper.io/product" rel="nofollow">services</a> including a document datastore, in-memory cache, search engine, storage buckets, and queues. <a href="https://dashboard.hyper.io/" rel="nofollow">Sign up</a> for free 😀 with your GitHub account and create backend services in seconds. When you're ready to step it up, we have <a href="https://hyper.io/pricing" rel="nofollow">plans</a> starting at $99 a month.</p><h3 id="a-dx-that-rocks-">A DX that rocks 🎸</h3><p>Developers will enjoy a delightful DX 🤘🏽using a <a href="https://docs.hyper.io/api-reference-hyper-cloud" rel="nofollow">REST API</a> or the <a href="https://docs.hyper.io/hyper-connect" rel="nofollow">hyper-connect SDK</a> that supports Node and Deno 🦕. Our API provides a consistent shape across all our services, making it easy to learn and apply.</p><h3 id="support-options">Support options</h3><p>We've got your back! 😉 We provide basic and extended support options. Learn by doing with our <a href="https://docs.hyper.io/workshops" rel="nofollow">workshops</a> 💪, <a href="https://docs.hyper.io/nodejs-quickstarts" rel="nofollow">quickstarts</a> 🚀, <a href="https://blog.hyper.io/" rel="nofollow">blog</a> 👩🏽‍💻, and YouTube <a href="https://www.youtube.com/channel/UC_V8BG1cTmILu9IkTK-yn1A" rel="nofollow">tutorials</a>.</p><h3 id="introducing-our-cto-service">Introducing our CTO service</h3><p>Our new <a href="https://blog.hyper.io/cto-for-startups/" rel="nofollow">fractional CTO service for startups</a> provides the oversight and guidance necessary to cultivate quality, productivity, and accountability. Let us help you curate the technology strategy and vision of your company's software tools and technologies.</p><p>Hyperfocus on features. Delight your developers and customers. Put your applications on solid footing. Hyper cloud is ready to go.</p>]]></content:encoded></item><item><title><![CDATA[Using Zod to Parse Function Schemas]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>Data validation, ensuring the data your system receives is in some expected shape, is crucial for a mature system. The most important part of a system, the business logic, expects and provides data in a particular shape, and so validating these shapes is an important part of running and testing</p>]]></description><link>https://blog.hyper.io/using-zod-to-parse-function-schemas/</link><guid isPermaLink="false">622a6e377e086e001d8fb630</guid><dc:creator><![CDATA[Tyler Hall]]></dc:creator><pubDate>Mon, 14 Mar 2022 14:00:00 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>Data validation, ensuring the data your system receives is in some expected shape, is crucial for a mature system. The most important part of a system, the business logic, expects and provides data in a particular shape, and so validating these shapes is an important part of running and testing your business logic.</p>
<p>There are a ton of options. TypeScript is widely used and will provide compile time checks on your code. Most systems require <em>runtime</em> validation at its boundaries. For example, I may have a web server endpoint that expects a certain payload shape that it will need to validate, at runtime. I can't use TypeScript for that. In addition, TypeScript adds a build step (unless you use <a href="https://deno.land/">Deno</a> 🙂), and TypeScript checking can be bypassed using catchall types like <code>any</code> and <code>unknown</code>. I can disallow those types, using <code>strict</code>, but I now am beholden to library types, types I don't have control over or may be incorrect. So then using the <code>any</code> escape-hatch becomes an exercise in design and discipline, for each dev that works on the system. At the very least, that's cognitive overhead that can't be ignored, and at its worst, an obstacle to delivering quality software.</p>
<blockquote>
<p>My last points were not to knock TypeScript, it's great and we use it. My point is that <strong>it takes experience and discernment to know where TypeScript is a boon, and where TypeScript is an obstacle</strong>. TypeScript catches <em>tons</em> of common bugs, but it's just another tool in the toolbox. It takes a good developer to decide how and when, and to what extent, to use it.</p>
</blockquote>
<p>So regardless of using compile time checks, we need some way to validate data shape at runtime, so that bad data doesn't get into the crucial parts of the system. There are tons of runtime options. <a href="https://github.com/sideway/joi">Joi</a> or <a href="https://github.com/jquense/yup">Yup</a> are both great runtime options. At hyper, we use a library called <a href="https://github.com/colinhacks/zod">Zod</a>.</p>
<h2 id="athyper">At hyper</h2>
<p>The hyper service framework we've built at hyper, uses a &quot;Ports and Adapters&quot; architecture, also known as <a href="https://en.wikipedia.org/wiki/Hexagonal_architecture_(software)">Hexagonal Architecture</a>. This allows swapping out the underlying components that power hyper services, without having to change the hyper core.</p>
<p>To accomplish this architecture, hyper core must specify a contract or &quot;port&quot;, for each service that it offers. Then a service adapter must implement one of those ports in order to be used by hyper core:</p>
<img src="https://blog.hyper.io/content/images/2021/05/hyper-architecture.png">
<p>Each of these ports are published modules. You can see hyper's data port <a href="https://nest.land/package/hyper-port-data">here</a>. All service ports are implemented using <code>zod</code>. We define a Zod <code>schema</code> for the adapter object. Then, given an adapter implementation, the port wraps each function implemented by the adapter with the corresponding <code>z.function()</code> schema that enforces the contract between hyper core and the hyper adapter. <code>Zod</code> even has a feature that allows <a href="https://github.com/colinhacks/zod#type-inference">TypeScript type inference from schemas</a>!</p>
<p><code>function</code> schemas are a really cool feature of <code>zod</code> as they allow for separating the validation logic from the &quot;meat&quot; of the implementation. Adapters don't have to worry about validating inputs and outputs for each function implemented; hyper core does that. In fact, as an adapter developer, you can use the hyper port as part of your unit tests, ensuring your adapter returns the proper responses for each api!</p>
<pre><code class="language-js">import { data } from 'https://x.nest.land/hyper-port-data@1.2.0/mod.js'

// wrap your impl with the port
const myDataAdapter = data({...})

/**
 * Now simply assert each api call,
 * and Zod parses the inputs and outputs.
 * If the test doesn't throw,
 * you know you've implemented the port!
 */
test('should return the correct shapes', async () =&gt; {
  assert(await myDataAdapter.createDatabase('foo'))
  ...
})
</code></pre>
<p>This is precisely how hyper core wraps each adapter.</p>
<h2 id="afunctionschema">A function schema</h2>
<p>A <code>function</code> schema in <code>zod</code> looks like this:</p>
<pre><code class="language-js">const MyFunctionSchema = z.function()
  .args(
    z.string()
  )
  .returns(
    z.promise(z.object({ ok: z.boolean() }))
  )
</code></pre>
<p>You can then pass a function to the schema's <code>implement</code> method, which returns a new function that automatically validates its inputs and outputs:</p>
<pre><code class="language-js">function businessLogic (str) {
  ... // do some stuff
  return Promise.resolve({ ok: true })
}

const withValidation = MyFunctionSchema
    .implement(businessLogic)

withValidation('foo') // passes
withValidation(123) // throws ZodError because input doesn't match schema

MyFunctionSchema.implement(
   str =&gt; Promise.resolve({ not_ok: true })
)('foo') // throws ZodError because output doesn't match schema
</code></pre>
<h3 id="functionoverloading">Function overloading</h3>
<p>You may have a function that supports multiple input shapes and multiple output shapes. <code>Zod</code> does have support for <a href="https://github.com/colinhacks/zod#unions">Union types</a> which works as a sort of logical OR type, And you could use those to build a function schema:</p>
<pre><code class="language-ts">const stringOrNumber = z.union(
  [z.string(), z.number()]
)

const identity = z.function()
  .args(stringOrNumber)
  .returns(stringOrNumber)
  .implement(i =&gt; i)
  
// equivalent TS type
type stringOrNumberIdentity =
  (i: string | number) =&gt; string | number
</code></pre>
<p>This works if either input can produce either output, but if there is a 1:1 relationship between input and output, then we will need something different. For that, what we really want is a type like this:</p>
<pre><code class="language-ts">type stringOrNumberIdentity =
  (str: string) =&gt; string | (n: number) =&gt; number
</code></pre>
<p>We can accomplish this with two <code>zod</code> function schemas, and then parsing the argument using each schema's <code>parameters()</code> api. <code>parameters()</code> returns the Zod schema for the input args:</p>
<pre><code class="language-js">const strIdentity = z.function()
  .args(z.string())
  .returns(z.string())
  
// schema for the args of strIdentity
const strInput = strIdentity.parameters()
  
const numIdentity = z.function()
  .args(z.number())
  .returns(z.number())

const myFn = ....

const identityWithValidation = z.function()
  .args(stringOrNumber)
  .returns(stringOrNumber)
  .implement(i =&gt; {
    if (strInput.safeParse(i).success)
       // parse i/o as string
       return strIdentity.implement(myFn)(i)
    
    // parse i/o as number
    return numIdentity.implement(myFn)(i)
  })
</code></pre>
<p>With this, we can enforce a 1:1 relationship between input and output, for an overloaded function.</p>
<h2 id="conclusion">Conclusion</h2>
<p>A system will need some sort of runtime validation eventually. Consider separating your validation logic into composable pieces using a library like <code>zod</code></p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[💖 hyper Enhancements]]></title><description><![CDATA[<p>Announcing the Crysknife release!</p><figure class="kg-card kg-image-card"><img src="https://blog.hyper.io/content/images/2022/03/crysknife-circle.png" class="kg-image"></figure><p>The hyper team is pleased to announce <a href="https://docs.hyper.io/cloud/whats-new" rel="nofollow">new enhancements</a> to our service cloud platform for startups. hyper cloud is a scalable, backend cloud-based service to store and retrieve resources such as data, files, cached data, etc. <strong>No dev-ops required</strong>.</p><p><strong>Enhancements</strong></p><ul><li>🚀  Updated hyper-connect with Queue and Storage.</li></ul>]]></description><link>https://blog.hyper.io/hyper-enhancements-2/</link><guid isPermaLink="false">622919847e086e001d8fb5cb</guid><dc:creator><![CDATA[Trip Ottinger]]></dc:creator><pubDate>Wed, 09 Mar 2022 21:34:22 GMT</pubDate><content:encoded><![CDATA[<p>Announcing the Crysknife release!</p><figure class="kg-card kg-image-card"><img src="https://blog.hyper.io/content/images/2022/03/crysknife-circle.png" class="kg-image"></figure><p>The hyper team is pleased to announce <a href="https://docs.hyper.io/cloud/whats-new" rel="nofollow">new enhancements</a> to our service cloud platform for startups. hyper cloud is a scalable, backend cloud-based service to store and retrieve resources such as data, files, cached data, etc. <strong>No dev-ops required</strong>.</p><p><strong>Enhancements</strong></p><ul><li>🚀  Updated hyper-connect with Queue and Storage. The <a href="https://docs.hyper.io/cloud/hyper-connect" rel="nofollow noreferrer noopener">hyper-connect</a> SDK now supports queue and storage services. </li><li>🔥<a href="https://docs.hyper.io/cloud/whats-new#zl-delete-a-service-instance">Delete a service instance</a> </li><li>🎉 <a href="https://github.com/hyper63/hyper-ext-model" rel="nofollow noreferrer noopener">hyper-ext-model</a> is an experimental hyper-connect extension that creates a model for an application that uses the hyper service.</li><li>🎓 New NodeJS <a href="https://docs.hyper.io/cloud/whats-new#mx-new-queue-service-quickstart">Queue Quickstart</a></li><li>😎 <a href="https://docs.hyper.io/cloud/whats-new#wl-hyper-vision-enhancements">hyper vision enhancements</a></li><li>🪄 <a href="https://docs.hyper.io/cloud/whats-new#ey-enhanced-service-type-progress-steps">Enhanced service type progress steps</a></li><li>👩🏽‍💻 <a href="https://docs.hyper.io/cloud/whats-new#ta-improved-error-responses-from-cloudhyper">Improved error responses</a> from cloud.hyper</li></ul><blockquote>🍾 We've reached over 100 accounts created on hyper cloud. <a href="https://dashboard.hyper.io/" rel="nofollow">Sign up</a> for a <strong>free</strong> hyper cloud account.🍾 </blockquote><p>For more details, head on over to <a href="https://docs.hyper.io/cloud/whats-new" rel="nofollow">What's New</a>. </p><p>Keeping it steezy,</p><p>The hyper team</p>]]></content:encoded></item><item><title><![CDATA[March hyper madness]]></title><description><![CDATA[<p></p><h2 id="hyper-is-going-beta-">hyper is going BETA! ⚡️️️⚡️</h2><p></p><p>Our small developer preview has reached 100 accounts 🎉 and we are thankful 🙏 for the support and encouragement. Now that all of our hyper OSS ports are available via the cloud service we are ready to invite more developers to the platform. </p><blockquote>hyper will always have a</blockquote>]]></description><link>https://blog.hyper.io/march-hyper-madness/</link><guid isPermaLink="false">622377aa7e086e001d8fb552</guid><dc:creator><![CDATA[Tom Wilson]]></dc:creator><pubDate>Sat, 05 Mar 2022 15:02:27 GMT</pubDate><content:encoded><![CDATA[<p></p><h2 id="hyper-is-going-beta-">hyper is going BETA! ⚡️️️⚡️</h2><p></p><p>Our small developer preview has reached 100 accounts 🎉 and we are thankful 🙏 for the support and encouragement. Now that all of our hyper OSS ports are available via the cloud service we are ready to invite more developers to the platform. </p><blockquote>hyper will always have a free tier for developers, giving developers a chance to evaluate, prototype and experiement. </blockquote><h3 id="signup-and-start-innovating-today-with-hyper-at-https-dashboard-hyper-io">Signup and start innovating today with hyper at <a href="https://dashboard.hyper.io">https://dashboard.hyper.io</a></h3><p></p><h2 id="events-in-march">Events in March</h2><p>There is a lot going on in March 2022 in the hyper verse. </p><h3 id="march-17-chsjs-meetup-remix-and-github-actions">March 17 - CHSJS Meetup - Remix and Github Actions</h3><figure class="kg-card kg-image-card"><img src="https://blog.hyper.io/content/images/2022/03/Screen-Shot-2022-03-05-at-9.55.43-AM.png" class="kg-image"></figure><p>You can register here: <a href="https://www.meetup.com/CharlestonJS/events/283033703/">https://www.meetup.com/CharlestonJS/events/283033703/</a></p><h3 id="march-23-starters-guide-to-api-development">March 23 - Starters Guide to API Development</h3><figure class="kg-card kg-image-card"><img src="https://blog.hyper.io/content/images/2022/03/Screen-Shot-2022-03-05-at-9.53.04-AM.png" class="kg-image"></figure><p>You can register here: <a href="https://www.charlestondigitalcorridor.com/talent/cdcu/1620179435385-starters-guide-api-design-scalable-application-architecture/">https://www.charlestondigitalcorridor.com/talent/cdcu/1620179435385-starters-guide-api-design-scalable-application-architecture/</a></p><h3 id="march-29-opensource-101-hyper-oss">March 29 - Opensource 101 - hyper OSS</h3><figure class="kg-card kg-image-card"><img src="https://blog.hyper.io/content/images/2022/03/2022_OS_101_Logo_Date_WHT.svg" class="kg-image"></figure><p>You can register here: <a href="https://opensource101.com/registration/">https://opensource101.com/registration/</a></p><h2 id="keep-on-a-lookout-for-the-hyper-beta-announcement-">Keep on a lookout for the hyper BETA announcement! 👀</h2><p></p><h2 id="community">Community</h2><p>Join our Slack community and say 👋 <a href="https://hyper.io/slack">https://hyper.io/slack</a></p>]]></content:encoded></item><item><title><![CDATA[Ship First Development]]></title><description><![CDATA[<p>Just do it! Automate your CI/CD pipeline, have a single passing test, and have a deployment script that publishes your project to a staging environment, then a production environment.<br></p><blockquote>Another option is to embrace <a href="https://trunkbaseddevelopment.com/">trunk-based development</a> and just have a production environment and deploy your code using feature flags.</blockquote>]]></description><link>https://blog.hyper.io/ship-first-development/</link><guid isPermaLink="false">62150aaab0bec5001d7c74c4</guid><category><![CDATA[DevOps]]></category><category><![CDATA[CICD]]></category><category><![CDATA[Shift Left]]></category><dc:creator><![CDATA[Tom Wilson]]></dc:creator><pubDate>Thu, 24 Feb 2022 10:49:54 GMT</pubDate><media:content url="https://blog.hyper.io/content/images/2022/02/ShipItBlogImg.png" medium="image"/><content:encoded><![CDATA[<img src="https://blog.hyper.io/content/images/2022/02/ShipItBlogImg.png" alt="Ship First Development"><p>Just do it! Automate your CI/CD pipeline, have a single passing test, and have a deployment script that publishes your project to a staging environment, then a production environment.<br></p><blockquote>Another option is to embrace <a href="https://trunkbaseddevelopment.com/">trunk-based development</a> and just have a production environment and deploy your code using feature flags. </blockquote><p>The point is to take the time upfront to set up your automated delivery pipeline first before you start to write code. </p><p>Before hyper, I was part of a team building a new software application and during the development process, everything was going great in our local environment. We were knocking out features left and right and our tests were verifying everything. As time went on, we would demo our work to our stakeholders, they would see the progress, but continue to make adjustments. These adjustments made the usability of the software better, but they impacted our capacity as the delivery date became closer. We shifted into another gear and began to implement the adjustments to the software application. Now it is time to ship our product, no sweat, we just push our code to the staging environment, then the production environment. </p><p>Code push "take one", 404 (Resource not found), what? How can that be? Is the database running? Is it accessible by the application? Is the application running? Check the logs, oh it's missing a dependency that happened to be installed on the local machine. Code push "take two", success! no more 404, but authentication does not work, I can't sign up. WTF, oh crap, we need to create a new OAuth2 service for both staging and production, because the callback URL needs to point to the actual environment. Code push take three, another issue, anyway, eventually we get the app deployed by the delivery date, but the process was a process of stress. And because the timeline was so tight we completely lost focus of documenting our deployment process or the time to create robust delivery scripts.</p><p>What is the answer? It's obvious, hire an SRE (Site Reliability Engineer) to do this for you right? Well, that will work, but that SRE needs to know everything about your app and technical stack, they need the time to understand what decisions you made and why you made them, then they need to start to dynamically create the deployment scripts, etc. Which will take time, and for many teams this is a valid process. But, I would like to recommend another approach, how about "ship your app first", before one line of business logic is written. Take the time upfront to create the environments and write the automated deployment scripts and wire everything up end to end. Put a coming soon page up for your app. </p><h2 id="why-ship-first">Why ship first?</h2><p>Simple, automation is easier to get right when not under duress. For example, all of your tasks are complete, everything works on your machine, the reviews have gone great and the stakeholders are excited to see your deliverable in a production environment. They think it will only take a minute, a push of the button to promote your incredible code to a production environment that meets all the performance and security requirements. </p><p><em>Guess what?</em>  The CI/CD setup always takes time, even for simple things, it takes time and there are always issues that come up between your dev environment and the staging and production environments, you may find the tests don't run in the CI because they are missing some unexpected dependency. Or you may find that the SSL Cert is not generating because y0u don't have the correct DNS configuration and you need operations to configure it and they are busy with other issues. You may find that the Redis production server you were promised months ago is not ready yet. This creates drama and anxiety and leads to pressure and frustration.</p><h2 id="just-ship-it-">Just ship it! 🐿</h2><p>I have found, taking the time to set up CI/CD before writing code saves a lot of time and effort and reduces frustration at the point of delivery. Give it a try! You will be surprised.</p><h3 id="ci-github-actions-">CI (Github actions)</h3><pre><code class="language-yaml">on:
  push:
    branches: "**"
    tags-ignore: "*"

jobs:
  test-deno:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        deno-version: [1.x]
    steps:
      - uses: actions/checkout@v2
      - name: Use Deno ${{matrix.deno-version}}
        uses: denoland/setup-deno@v1
        with:
          deno-version: ${{matrix.deno-version}}
      - run: make
        env:
          CI: true
</code></pre><h3 id="cd-github-actions-">CD (Github actions)</h3><pre><code class="language-yaml">jobs:
  publish-nest:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: denoland/setup-deno@v1
        with:
          deno-version: v1.x
      - run: deno install -A -f --unstable --no-check https://x.nest.land/eggs@0.3.6/eggs.ts
      - run: |
          export PATH="/home/runner/.deno/bin:$PATH"
          eggs link ${{ secrets.NESTAPIKEY }}
          eggs publish --yes</code></pre><h2 id="what-if-i-am-adding-a-new-feature-to-an-existing-product">What if I am adding a new feature to an existing product?</h2><p>This is one of the best things about automation is the ability to use feature flags, create your new module and any dependencies with no code, but hidden behind a feature flag, and ship it! Make sure you can push changes in real-time, now all you have to do is write and test your feature, have the code reviewed, and BAM! you are done! "Easy peasy lemon squeezy!" 🍋</p><h2 id="ship-first-code-later">"Ship first, code later"</h2><p>It may feel different, but it is not that hard and once you see the benefits you will jump for joy because you will no longer fear that push of code, it is done, you just have to make it work, which is the easy part 😀! </p><h2 id="not-convinced-trust-the-science-">Not convinced? Trust the science!</h2><p>A DevOps study conducted with 5,000 developer teams assessing the quality and performance, and it turns out the teams that ship code multiple times a day have a higher quality score than teams that ship code weekly, monthly or quarterly. To dive deeper read Accelerate - <a href="https://www.amazon.com/Accelerate-Software-Performing-Technology-Organizations/dp/1942788339">https://www.amazon.com/Accelerate-Software-Performing-Technology-Organizations/dp/1942788339</a> or google DORA metrics. It will be time worth investing. While you are reading, ship your code, go ahead right now and push that developing code behind a feature flag, and know, that when it works on your machine, it will work in production! 🐿</p><h2 id="bonus-pro-tip">BONUS: Pro Tip</h2><p>Develop in the cloud! By developing in the cloud, you keep your development environment clean and similar to the deployment environment. We use <a href="https://gitpod.io">https://gitpod.io</a> for our development environment and the result is frictionless experiences.</p><h2 id="-hyper-can-help-you-ship-spin-up-data-cache-search-storage-and-queue-services-with-a-single-click-check-it-out-at-https-hyper-io">⚡️hyper can help you ship! Spin up Data, Cache, Search, Storage, and Queue Services with a single click! Check it out at <a href="https://hyper.io">https://hyper.io</a></h2><p></p><h2 id="glossary">Glossary</h2><p>404 - Resource not found - an http status code that is returned when the server is unable to provide a response for the given request.</p><p>OAuth2 - OAuth2 is a standard authentication and authorization specification that enables users to register and log in to applications using secure identity management services, so that they do not have to share/enter identity information in the application unless the choose to.</p><p>CI/CD Pipeline - Continuous Integration and Continuous Delivery are quality automation tools, that all applications should to distribute software to users. Continuous Integration is the process of constantly integrating developers code into the main code branch while developing the application. Continuous Delivery is the process of shipping the application when new code is applied, reviewed and approved.</p><p>Feature flags - are identifiers that enable/disable features by configuration.</p>]]></content:encoded></item><item><title><![CDATA[It's your dime.]]></title><description><![CDATA[Hyper allows you to focus your time and resources on your customers. It’s your dime.  Would you rather spend it on features or managing backend services?]]></description><link>https://blog.hyper.io/its-your-dime/</link><guid isPermaLink="false">620d0e0db0bec5001d7c730d</guid><category><![CDATA[architecture]]></category><category><![CDATA[Startup]]></category><category><![CDATA[Database]]></category><category><![CDATA[cache]]></category><category><![CDATA[search]]></category><category><![CDATA[queue]]></category><category><![CDATA[storage]]></category><category><![CDATA[Javascript]]></category><category><![CDATA[Deno]]></category><category><![CDATA[NodeJS]]></category><dc:creator><![CDATA[Trip Ottinger]]></dc:creator><pubDate>Wed, 16 Feb 2022 20:08:23 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1539992190939-08f22d7ebaad?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDJ8fGNob2ljZXxlbnwwfHx8fDE2NDUwNDI4MzU&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1539992190939-08f22d7ebaad?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDJ8fGNob2ljZXxlbnwwfHx8fDE2NDUwNDI4MzU&ixlib=rb-1.2.1&q=80&w=2000" alt="It's your dime."><p>For all the non-technical and technical folks out there, I’d like to explain the genius behind hyper and our software development kit (SDK).  With hyper, you can put the power back in the hands of your application developers, get things done, and get back to delighting your customers.</p><p><strong>Why should you consider using hyper?</strong></p><ul><li><strong>Hyper is easy.</strong> Spin up backend services such as databases, search engines, and file storage buckets (to name a few) in seconds with literally a few clicks.  It's painless and friction-free.</li><li><strong>Hyper is inexpensive.</strong>  Start-ups that don't have to spend hundreds of thousands of dollars on dev-ops personnel and database administrators have an advantage. <a href="https://dashboard.hyper.io/">Sign up</a> and try hyper for free. When you’re ready to get serious, our <a href="https://docs.hyper.io/cloud/payment-and-pricing-terms">Pro plan</a> is just $99.00 per month.</li><li><strong>Focus on features.</strong> Hyper allows you to focus your time and resources on your customers. It’s your dime.  Would you rather spend it on features or managing backend services?</li><li><strong>Hyper is secure, scalable, and performant.</strong> This is what we do and we do it well.</li><li><strong>Hyper is composable.</strong>  What does this mean?  A software developer can gracefully connect calls from one service, such as a call to the data service, to another, such as a call to the cache service. This is made possible by our <a href="https://docs.hyper.io/cloud/hyper-connect">promised-based SDK</a>.  Its consistent shape and behavior provide a great developer experience.   See our related blog posts on <a href="https://blog.hyper.io/hyper-cache/">Caching all the things</a> and <a href="https://blog.hyper.io/composing-hyper-data-and-cache/">Composing Data and Cache</a>.</li></ul><p>In conclusion, hyper is unique in its ability to easily spin up new backend services, such as data, cache, queue, storage, and search in the cloud. How easy? Literally, just a few clicks. Skeptical?  <a href="https://dashboard.hyper.io/">Sign up</a> and create a new hyper application and backend services for <em>free</em>.  </p><p>Keeping devs happy,</p><p>⚡️ hyper team ⚡️</p><p> </p>]]></content:encoded></item><item><title><![CDATA[Composing hyper data and cache services]]></title><description><![CDATA[A quick TypeScript example demonstrating the composition of individual hyper backend services.]]></description><link>https://blog.hyper.io/composing-hyper-data-and-cache/</link><guid isPermaLink="false">620d1023b0bec5001d7c7392</guid><category><![CDATA[composition]]></category><category><![CDATA[Database]]></category><category><![CDATA[cache]]></category><category><![CDATA[typescript]]></category><category><![CDATA[Deno]]></category><dc:creator><![CDATA[Trip Ottinger]]></dc:creator><pubDate>Wed, 16 Feb 2022 20:05:29 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1645035883765-cd6b2389e210?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8YWxsfDh8fHx8fHwyfHwxNjQ1MDQyNjE3&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1645035883765-cd6b2389e210?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8YWxsfDh8fHx8fHwyfHwxNjQ1MDQyNjE3&ixlib=rb-1.2.1&q=80&w=2000" alt="Composing hyper data and cache services"><p>hyper cache is a cache document store that provides a clean API to cache JSON documents. Caches are good for all sorts of things, to take the stress off of your transactional database when performing reads, to provide sessions for authentication, to contain simple aggregate values for dashboards and metrics, and more. Cache systems are complex and a challenge to set up and maintain. hyper removes this burden. hyper makes it easy to cache.</p><blockquote><a href="https://blog.hyper.io/its-your-dime/">Why should I consider hyper? </a></blockquote><p>For example, a dev could save data into the hyper data service followed by caching the document. Your application's API can check for the data's existence in the cache, and if it exists, retrieve popular data requests from memory rather than the disk.  This has several advantages:</p><ol><li><strong>Speed</strong>:  Retrieving data from cache is much faster than retrieving data from a database.</li><li><strong>Conservation</strong>:  Retrieving data from a cache takes pressure off your database.</li><li><strong>Delight</strong>:  A performant app delights the customer.  </li></ol><p>Here’s a TypeScript code sample that saves a JSON document into a hyper data service followed by caching the document into a hyper cache service. Since the calls to <a href="https://docs.hyper.io/cloud/hyper-connect">hyper-connect</a> are promised-based, the calls to data and cache can be chained together:</p><figure class="kg-card kg-image-card kg-width-full kg-card-hascaption"><img src="https://blog.hyper.io/content/images/2022/02/data-cache-compose4.png" class="kg-image" alt="Composing hyper data and cache services"><figcaption>composing data and cache with Deno and TypeScript.</figcaption></figure><p>In conclusion, while the code sample above demonstrates a fairly happy path, it does illustrate composition of individual hyper backend services.   Ready learn more? Check out our <a href="https://blog.hyper.io/">blogs</a>, <a href="https://docs.hyper.io/cloud">docs</a>, <a href="https://docs.hyper.io/cloud/workshops">workshop videos</a>, and <a href="https://docs.hyper.io/cloud/quickstarts">quickstarts</a>.  </p><blockquote>Shhhh don't tell anyone.  We're building an experimental project: ⚡️ <a href="https://github.com/hyper63/hyper-ext-model">hyper-ext-model</a> ⚡️.  hyper-ext-model is a <a href="https://docs.hyper.io/cloud/hyper-connect">hyper-connect</a> extension that creates a model for an application that uses the hyper service. Using this extension you can compose hyper data, cache, search, storage, and queue (notification) services into a generic data model to define a given domain and provide basic business rules.  You can specify rollback <a href="https://github.com/hyper63/hyper-ext-model#modes">modes</a> of atomic or non-atomic for those not-so-happy-paths. 😀 😔</blockquote><p>It's all about the dx y'all,</p><p>The hyper team.</p>]]></content:encoded></item><item><title><![CDATA[3 responsibilities every software startup should address]]></title><description><![CDATA[<blockquote>Are you a founder or leader of a software startup? If so you want to incorporate a CTO role into your organization, it does not necessarily require a full-time employee, but the role should be addressed within your technical team.</blockquote><p><em>(see <a href="#glossary">glossary</a> below for clear definition of technical terms)</em></p><blockquote>In</blockquote>]]></description><link>https://blog.hyper.io/cto-for-startups/</link><guid isPermaLink="false">6207ac88b0bec5001d7c6db3</guid><category><![CDATA[Startup]]></category><category><![CDATA[CTO]]></category><category><![CDATA[Technology]]></category><dc:creator><![CDATA[Tom Wilson]]></dc:creator><pubDate>Tue, 15 Feb 2022 20:00:38 GMT</pubDate><content:encoded><![CDATA[<blockquote>Are you a founder or leader of a software startup? If so you want to incorporate a CTO role into your organization, it does not necessarily require a full-time employee, but the role should be addressed within your technical team.</blockquote><p><em>(see <a href="#glossary">glossary</a> below for clear definition of technical terms)</em></p><blockquote>In working over 25 years with several startups to publicly traded companies and now consulting with many startups, I have found a recipe for success to creating high-performing development teams and high quality software. There are a set of requirements that should have focus and importance for the continued success of a software startup. This focus has been applied to startups like <a href="https://citibot.io">Citibot</a>, <a href="https://hyper.io">Hyper</a>, NeedConnect, and RezRev in the role of a fractional CTO. In this article, I will introduce you to these responsibilities in the shape of a CTO role with these core responsibilities.</blockquote><p>To fully understand the value a CTO can provide for a Startup Company lets dive into the following:</p><ul><li>What is a CTO? Define the CTO Role</li><li>CTO Responsibility 1 - Oversight and Direction (Values and Principles)</li><li>CTO Responsibility 2 - Strategy and Vision (Methods and Practices)</li><li>CTO Responsibility 3 - Client Empathy and Communication (Transparency)</li></ul><p>Chief Technology Officer / VP of Engineering / Lead Engineer are various roles you may encounter in technology-driven companies. The CTO may not be a full-time person in a startup, but a fractional role that may be played by a founder, consultant, or technical lead. Often the responsibilities of a CTO and the value of executing on those responsibilities are not realized early in the company's growth. Let's explore the role and responsibilities of a CTO and how a CTO can help set a technical startup company for success.</p><figure class="kg-card kg-embed-card"><iframe width="200" height="113" src="https://www.youtube.com/embed/kdtmAOFGANI?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></figure><h2 id="what-is-a-cto">What is a CTO?</h2><p>The role of a CTO is to provide and curate the technology strategy and vision of the company's software tools and technologies. In this role the CTO has the following responsibilities:</p><ul><li>To provide oversight and direction for the technology group</li><li>To establish and communicate a clear vision of the software architecture and lifecycle of the company's software products</li><li>To meet and work with customers and prospects to help provide clarity and understanding of the technical abilities and capabilities of the company's software products</li></ul><h2 id="oversight-and-direction">Oversight and direction</h2><p>Software Development is in a constant state of motion that changes over time, based on a continuous feedback loop between the users of the software and the creators of the software. In order for this loop to remain highly functional and productive, it is a good idea to establish a system for checks and balances. Good working systems approach the delivery of the software in a "verify" mode. You may have heard of the phrase "Don't Trust, Verify". </p><blockquote>Don't Trust, Verify is a common communication strategy used in the blockchain development world, but it applies with all software code, we have tools and technologies that can quickly verify effective code, via automated testing and scanning tools.</blockquote><p>This mode requires that the software is verified by the stakeholders, product team, or quality assurance team. In startups, depending on the size this may be founders, salespeople, or a dedicated product or quality review team. A CTO can help provide a vision and plan for a more efficient and productive review cycle. By establishing agreed-upon values and practices, the verification of delivery can require a high degree of automation to create high-quality deliverables. </p><p>The <a href="https://agilemanifesto.org/">agile manifesto</a> has a great starting point for defining the values of a software development organization:</p><ul><li>Individuals over interactions</li><li>Working software</li><li>Customer collaboration</li><li>Responding to change</li></ul><p>These four values are great values, and all participants in the software lifecycle will agree to these values. There are some additional values that I have implemented with several startups and consider to be a standard approach, that may require some debate:</p><ul><li>Integrity/Commitment to Quality</li><li>Automate repeatable operations</li></ul><blockquote>Quality first or "Shift Left" and Automate repeatable operations are strategies formed from the DevOps movement and are considered industry standard, proven and documented in the <a href="https://www.amazon.com/Accelerate-Building-Performing-Technology-Organizations/dp/B07BMBYHXL/ref=sr_1_1?hvadid=241653451130&amp;hvdev=c&amp;hvlocphy=9010526&amp;hvnetw=g&amp;hvqmt=e&amp;hvrand=12362379891764064156&amp;hvtargid=kwd-307609789829&amp;hydadcr=21874_10169699&amp;keywords=accelerate+book&amp;qid=1644845702&amp;sr=8-1">ACCELERATE book</a>  </blockquote><ul><li>Lean development strategy (Lean development is the process of continuous delivery in small batches, this approach results in shipping production code multiple times a day instead of a weekly or bi-weekly cycle. Reference <a href="https://www.amazon.com/Continuous-Delivery-Deployment-Automation-Addison-Wesley/dp/0321601912">Continuous Delivery</a>)</li><li>Keep it simple (functional thinking - approaching software design and development using simplicity References, <a href="https://www.amazon.com/Grokking-Simplicity-software-functional-thinking/dp/1617296201/ref=sr_1_2_sspa?hvadid=518090872306&amp;hvdev=c&amp;hvlocphy=9010526&amp;hvnetw=g&amp;hvqmt=e&amp;hvrand=3621213628978164124&amp;hvtargid=kwd-1185437262936&amp;hydadcr=14909_9746144&amp;keywords=grokking+simplicity&amp;qid=1643746742&amp;sr=8-2-spons&amp;psc=1&amp;spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUExR1RFWktUQzBYUEY0JmVuY3J5cHRlZElkPUEwMzkyNTE3MTAzVTk2WkgyU09LSSZlbmNyeXB0ZWRBZElkPUEwMzEwMTM5MTVWNjAwR01aWlMyMiZ3aWRnZXROYW1lPXNwX2F0ZiZhY3Rpb249Y2xpY2tSZWRpcmVjdCZkb05vdExvZ0NsaWNrPXRydWU=">Grokking Simplicity</a> and <a href="https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html">Clean Architecture</a>)</li></ul><p>And there may be more to consider, <strong>the most important thing is to capture values and define them for your team and make them transparent to the team</strong>, each team member should apply your team's values to every decision being discussed or determined and they can act as guard rails to protect the commitment to the success of the software and the success of the company.</p><blockquote>In the future we will expand deeper into the process of establishing core values and explore how to implement some of the core values I have mentioned here. </blockquote><p>Other resources to check out: <a href="https://12factor.net/">Twelve Factors</a>  </p><h3 id="idea-to-product-like-farm-to-table-">Idea to product (like farm to table)</h3><p>Often times a company is born by an idea and the team creating the idea is not thinking about the far-off future of success, but thinking about the near-term challenge of creating enough value of a product to establish a sale. Early in my career, I was working for a startup company without clearly defined values for how the software developers should make decisions. Every developer and development team had to figure it out on their own with immense pressure to deliver features on fixed delivery dates. As a result, many shortcuts were applied and the software architecture formed organically and not by design, which resulted in complexity and confusion, and a lot of duplication of functionality. The result was a fragile product that contained lots of bugs. These bugs started to reduce the productivity of the teams, which resulted in delays and the inability to deliver features. Over time the creators of the software left and new developers were required to come in and work through the project with little documentation and scarce resources for direction. A common term to describe this situation is technical debt. Technical debt is a term that defines the trade-off between quality, cost, and time. </p><blockquote>Technical Debt (UnIntentional) - is best defined in the <a href="https://stripe.com/reports/developer-coefficient-2018">developer coeffcient report</a> - 17 hours a week or 42% of a developers time is spent on code maintenance.</blockquote><p>Without a north star of identified values or principles, the likely hood that your software company can fall victim to un-intentional technical debt is increased greatly, and the sooner a startup company can define and instill values in the development practice the less likely large un-intentional technical debt will happen. The importance of oversight and direction to create accountability and purpose can not be overlooked and is a cornerstone responsibility of a CTO.</p><h2 id="strategy-and-vision">Strategy and Vision</h2><p>Having software developer values or principles is a great start but these guidelines need to translate down to practices and processes that shape your architecture/design and delivery lifecycle. A CTO is responsible for establishing the practices in a collaborative manner with the development team. These practices describe the architecture design patterns your team will implement as well as the approach to software delivery. But first to apply a clear vision of the product and approach. A great way to achieve this is to answer 10 questions called an inception deck. This inception deck asks the team to answer 10 questions about the product and plan that the team will develop. Regardless of approach, your team needs to understand the vision and purpose of the software product, what is the definition of success for the product? What is the technical stack? What is the budget? What is the timeline? What are the roles required to achieve the objective? How much will it cost for a minimum viable product, how much time will it take?</p><p>There are a couple of practices that should be heavily considered on all projects and have been scientifically proven to create successful results. They are Continuous Delivery and Clean Architecture. We will explore these practices in the future. This core responsibility is to work with the team to establish the vision and practices to determine success for the software product. The benefit is that there will be strong clarity for each member of the team and as the team grows and things evolve knowledge can be transferred in a clear and transparent flow.</p><h2 id="client-empathy-and-communication">Client empathy and communication</h2><p>Technology and Software are confusing to a lot of people, from how it works to the complexity and challenges, customers/prospects may not want to get deep into the weeds of the technology, but often they need to be able to understand the value at a high level. The responsibility of the CTO is to be able to explain the technology in an understandable way for stakeholders, leaders, customers, and prospects. This is not as easy as it may seem, the complexity lies in calculating a baseline of understanding by the audience and adjusting the presentation in a way that transfers meaning. You will need to understand the audience's environment, and deeply understand the problem the software product is looking to solve. Users gauge value on outcomes, and any process needs to have strong visibility of the outcomes it produces. These outcomes can be measurements or emotions, measurements usually form in productivity milestones. A user is able to x process y times faster using this software product. A user enjoys the experience of using this software to accomplish their goals. </p><p>Effective communication of complex technology is often led by leveraging empathy, and you can become an effective communicator of how the technology your team is building can support the core needs of the user. </p><h3 id="infuse-the-communication-into-the-product-itself">Infuse the communication into the product itself</h3><p>Once you establish an effective communication strategy, it is worth thinking about embedding this communication into the product itself. The term is called User Experience, and the more the product can communicate the features and functionality in a relatable way to the user the better the experience. In consumer products this can be in the form of creative communication messages or spinners and in more enterprise applications it can be in the form of dashboards and metrics. The more your product can tell a relatable story to your user the better chance for success and separation from the competition.</p><h2 id="summary">Summary</h2><p>What is a CTO? A CTO is a role that provides and curates the strategy and vision of the software tools and technologies your company provides either to internal stakeholders or external customers. In order to fulfill that role the CTO must perform the following responsibilities:</p><ul><li>To provide oversight and direction for the company technical group</li><li>To establish and communicate a clear vision of the software architecture and life cycle of the companies software products</li><li>To meet and work with customers and prospects to help provide clarity and understanding of the technical abilities and capabilities of the companies software products</li></ul><p>As a startup founder, you may be thinking about budget, time, and fundraising. You may have hired an agency or freelancer to tackle the technical side and don't want to worry about the details. There are many stories where that kind of approach has led to failing outright or costly technical debt and very plain cookie-cutter products. No matter what stage of your software product or products, make sure you have a strong strategy and vision in place to empower your technical team to become high-performing and successful. By investing attention to these responsibilities you will find an increased opportunity for success and you will find loyal and happy software team members leveraging all of their creativity and talent toward a common purpose.</p><h2 id="still-have-questions">Still, have questions?</h2><p>If you want to learn more about a Startup CTO and how to approach software development as a startup, sign up to get notified when the next chapter of the Startup CTO book will be available.</p><h2 id="glossary">Glossary</h2><ul><li>Software Architecture - The design of the software how the code is organized for maintainability, scalability, reliability, the more intentional in the design of software the better. You can also define software architecture in the terms of goals, the goal of software architecture is to create software that empowers high productivity and low cost over time in economies of scale.</li><li>Software Lifecycle - Is the description of the process from feature to user, in order for a software feature to get to a user a series of steps or events need to occur, the description of these events organized in a timeline is known as the software development lifecycle. A common high-level lifecycle is the following: Design -&gt; Develop -&gt; Test -&gt; Document -&gt; Deploy</li><li>Technical Debt (UnIntentional) - The added maintenance and support required over time that must be completed in order to keep software functional, as a code based grows the debt can build up and productivity slows and the cost of software increases exponentially.   </li></ul>]]></content:encoded></item><item><title><![CDATA[The perfect application architecture]]></title><description><![CDATA[<blockquote>TL;DR; Computers are re-usable machines that can be applied for many functions, by studying the architecture of a computer we can understand or associate with how to future-proof our applications following a similar pattern.</blockquote><h2 id="how-to-future-proof-your-application">How to future proof your application?</h2><p>When you start to build an application or product</p>]]></description><link>https://blog.hyper.io/the-perfect-application-architecture/</link><guid isPermaLink="false">61f6b74ab0bec5001d7c6b62</guid><dc:creator><![CDATA[Tom Wilson]]></dc:creator><pubDate>Thu, 03 Feb 2022 19:17:20 GMT</pubDate><media:content url="https://blog.hyper.io/content/images/2022/02/perfect-architecture.png" medium="image"/><content:encoded><![CDATA[<blockquote>TL;DR; Computers are re-usable machines that can be applied for many functions, by studying the architecture of a computer we can understand or associate with how to future-proof our applications following a similar pattern.</blockquote><h2 id="how-to-future-proof-your-application">How to future proof your application?</h2><img src="https://blog.hyper.io/content/images/2022/02/perfect-architecture.png" alt="The perfect application architecture"><p>When you start to build an application or product there are many things to think about. What is the purpose of the product, what is its mission, what are the features we need, how will it be used, what is the best technology stack to use, etc? And these are all important questions, gathering requirements, understanding your goals, understanding the skillsets of your team. One major thing to think about is architecture or design, a well-designed application is an application that does not increase cost and decrease productivity over time. </p><p>Thought should be given about how to organize your application in such a way, that your team can continue to maintain the application based on economies of scale. This means that as your application scales the productivity should not decrease and cost should not increase in a relative proportion to the scale and complexity of your application. If the development effort continues to be more than the revenue of your product then you will not have a product or business for long. </p><h2 id="how-are-computers-architected">How are computers architected?</h2><p>So, how should we think about architecting our product's code? Many architectural patterns are available. As a thought experiment, let's  look at is the architecture of a computer. The design of a computer is a great example of an architecture that has lasted for many years and scales. </p><p>If you think about it, the computer is the most useful tool we have, yet without instructions it is a brick that does not do anything. When given peripherals, operating systems, and applications, it can serve many purposes.</p><figure class="kg-card kg-image-card"><img src="https://blog.hyper.io/content/images/2022/01/ComputerArchitecture.png" class="kg-image" alt="The perfect application architecture"></figure><h3 id="design">Design</h3><p>A computer is made up of the following components, CPU (central processing unit) this component is responsible for executing instructions, Memory RAM (random access memory) which is responsible for storing data in a temporary state for very fast reads and writes, Storage DISK (solid-state drives) which is responsible for storing data in a permanent location that can be accessed. These three core components make up the modern computer. Then you have a keyboard, monitor, printer, network, etc. These are peripherals that the computer uses to interact with the physical world. </p><p>You also have an operating system and applications that can be loaded on the computer. These systems are what transform the computer from a brick to a set of specific machines or applications that actually do something.</p><h4 id="benefits">Benefits</h4><p>There are significant benefits to this architecture, it allows for the computer to be used and re-used for many different applications with many different form factors and functions, from watches, phones, virtual reality, productivity, appliances, drones, etc. Using this architecture, we are able to create utility from idea to instruction to apply instantly. How does this relate to software architecture?</p><h2 id="clean-architecture">Clean Architecture</h2><p>Clean Architecture is the concept of separating side-effects from business rules or business logic. In computer architecture, we can think of side effects as peripherals and storage systems, and memory and CPU. The operating system as the bridge and applications as the business logic. This separation creates a highly reusable architecture, if the keyboard goes bad, you simply replace the keyboard, or if you want to swap the display for a VR Headset, you change the driver. Since drivers are injected into the computer, the computer does not have to know the implementation details of the VR Headset, it just needs to talk to a driver or specific API surface.</p><figure class="kg-card kg-image-card"><img src="https://blog.hyper.io/content/images/2022/01/CleanArchitecture.png" class="kg-image" alt="The perfect application architecture"></figure><h2 id="separation-of-services">Separation of Services</h2><p>Leveraging design patterns like dependency injection, closures, and functional programming, you can provide the basic model of a driver or bridge. These patterns allow the business rules/logic to perform functionality in a pure side effect free zone, then when the application sends the result of all of that calculation to the external service, whether that service is the presentation or a given external service, like a database, cache, or storage system. This separation increases the effectiveness of testing and organizes your application into a system of replaceable and upgradable sections. On the interwebs you will see a lot of talk around micro-services versus monolithic architecture, but regardless of the style of your architecture the details are in defined boundaries and separating your logic/rules from your services and side-effects.</p><h2 id="summary">Summary</h2><p>Clean Architecture is not easy, because it requires an extra abstraction at the time of creation may seem to be worth the extra effort. At hyper we have built a suite of services that makes this easier, checkout <a href="https://hyper.io">https://hyper.io</a> for more information. </p><p>Unfortunately, the majority of software applications are not designed this way and it is creating huge costs and lots of churn in the industry, we are not building on the shoulders of giants as much as we should be. For reference, check out <a href="https://stripe.com/reports/developer-coefficient-2018">The Developer Coefficient Report</a>. Over 40% of a developers time is spent dealing with technical debt. This should not be the norm and a significant amount of that technical debt is create by tightly coupled services and the spread of business logic and rules over several layers of an application.  </p><p>Over time as the product needs more features and becomes more complex, this separation will become a time-saver, by creating boundaries between your business logic and services. </p><p>The proof is right in front of us, while the computer started with the input of punch cards and the output of green bar paper, we were able to evolve the external devices and services without changing the core architecture. And the cost of the computer went down and the productivity of creating the computer went up. </p><blockquote>Designing applications to separate presentation and service layers from your business logic will empower your teams to change and modify services without having to change or break the application over time.</blockquote><h3 id="learn-more">Learn more</h3><p>To learn more about this approach, come chat with us <a href="https://hyper.io/slack">https://hyper.io/slack</a>, check out functional programming and dependency injection. The book <a href="https://www.amazon.com/Clean-Architecture-Craftsmans-Software-Structure/dp/0134494164">Clean Architecture</a> is worth checking out as well.</p><blockquote>There are many solutions that support this design, at hyper we use FP and transform async functions that contain side effects into pure Task/Async functions then execute them at the edges of the boundary of the application using lazy execution. </blockquote><blockquote>We also use closures for dependency injection so that our business logic inverts the dependency of the service by injecting the pure Task/Async function into the business rule function. As you will learn by reading the above-linked book and articles there are plenty of ways to approach this design.</blockquote><h2 id="check-out-hyper-s-collection-of-services">Check out hyper's collection of services</h2><p>Regardless of your approach, having clear boundaries between your services and your application is a great way to get started, check <a href="https://hyper.io">hyper</a> a service that gives you this separation by giving you access to core application services using a general-purpose API.</p>]]></content:encoded></item><item><title><![CDATA[extending hyper --->]]></title><description><![CDATA[<blockquote>TL;DR; Check out our new hyper extension - <a href="https://github.com/hyper63/hyper-ext-counter">https://github.com/hyper63/hyper-ext-counter</a> - with this extension you can use the cache service to increment, decrement counters by a key name.</blockquote><h2 id="extensibility">extensibility</h2><p>hyper is designed with the ability to extend any API without directly affecting the core API design</p>]]></description><link>https://blog.hyper.io/extending-hyper/</link><guid isPermaLink="false">61f2ecdfb0bec5001d7c6ac7</guid><category><![CDATA[SaaS]]></category><category><![CDATA[Javascript]]></category><category><![CDATA[hyper]]></category><category><![CDATA[extensions]]></category><dc:creator><![CDATA[Tom Wilson]]></dc:creator><pubDate>Fri, 28 Jan 2022 14:59:48 GMT</pubDate><media:content url="https://blog.hyper.io/content/images/2022/01/ext-hyper-cover.png" medium="image"/><content:encoded><![CDATA[<blockquote>TL;DR; Check out our new hyper extension - <a href="https://github.com/hyper63/hyper-ext-counter">https://github.com/hyper63/hyper-ext-counter</a> - with this extension you can use the cache service to increment, decrement counters by a key name.</blockquote><h2 id="extensibility">extensibility</h2><img src="https://blog.hyper.io/content/images/2022/01/ext-hyper-cover.png" alt="extending hyper --->"><p>hyper is designed with the ability to extend any API without directly affecting the core API design and functionality, the counter module is our first implementation of extending the hyper core API. The counter module leverages the cache API to create a more specialized API that increments, decrements and resets a numeric value in your hyper cache store. This specialization, will enable developers to quickly implement counter functionality in their applications. We plan to continue to provide extensions for the hyper-connect client that compose the primitive services together for more specialized services, while maintaining a general purpose.</p><h2 id="hyper-ext-counter">hyper-ext-counter</h2><p>The counter extension gives developers the ability to easily increment and decrement a unique key in the cache store.</p><h4 id="install">Install</h4><pre><code class="language-sh">npm install hyper-connect hyper-ext-counter</code></pre><blockquote>⚡️ create a free hyper account at <a href="https://dashboard.hyper.io">https://dashboard.hyper.io</a> then get a connection string and create an ENVIRONMENT VARIABLE <br><br><code>HYPER=[CONNECTION STRING]</code></blockquote><h3 id="initialize">Initialize</h3><pre><code class="language-js">import { connect } from 'hyper-connect'
import { counter } from 'hyper-ext-counter'

const hyper = counter(connect(process.env.HYPER))</code></pre><h3 id="increment">Increment</h3><p>The increment command will read the current value from the cache and increment that value by 1 and store the new value on the cache and return the new value.</p><pre><code class="language-js">const widgetCount = await hyper.ext.counter.inc('widgets')
console.log(widgetCount)</code></pre><h3 id="decrement">Decrement</h3><p>The decrement command will read the current value from the cache and decrement the value by 1 and store the new value on the cache return the new value.</p><pre><code class="language-js">const widgetCount = await hyper.ext.counter.dec('widgets')
console.log(widgetCount)</code></pre><h3 id="reset">Reset</h3><p>The reset command will reset the current value in the cache to zero and return zero to the caller.</p><pre><code class="language-js">const widgetCount = await hyper.ext.counter.reset('widgets')
console.log(widgetCount)</code></pre><p>Each of these commands take a single argument, this argument is a unique key in the cache store and can be called whatever the developer chooses as long as it is alphanumeric and does not contain any non-alphanumeric characters and starts with an alpha character (a-z).</p><h2 id="summary">summary</h2><p>hyper services are built to extend and provide consistent general value that can be combined in several ways to create re-usable purposeful functionality. These extensions can speed up application development of business rules as well as maintain a clear separation from the business layer and the services layer.</p>]]></content:encoded></item><item><title><![CDATA[The future is DENO! 🚀 The future is NOW!]]></title><description><![CDATA[<blockquote>TL;DR;<br><br>Deno is a javascript runtime that can run in edge and server environments, with security built-in by default. The biggest feature by far for DENO is its conviction to Web standards, it implements many features using web-based standards which means more compatibility with browsers. Check out this tutorial</blockquote>]]></description><link>https://blog.hyper.io/the-future-is-deno-the-future-is-now/</link><guid isPermaLink="false">61df2c253d6add001e770e5b</guid><category><![CDATA[Javascript]]></category><category><![CDATA[Deno]]></category><category><![CDATA[typescript]]></category><dc:creator><![CDATA[Tom Wilson]]></dc:creator><pubDate>Fri, 21 Jan 2022 12:29:10 GMT</pubDate><media:content url="https://blog.hyper.io/content/images/2022/01/deno-post-bkg.png" medium="image"/><content:encoded><![CDATA[<blockquote>TL;DR;<br><br>Deno is a javascript runtime that can run in edge and server environments, with security built-in by default. The biggest feature by far for DENO is its conviction to Web standards, it implements many features using web-based standards which means more compatibility with browsers. Check out this tutorial if interested in learning if DENO is a good fit for your next project. Javascript has grown a lot in the last 20 years, it is time to leverage a runtime that has taken lessons learned from the past and applied those learnings to a new and stable runtime. Always bet on JS!</blockquote><img src="https://blog.hyper.io/content/images/2022/01/deno-post-bkg.png" alt="The future is DENO! 🚀 The future is NOW!"><p></p><h2 id="what-is-deno">What is DENO?</h2><p>Deno is a JS runtime open source project that was started by the creator of NodeJS, this runtime implements core principles that the creator felt should have been in NodeJS. What a great opportunity to create a project to right some of your wrongs, but I don't think they were all wrong in the beginning a lot of these improvements were learned in the years that followed. The big takeaway about Deno is, that it enables you to run TypeScript and JavaScript on the server and edge platforms, and many of the standard library modules are Web standard compatible. Standard compatibility means that the APIs are the same specifications created by the W3C standards body. This conviction goes a long way to anti-fragility.</p><h2 id="why-is-deno-the-future">Why is DENO the future?</h2><p>The conviction to security and Web standards, I believe will slowly evolve into Deno being the clear Javascript runtime in the future, unfortunately, there are a lot of tools and higher abstractions built on top of NodeJS. </p><blockquote>It is not always about features when choosing a runtime, sometimes a solution with core mission and sound foundation can be a real game changer.</blockquote><h3 id="web-standards-compatibility">Web Standards compatibility </h3><p>Deno focuses on Web Standards compatibility, which means, Deno provides API's using browser standards as much as possible:</p><ul><li>window</li><li>localStorage</li><li>navigation</li><li>crypto</li><li>fetch</li></ul><h3 id="single-and-secure-executable">Single and Secure Executable</h3><p>Being able to bundle your application with Deno in a single binary with security flags specified makes distributing your applications extremely flexible for any platform. You can avoid constraints imposed by specific platforms, for example, if deployment platform only supports version x, and you deliver an executable wrapped with your preferred version of Deno, then the platform can't dictate your version.</p><h3 id="it-s-in-the-box">It's in the box</h3><p>Deno comes with JSX, TypeScript, REPL, Linting, Formatting, Testing in the box, no need to search for third-party tools and dependencies, these will always be supported.  </p><pre><code class="language-sh">deno repl
deno lint
deno fmt
deno test</code></pre><h3 id="decentralized-dependency-management">Decentralized Dependency management </h3><p>Better dependency management by not having a central point of failure. Deno accomplishes this by using URLs to import modules. A URL can be a reference point to any address on the internet. Using DNS, you can easily have several origins that serve up content. This decentralized model provides redundancy and scalability. URL imports will give your team more confidence that code that is running on their environment is unchanged in production environments, especially with repositories like nest.land.</p><blockquote>Nest.Land is a Deno code repository that uses ARWeave Blockchain to store all source code, which means the code is permanent and always available for a minimum of 200 years, but more likely forever. This can give consumers of your modules a great deal of confidence. It is impossible for even the owner of the software to delete from the ARWeave blockchain.</blockquote><h3 id="built-to-run-on-the-edge">Built to run on the edge</h3><p>The edge is a server network that distributes executable code to data centers around the world giving everyone with the internet very close proximity to the executable code. This is a perfect solution for web and mobile applications to significantly reduce latency and leverage near-user caching to create incredibly fast experiences for your clients.</p><h2 id="is-it-right-for-me">Is it right for me?</h2><p>JavaScript is here to stay and there are plenty of options, NodeJS certainly has the strength of being around in the server space for the longest, but it does not play well on the edge. Runtimes like Cloudflare workers, Deno Deploy, and others are starting to take shape. If your application requirements consist of low latency and stateless performance, give Deno some consideration.</p><p>If you start to feel fatigued by dependency nightmares and growing concerned about security threats via man-in-the-middle attacks or the number of open source libraries you have to trust that lack full support capabilities, then I would recommend looking for a Deno for your next project. Why not take it for a spin in this little getting-started tutorial I created <a href="https://github.com/twilson63/go.hyper.io">[here https://github.com/twilson63/go.hyper.io]</a>.</p><h3 id="cons-why-should-i-hold-off-on-deno">Cons, why should I hold off on Deno?</h3><p>People do not like change, sometimes change is hard, too entrenched in one technology and the "features" vs the "pain/risk" don't seem to be enough to invest in a migration. But I think the big one is Meta framework support, Deno does not have a good story for the meta frameworks. I think this will change in 2022, look at Remix, SvelteKit, etc.</p><h2 id="summary">Summary</h2><p>DENO at version 1.17 is starting to mature as a JavaScript runtime, the edge computing space is ramping up starting to improve support for many different architectures, SPAs, MPAs, APIs, etc. JavaScript is here to stay, the web is here to stay and I believe DENO is here to stay, so if you bet on JS, consider betting on DENO, for our team, Deno has removed many pain points we experienced from the NodeJS ecosystem and we believe Deno has a very bright future.</p><h2 id="btw-check-out-hyper-">BTW! Check out hyper!</h2><p>⚡️hyper is our backend as a service product that lets you never have to say Kubernetes or AWS Web Services again. Check out our getting started docs at <a href="https://docs.hyper.io/cloud">https://docs.hyper.io/cloud</a> and get started building applications that can change the world! If you need help or just want to chat join our community at <a href="https://hyper.io/slack">https://hyper.io/slack</a> and say 👋🏻 Hi!</p>]]></content:encoded></item></channel></rss>