My product is being developed in Flutter as frontend and backend restful APIs are being developed in Golang and as we are working from different locations, the test app's backend is hosted now in Google Cloud run.
is appwrite capable of replacing Google cloud run for backend hosting?
As my app is astrology based, for every endpoint it has to refer Swiss ephemeris files stored in a sub-directory of project folder and included in docker. Appwrite functions seems to be limited in terms of having a common server path to store ephemeris files. Though Swiss ephemeris files can be stored in appwrite storage, it seemed every function has to download them from storage during every call. Hence I felt good cloud run will more apt.
But the announcement today in twitter seems to have more Golang support. Does it cover my requirements of hosting restful APIs in appwrite?
- Golang support refers to the runtime that can be used for functions meaning you can use Golang to write your functions.
- If the source aren't too big, they could be bundled in the function. Make sure that deployment build size count towards your Plan's storage limits.
@Meldiron would be able to give more insights.
swiss ephemeris files bundle may take around 40 mb to 200 mb of space depending on the nature of the function. It will be not practical to bundle them into each function (API) as there will be 100s of functions in an astrology app. is there a better way to do it so that these swiss ephemeris files will reside on a common directory and that path can be set inside the function itself in similar way it is implemented in a managed compute platform like Google Cloud run?
var (
swisspath = "/eph"
)
func init() {
swephgo.SetEphePath([]byte(swisspath))
}
The easy solution is to use embed library to bundle files alongside your Go binary during compilation.
Alternatively, during the build you can run bash script (or Go script) that moves necessary files into /usr/local/build
. All files in this directory are part of the build.
During execution, you can then find those files in /usr/local/server/src/function
.
Appwrite was built to work great along with your existing tech stack. If you are familiar with S3 storage, you can easily hook those into your function and load them during cold-start, or just-in-time when they are needed.
Thanks. Let me play around.
I have installed appwrite in a self hosted environment @ Akamai to play around it with Golang Functions.
Even after adding "go-1.23" as a Function runtime in .env file, it is not showing up in the dashboard.
Looks like it still has appwrite version 1.5.10.
FYI.
1.6.x is yet to be made available for self-hosted. so need to wait.
oh.. ok. Thanks for the information. Any ETA?
It will be soon as cloud is now in 1.6. Final touches being mad hehehe π
Hehe, so strange we u to test new version first as self-hosting, before cloud
Well, the difference is that cloud uses a different migration procedure (the migration script you need to run after installing the new version). The one in self-hosting usually fails due to several reasons such as cache, etc
Uh-huh
Recommended threads
- apple exchange code to token
hello guys, im new here π I have created a project and enabled apple oauth, filled all data (client id, key id, p8 file itself etc). I generate oauth code form...
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...
- Project in AppWrite Cloud doesn't allow ...
I have a collection where the data can't be opened. When I check the functions, there are three instances of a function still running that can't be deleted. The...