Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Decentralized Blockchain Application

Hi,

I would like to ask the community if there are any reference architectures for setting up a blockchain based decentralised application. So the stack would be something like:

React Front End

Golang Back End

PostgreSQL database

Ethereum Blockchain Nodes

If we can integrate Google's blockchain node engine that would be great.

Any help appreciated.

Thanks

Dude

1 2 686
2 REPLIES 2

Hi @DudeEV,

Welcome to the Google Cloud Community!

First, for your smart contracts, you indicated that you want to utilize Blockchain Node Engine, so I assume you want to deploy them to an Ethereum Virtual Machine (EVM). To accomplish this, you may want to consider using a third-party development framework called Truffle. Truffle enables you to develop, test, and deploy your smart contracts efficiently [1]. You can explore the full range of services offered by Truffle in this documentation.

To set up your front-end, you can leverage Google App Engine. App Engine is a fully managed, serverless platform designed for building and hosting web applications at scale. However, please note that the officially supported languages for App Engine are Go, PHP, Java, Python, Node.js, Ruby, and .NET. If you plan to use React, you may need to follow additional steps. You can follow this guide for creating a front-end page that communicates with MetaMask. (Note: I am not affiliated with the Scrappy Squirrels project).

For your backend, you have a couple of options. You can integrate it with App Engine along with your front end. However, if your application is complex and requires high reliability, I highly recommend considering Google Kubernetes Engine (GKE). GKE provides a scalable and managed environment for deploying containerized applications, making it an excellent choice for hosting both the front end and back end components [2].

As for your database needs, you can make use of Google Cloud SQL. You can follow this documentation to create a Cloud SQL for PostgreSQL instance. It's worth noting that Cloud SQL is a centralized database solution. The debate about whether to use a centralized or decentralized database in blockchain applications is ongoing. You can find a discussion on this Stack Overflow thread.

If you prefer a decentralized approach for your database, keep in mind that uploading data directly to the Ethereum blockchain can be costly and slow. You might want to explore alternative decentralized storage solutions like IPFS (InterPlanetary File System) for storing large volumes of data in a distributed manner.

This is a high-level overview of how you can create your decentralized application (dApp) using Google Cloud services. Keep in mind that the specific architecture and tools you choose may vary depending on your use case. Whether you're building a decentralized exchange (e.g., Uniswap, 1inch), blockchain analytics platform (e.g., Nansen, Debank), NFT marketplace (e.g., OpenSea, Blur), or any other dApp, these guidelines can be adapted to suit your project's requirements.

Please let me know if that was helpful. Thank you!

[1]. https://trufflesuite.com/docs/truffle/
[2]. https://cloud.google.com/kubernetes-engine/docs/concepts/kubernetes-engine-overview

Fetza
New Member

I loved this idea for using a blockchain backed severless architecture 🙂 

https://cloudyjudgements.com/2024/03/14/blockchain-backed-serverless-architecture/

Top Labels in this Space
Top Solution Authors