DEV Community

Cover image for How HelloMoon powers realtime gaming
Cloakd
Cloakd

Posted on

How HelloMoon powers realtime gaming

Introduction

HelloMoon delivers a powerful RPC over API service designed for the Solana blockchain, complete with Webhook and Websocket data streams that provide real-time updates on accounts and transactions.

AlphaBatem Labs is an innovative metaverse infrastructure company dedicated to shaping the future of digital experiences. As a pioneer in metaverse technology, AlphaBatem Labs specialises in crafting the building blocks that power immersive, interactive, and interconnected virtual worlds.

Problem

GetProgramAccounts calls can be costly over RPC has no facility to allow for pagination without multiple calls, meaning it can often be misused or returns too much/little data. While it is a handy RPC call, it often leads to performance bottlenecks when retrieving large datasets.

Solution

HelloMoon account update data streams! By streaming account or transaction updates directly to our API, we can maintain a real-time account representation for all users on our platform!

How It Works

The API, built on a simple golang application, consumes the data stream and caches it for other API workers to access.

Benefits

  • Eliminates the need for users to call GetProgramAccounts via RPC on the front end
  • Sends only necessary data to users, ensuring it's always up to date
  • Replaces numerous GetMultipleAccount calls with bulk API calls, reducing the overall load on RPC through call deduplication
  • Both ingress & egress can be scaled linearly based on requirements

Image description

Advantages

  • No need to run & maintain geyser RPC services
  • No need to use RPC at all if you don't want
  • Way faster to get up and running querying data rather than messing with web3 dependencies
  • Provides support to languages other than Rust/Js, as you don't need to mess with IDLs.
  • Drop-in replacement for most RPC calls.
  • More manageable in terms of scaling traffic

Potential Drawbacks

  • Data stream is slower than Geyser and direct RPC
  • Limited analytics capabilities (although HelloMoon recently added an analytics panel for more detailed breakdowns)
  • Signing wallets still requires tackling web3 dependencies
  • Adds some centralization by relying on a single entity for RPC data
  • Potentially introduces more complexity than simply using RPC on the frontend

Conclusion

HelloMoon is a valuable tool for developers seeking to onboard onto the Solana ecosystem more efficiently. Offering familiar integration interfaces and eliminating reliance on RPC simplifies the process and enables developers to focus on building their applications. Although HelloMoon may not be a silver bullet, particularly in terms of speed, its advantages far outweigh its limitations. HelloMoon is an exceptional addition to the Solana ecosystem, empowering developers to create innovative and robust applications easily.

Top comments (0)