DEV Community

Cover image for HERN Stack, Comin’ In Hot
Margo McCabe for HarperDB

Posted on • Updated on • Originally published at harperdb.io

HERN Stack, Comin’ In Hot

New tech terms and lingo are constantly popping up in the development world. It’s hard to keep up! People also love to share and debate about their favorite tech stacks and tools / frameworks. That said, there is no ultimate right or wrong answer when it comes to choosing a tech stack because it really depends on the specific use case it’s meant to solve for.

Today, let’s take a look at the HERN stack. Ever heard of it? It’s a new “buzz word” as they say, and I thought it might be helpful to provide some clarity. The HERN stack stands for HarperDB, Express, React, and Node, the four technologies that make up this particular stack, and they’re all written using JavaScript. This is a full-stack solution that follows a common 3-tier architecture (front end, application, and database).

As mentioned, there are numerous stacks out there and different factors play a role in the decision around which is right for your specific end goal. Remember that you have the freedom to choose and try different stacks! To make sure we’re all on the same page, Stackshare defines a tech stack as “the set of technologies an organization uses to build a web or mobile application. It is a combination of programming languages, frameworks, libraries, patterns, servers, UI/UX solutions, software, and tools used by its developers.” So as you can see, the combinations and possibilities are endless!

What Makes up the HERN Stack?

  • HarperDB: Distributed SQL / NoSQL hybrid database accessed via a REST API.
  • Express.js: Open source, back end web application framework for Node.js, designed for building web applications and APIs.
  • React.js: Open source, front end, JavaScript library for building user interfaces or UI components.
  • Node.js: Open source, cross-platform, back-end JavaScript runtime environment that executes JavaScript code outside a web browser.

There are several reasons that these technologies work well together and serve as a great full-stack solution for projects like app development and web development. There are also variants of this stack that would work just as well, such as swapping out and incorporating frameworks like Vue, Angular, or Fastify. HEAN, HEVN, HFRN… don’t be afraid to get creative and choose what technologies make the most sense for you!

How Does the HERN Stack Work?

Alt Text

Like most tech stacks, this one has a frontend, backend, and database tier. The HERN stack allows you to write everything in Javascript, ultimately simplifying and streamlining the development process. Each component of the HERN stack provides a unique benefit, and data flows naturally through each of the three tiers, enabling rapid development and simple upkeep. (Fun fact - HarperDB is actually the only database that was built from the ground up in Node.js, which you can read more about here!)

Frontend

React serves as the frontend or web tier of the HERN stack. Among the many reasons React is taking over frontend development, it enables faster development, simplifies coding and integration, and comes with a strong community. The HarperDB Management Studio was written in React. React has improved the quality of front end development and allowed us to quickly make changes and improvements to our application.

HarperDB also provides a great React SDK, if that’s your style, or you could make calls directly to HarperDB via our built-in, easy to use API. Either way, you can query data directly from within your client-side application if you choose. React Hooks are a great place to manage your API calls and how responses are handled within your app.

Backend

Node.js and Express.js serve as the backend, server, or application tier of the HERN stack. Express essentially operates inside a Node server, as the server-side framework. Express is a minimal and flexible framework, with numerous HTTP utility methods and middleware at your disposal.

The idea here is that you build your custom API functions (GET, POST, etc.) with Express to be called by the React front end. These functions then make calls from the server to HarperDB to access and modify the database. You can utilize the HarperDB Node.js client, which natively supports promises and callbacks. The library makes HarperDB interactions feel more native to JavaScript by exposing each HarperDB operation as a function on the client object.

Database

If you need to store or transport any type of data, which you probably do, you will also need a database. Why not choose the quickest, easiest, and most intuitive database out there? HarperDB provides full document store capability plus enterprise grade ACID-compliant SQL, effectively allowing you to run SQL on JSON. The database is accessed via a single endpoint REST API using SQL and NoSQL operations. Also, Custom Functions are serverless, highly customizable API endpoints that interact with our HarperDB Core operations. HarperDB has simplified much of the work when it comes to database installation, configuration, and administration. It’s really a great option for developers of any skill level. Check out HarperDB Cloud if you’re building in the cloud, or you can also do a local install on your server.

Is HERN Your Next Full-Stack Solution?

You can essentially build anything with the HERN stack, and it’s especially great for JavaScript developers and projects with lots of JSON data. With a dynamic schema, HarperDB was designed to ingest and handle any type of data at scale. You no longer need to pick a database based on the structure of your data. HarperDB provides the flexibility to work with the frameworks of your choice, and ability to connect to your favorite reporting or analysis tools.

Scaling is easy with HarperDB’s clustering and replication features, and our data model, built on top of LMDB, is enabling us to break records on both read and write speeds. HarperDB works extremely well with Express, React, and Node, and with this tech stack you can maximize your time writing code, and work on your project instead of debugging and other administration tasks.

Don’t get stuck in your old ways! Try the new HERN, HEAN, or HEVN stack and let us know what you think. We would love to hear what you’re working on!

Top comments (34)

Collapse
 
stephengoldberg profile image
Stephen Goldberg • Edited

Wanted to take a moment to respond to address some of the themes in these comments.

I am a former Red Hatter, and am passionate about Open Source. I would also be lying if I didn’t acknowledge that part of the reason we started HarperDB was to make money. That said, an equally large part of why @kylebernhardy and @zaxharperdb and I created HarperDB is because we are extremely passionate about technology, the developer community and building awesome products. Our favorite moments at HarperDB is when we hear from the community about how much they love using our product, especially when it’s the free version. It’s incredibly exciting for us and it motivates our entire small team to keep chugging away. Our entire team is motivated to build great products that developers love, that is what gets us out of bed every day.

That said the reality is that building great software costs money. HarperDB Cloud costs us about $8,000/month to support our 434 freemium users. We spend about $2 million a year building HarperDB. People all over the world love our product and we want to continue to build, develop, and support a product they care about.

Before launching the company, I very much wanted HarperDB to be OSS, and I still hold out hope that someday we will make that work. I carefully researched database companies in the market before launching the product and found that OSS database companies were struggling to stay alive, and as much as I wanted to make HarperDB OSS I wanted to ensure that we could build a lasting company, with a great product, great service, and take care of our amazing employees.

In the interim we open source as much of the ecosystem of our products as we can, we contribute to open source projects where we can, and we try and shine a spot light on amazing open source projects like AlaSQL and others where we can.

Hopefully all that gives some context as to why HarperDB currently utilizes a freemium/premium model.

The other point I wanted to make is I don’t really understand the desire to troll posts like these? It’s not as if we are forcing you to use our products, read our blogs, or engage with our marketing? We are firm believers in choice and think people should use the product that they want, that’s right for the job, and with a company that share their core values.

Having worked in the startup world for a very longtime I’ve become accustom to trolling, rejection, and people hating on things I am passionate about. That said, our team is a small group of highly dedicated people who really care about what they are doing. What’s the value in attacking them? How is it hurting you personally? How is their passion and excitement a negative impact on your life?

I’ve seen a lot of products that I think are stupid or lame, but unless the company itself is filled with rude, obnoxious, misogynistic, or racist folks I never feel the need to attack them? I’ve come to accept that trolling often comes from a place of self-hatred, self-loathing, deep-seated insecurity etc.… and as a result I’ve grown to have empathy and compassion for the folks who are doing it, but I would ask you to examine oneself if it’s a behavior you engage in regularly, you might find that you could live a happier more fulfilled life without the trolling.

Rant finished. Happy to discuss more offline with anyone if that is more comfortable. stephen@harperdb.io.

  • SG
Collapse
 
andrewbaisden profile image
Andrew Baisden

The HERN stack has a nice ring to it.

Collapse
 
braydentw profile image
Brayden W ⚡️

Agreed, much better than “MEAN”

Collapse
 
margo_hdb profile image
Margo McCabe

notwrong

Collapse
 
kaystock profile image
Kaylan Stock

Agreed :)

Collapse
 
lcarbonaro profile image
Les Carbonaro

The HEVN stack even more so :-)

Collapse
 
cadams profile image
Chad Adams • Edited

Dang express.js in 2021? Also HarperDB isn’t open source no thanks.

Collapse
 
deliciousmonster profile image
Jaxon Repp • Edited

I'm the VP of Product for HarperDB.

HarperDB currently uses Express for our internal API, but we're ripping it out and replacing it with Fastify. Our internal benchmarks say this will increase API performance by at least 50%, but we're hoping for double that.

So, @chadalen , I get it- there are certainly newer, faster frameworks for Node APIs, but Express, along with MEAN and MERN stacks, are far more widely deployed and familiar to most developers... and I don't even know how I would begin to pronounce HFRN.

As for us not being open source, I defer to @stephengoldberg , who answered at length below.

I will say that I don't know of any open source database that offers the features, performance, support, and infrastructure that HarperDB does- especially with a free tier... MongoDB just had to change their license to ensure their SaaS offering can generate sustainable revenue, after all.

Collapse
 
cadams profile image
Chad Adams • Edited

"I will say that I don't know of any open source database that offers the features, performance, support, and infrastructure that HarperDB does"

Not trying to bash on HarperDB but have you heard of PostgreSQL? If I wanted support/infrastructure I would use either AWS RDS or DigitalOcean's Managed Databases. Both are much cheaper than yours. Why should I use HarperDB over those?

Collapse
 
moopet profile image
Ben Sinclair

I don't even know how I would begin to pronounce HFRN

Getting to the critical reason for any computer endeavour!

Collapse
 
treboryx profile image
Robert

You'd recommend something else?

Collapse
 
cadams profile image
Chad Adams • Edited

Of course, I’d recommend Fastify. Express is dying. If you go to the HarperDB website they even say right on the main page quick setup with Fastify and HarperDB. HERN just sounds better than HFRN.

Thread Thread
 
mauro_codes profile image
Mauro Garcia

Express is dying? Did you check the results in state of js survey this year?

Thread Thread
 
margo_hdb profile image
Margo McCabe

@chadalen thanks for the input! This is an explanation of one option for a tech stack, and as mentioned in the blog, you should certainly choose what technologies make the most sense for you. We are also huge fans of Fastify, and we're hosting a livestream event on the 26th with a top Fastify maintainer, building a REST API w/ Fastify & HarperDB. You should check it out!

Thread Thread
 
cadams profile image
Chad Adams • Edited

@maurogarcia_19

It is don't believe me?

The survey you're talking about is regarding how popular express is. Which it should be because it's one of the oldest node web servers out there. It takes a while to get people off of these but doesn't mean you should use it.

Look at PHP for example it's straight up garbage but people still use it.

Express is still great for smaller projects or quick prototyping but if you're serious you wouldn't use it.

Thread Thread
 
treboryx profile image
Robert

Thanks for the recommendations along with the stats.

Thread Thread
 
mauro_codes profile image
Mauro Garcia
  • The date of the last commit or the number of current issues is not relevant. A project without issues maybe is dead.
  • Original developers can build other things. That doesn't mean that it's dead.
  • Popularity translates into community support. Which is great if you're dealing with issues.
  • Not all projects are huge. If your project is small. It doesn't mean that you are not "serious".
Thread Thread
 
cadams profile image
Chad Adams • Edited

"A project without issues maybe is dead."
A project without resolving issues is also dead.

"Original developers can build other things. That doesn't mean that it's dead."
True but they were the primary contributor.

"Popularity translates into community support. Which is great if you're dealing with issues."
Community support but no one contributes to their repo to fix the underlying issues.

Thread Thread
 
mauro_codes profile image
Mauro Garcia

Well we could agree to disagree at least!

Thread Thread
 
cadams profile image
Chad Adams

Haha right, it's all good. These are good conversations.

Collapse
 
petroskoulianos profile image
Petros Koulianos

I vote for HERN stack and the HarperDB concept. Keep going Harper team 😎😎😎.
I will definitely build a dev blog with HarperDB 😁😁😁😁

Collapse
 
margo_hdb profile image
Margo McCabe

Yesss 🙌 thanks Petros! Can't wait to see that blog 👀

Collapse
 
ianh profile image
ian h

Why HarperDB? I'm not sure why I'd give up the massive ORM/db connection ecosystem with tools like knex, etc. To switch to a HTTP based connection without all the bells and whistles seems like a step backwards.

Collapse
 
jacob_b_cohen profile image
Jacob Cohen

Simplicity. Adding layers to the stack can add serious complications to projects that sometimes just don't need it. Knex looks pretty cool and we'd love for the community to integrate HarperDB into this and other solutions like it. That said, ORMs lock developers into strict structures that limit what the application can do to what the ORM can do, rather than the underlying database. Personally, I believe that abstraction adds more complication than it's worth. That said, there are tools that aid in development with HarperDB that Margo mentioned in the article like the Node.js client and the React hook.

Collapse
 
ivan_jrmc profile image
Ivan Jeremic • Edited

I like node API based stuff but I can tell you for sure Harper will never blow up if you guys don't open source it. I mean what can be so special and secrete about this system it is a node api and I don't know maybe the servers are kept in sync via graphql subscriptions I don't know but for sure it is not something that does not already exists. Also the Dashboard UI needs a Developer Asap. I recommend hiring an React dev and build a dashboard in React that looks like a modern one, the current dashboard I don't know what to say it looks Alpha. I hope you guys take this as feedback.

Thread Thread
 
jacob_b_cohen profile image
Jacob Cohen

Thank you for the feedback, Ivan! The bundled dashboard UI included with HarperDB is deprecated. We have shifted our focus to the hosted HarperDB Studio, but chose to include the existing UI in the event that users may still want to use it. Our long term roadmap includes a refresh of the bundled UI and/or a packaged downloadable application similar to the hosted Studio.

Collapse
 
ivan_jrmc profile image
Ivan Jeremic • Edited

All this knex stuff and everything you used to write is so much garbage, all application today need are APIs where the data come from.

Collapse
 
joedotnot profile image
joedotnot

Seriously ? let's put the username/password on the UI page for all to see?
github.com/harperdb/harperdb-sdk-r...

import React from 'react';
import ReactDOM from 'react-dom';
import { HarperDBProvider } from 'use-harperdb';

ReactDOM.render(
<React.StrictMode>
<HarperDBProvider url="localhost:9925" user="HDB_ADMIN" password="password">
<App />
</HarperDBProvider>
</React.StrictMode>,
document.getElementById('root')
);

Collapse
 
jacob_b_cohen profile image
Jacob Cohen

Hi @joedotnot ,

If you’re asking why we’d ever put any credentials into a web client, normally, we wouldn’t… That is universally considered a very bad idea. This is a sample in the readme, there are certainly other ways to handle the credentials, like prompting the end user for their credentials and passing them in here.

That said, with HarperDB’s attribute-level role permissions, you can restrict the tables, operations (CRUD), and attributes to which a user has access. So while most of the time you’ll want pass this request through a separate server-side API to limit queries by an attribute like user_id, you can also grant direct access to the database for those queries where it makes sense- as long as you lock down the user’s role appropriately.

Collapse
 
joedotnot profile image
Comment marked as low quality/non-constructive by the community. View Code of Conduct
Info Comment hidden by post author - thread only accessible via permalink
joedotnot

I was commenting because you are showing a demo / sample on your official website / repo, and before too long somebody will use it as is, because hey it's an official example, so it must be good, right ! It's also telling any serious developer to stay away from your product (but it is your product, I'm nothing). All the best.

Collapse
 
_genjudev profile image
Larson

1GB RAM $215.89 (Annual). So my customers need most of the time self hosted solutions why should I waste so much money? Usually we have 32GB RAM which cost $7,568.64. I could also switch to oracle DB if I want to burn money.

Collapse
 
qzsg profile image
Info Comment hidden by post author - thread only accessible via permalink
Adrian • Edited

This whole article reads like a sponsored pr product marketing post. Tell me what's different and cool about your product, not some generic things that almost all databases have and make me visit your website to learn more.

Collapse
 
yashshah224 profile image
Yash Shah

Haven't used HarperDB till now. Is it better than MySQL?

Collapse
 
jacob_b_cohen profile image
Jacob Cohen

We think so! In reality, they're different database solutions. MySQL is a solid relational database, where HarperDB is more of a NoSQL style database with SQL query capabilities.

Some comments may only be visible to logged-in visitors. Sign in to view all comments. Some comments have been hidden by the post's author - find out more