-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/move to fastify #3618
Feature/move to fastify #3618
Conversation
ced6b4e
to
7ff59cb
Compare
dbcf2b9
to
aeac7d2
Compare
4b29971
to
136410a
Compare
539f479
to
ac07103
Compare
5ba49f6
to
84bbfd2
Compare
@mattsmithies As discussed in today's Tech Meet, wanted to loop you in this discussion. |
1af0ca0
to
f3e9516
Compare
0914904
to
932fb69
Compare
932fb69
to
b5589d6
Compare
Hello @mattsmithies I heard that you would like us to prioritize database optimizations over fastify. |
b5589d6
to
4139242
Compare
4139242
to
02a77e3
Compare
Hey @ihar-tsykala, thank you for bringing me into this thread. I appreciate your efforts in understanding my perspective on these developments. While I recognize the potential benefits of integrating the Fastify framework for improving performance, I remain a little skeptical about its impact on the current needs of the community. Typically, optimizations like these are most beneficial for systems handling millions of transactions, aiming to scale significantly. Nonetheless, the ultimate goal is to prepare Guardian for such scalability. Regarding the prioritization of a robust caching process at this stage, I understand that it presents a quick win. However, considering the relatively low throughput our Guardian systems currently experience, optimizing database interactions might not be the most immediate bottleneck. It's noteworthy that cache invalidation, as referenced in #3641, remains a challenge due to the stateful nature of the API. I want to provide some context on my recent work with Guardian, which I've been closely involved with since its alpha phase nearly three years ago. We are now developing our third bespoke API client specifically tailored for Guardian's unique needs. This week, I plan to create extensive documentation addressing these challenges. The complexity required for effective use of the Guardian API is substantial and often not fully appreciated. This is going to be combined with a new client that focuses on a partial "Dryrun SDK" with an end-to-end testcase, I'm going to do my best to highlight particular areas that should be optimised for an API consumption point of view. A core focus of mine has been minimizing the data transmitted over the network—essentially optimizing API scalability by adhering as closely as possible to REST principles. The ideal is for the API to handle operations on a single asset or a million with equal efficiency, avoiding N+1 query issues that can degrade performance gradually. For instance, last year’s integration of ELV credits revealed significant scalability issues; as the system scaled, data handling became increasingly inefficient due to N+1 problems with each new asset or verification approval -- this slowed the system to a halt. To combat this, we've shifted towards more RESTful practices by using filter blocks. Although this isn't a perfect solution and current invalidation challenges for filter blocks still lead to N+1 issues, it's a step in the right direction. I am more than willing to join any calls to discuss these points further. My stance is simple: focus on getting the foundational aspects right to ensure the API's functionality and scalability. I'm looking forward to potentially testing this with hundreds of thousands of users representing millions of assets in a simulated environment, and eventually on mainnet, considering it offers more bandwidth than the testnet. Internally at DOVU we are committed to building middleware systems that will alleviate a lot of this requirement on the Guardian team itself, so tools that are specifically for teams and developers like ourselves, who want to primarily focus on API usage. |
Description:
Moved api-gateway on nest + fastify platform
Related issue(s):
Checklist