Go back

HASURA: GraphQL API that saves time

Written by
Mika Martin
Mika Martin
on April 24th, 2024
hasura-blog-image

As a software developer company always on look out for the best of the best to bring to the table for our clients, Pieoneers can wholeheartedly attest that Hasura is one of prime tools for modern solutions.

What is Hasura?

Hasura is one of the Platform as a Service tools that make web application development so much faster and easier. It is an open-source GraphQL server which can quickly deploy GraphQL APIs for a Postgres database. Real-time, high-performance and low-footprint, Hasura features powerful queries, precise access control, remote schema creation and migrations, and provides robust support for Postgres types. Used by industry leaders and smaller enterprises alike, Hasura comes with the benefit of active community and extensive documentation and tutorials. One of its pros is that Hasura supports scalability; in fact, when you need to move on, you can stop using it or even GraphQL altogether, and make something new using the SQL at its core. This is the kind of flexibility that is important to keep in mind if you want to provide for the growth of your project.

hasura-advantages

Challenges of the legacy code

For Pieoneers team Hasura became one of the answers to the challenges DRH initiative was facing, along with a whole new stack of technologies we adopted for this project specifically. Even though from the user’s point of view the UI still looks the same, it is essentially a new app built rapidly around the existing database.

What is DRH?

DRH, the Database of Religious History, is the world’s first comprehensive online quantitative and qualitative encyclopedia of religious cultural history. The DRH is a massive, standardized, searchable encyclopedia of the current best scholarly opinion on historical religious traditions and the historical record more generally. It allows users to instantly gain an overview of the state of scholarly opinion and access powerful, built-in analytic and data visualization tools.

Source: The official DRH website

DRH was created more than 5 years ago using Django, React and Python 2.7. Its tech stack has become outdated since then, many of the libraries used have little to no support now. As it is often the case with legacy software, it would require a considerable effort to add new features at this point. This being said, DRH needed a lot of new functionality introduced along with back-end redesign to keep up with times.

Before

As a niche academic project with low to medium load, DRH didn’t have the budget needed for such a major undertaking, and outdated code stood in the way of bringing the application up to speed. What to do, how to solve this equation?

How to make an app fast in no time

One of the changes DHR wished for was reducing how long it took to search and filter the database. The application needed to be faster and more reliable to be more useful for the research community.

hasura-time

How was this achieved?

What was needed was a new module to work with the database instead of old Python code with its old libraries. It should be able to read from the database and output filtered results, but writing such a module from scratch would take time. This is where Hasura and its ready-to-use toolbox was invaluable. It provided an additional layer of functionality so the source application stayed intact and worked as before, while new features used Hasura for database seamless integration.

After

Using configuration alone, Hasura was able to:

  • Manage access permissions
  • Read records from the database
  • Manage database schema
  • Handle data migration

Hasura also enabled the use of cashing, since the app could use only one API as a single end point. This alone improved an overall UX experience a lot.

UX benefits for the redesigned app included:

  • Visible speed increase
  • Less bandwidth usage
  • Better mobile experience

Pioneering approach to software development

As you could have noticed from the blog, for Pieoneers almost every new project comes with a new technology and a new set of skills to explore and to adopt. IT field is ever changing, and Pieoneers make sure to use only the top performing and current tools and technologies. This way each client gets the best possible solution available at the time. It is one of the team’s key values: never be content with your current toolbox and stay up-to-date with emerging technologies.

andrew-manshin-blog

One of the core principles for me is to avoid cutting corners. Almost always there is a way to reach the goal without compromising overall software scalability and performance. What you need is an ample mix of tools and the pioneering spirit.

Andrew Manshin, Chief Technical Officer

You can learn more about the technology we use by reading our blog.

Contact Usor Book an Appointment

Find out more about partnering with Pieoneers on your next project.

Mika Martin

Mika Martin

Digital Marketing Specialist