Open marcocastignoli opened 1 month ago
Could you explain what benefits the second proposal would bring compared to our current setup? Wouldn't just one server also scale well with GCP?
@manuelwedler
Could you explain what benefits the second proposal would bring compared to our current setup? Wouldn't just one server also scale well with GCP?
With our current setup we cannot unbind requests from verifications: a request is pending until the verification process is over. We need some way to separate verification from http requests if we want to support receipts in API v2
We could potentially separate them in the same "sourcify-server" process but then we are not taking advantage of GCP scaling by optimizing on the number of requests:
@kuzdogan
Do we need "granular control on what's in the queue" or "priority systems"?
I cannot think of any real use case of this, other than prioritizing some chains
How do we send "tickets" in the second case?
In the diagram I wrote "Read Status" from sourcify-http-server
to sourcify-database
:
sourcify-http-server
calls sourcify-verification-service
triggering a new verificationsourcify-verification-service
stores a new receipt in the database as "pending" and returns the receipt id to sourcify-http-server
, then starts the verification process, then marks the receipt as completed once donesourcify-http-server
can always read the status reading directly from the database
Context
/v2/verify
response, this will allow to separate HTTP request from the verification status.Solutions
We are exploring two solutions:
sourcify-http-server
andsourcify-verification-service
.sourcify-http-server
will push pending contracts to thequeue-service
andsourcify-verification-service
will read pending contracts fromqueue-service
verifying them and marking them as completed. This solution involves setting up a queue service adding more complexity to our architecture, but we have granular control on what's in the queue, enabling us to potentially implement priority systems.sourcify-http-server
andsourcify-verification-service
will be deployed as Google Cloud Run Services,sourcify-http-server
will receive /verify request from the internet and callsourcify-verification-service
directly without passing through a queue. The verification's status is going to be saved insourcify-database