Hi,
This is a genuine question. I am not trolling.
I am currently having to re-implement a svelte v4 SPA into a Tauri app with Sveltekit.
In the SPA I made calls to a locally running web server to get the data. I did this on mainly application load or in some cases on a component load.
However because I am having to use Sveltekit now I am forced to use routing which will mean more fine grained data loading.
My initial assumption was that I would handle all database stuff in rust, loading the data on application load and holding it in memory so that when it is needed I have access to it without having to make a DB call for every route. This means I need to add logic not just to handle the CRUD operations for the DB but also updating the state of the data in the Rust. So I have some additional work there.
Now i see this plugin and I am now asking myself, what are the benefits of the different approaches?
As far as I can tell, using your plugin, will essentially do away with me having to write any rust code to handle database code, right?
However every time I need data I will have to go to the database. Is there much of a performance hit when doing this? A Read from an in-memory will always be faster than a db call.
If there was not much of a performance hit I would more than likely prefer to use your plugin.
Would be interested to hear your thoughts, if you have the time.
Thanks in advance.
Hi,
This is a genuine question. I am not trolling.
I am currently having to re-implement a svelte v4 SPA into a Tauri app with Sveltekit.
In the SPA I made calls to a locally running web server to get the data. I did this on mainly application load or in some cases on a component load.
However because I am having to use Sveltekit now I am forced to use routing which will mean more fine grained data loading.
My initial assumption was that I would handle all database stuff in rust, loading the data on application load and holding it in memory so that when it is needed I have access to it without having to make a DB call for every route. This means I need to add logic not just to handle the CRUD operations for the DB but also updating the state of the data in the Rust. So I have some additional work there.
Now i see this plugin and I am now asking myself, what are the benefits of the different approaches?
As far as I can tell, using your plugin, will essentially do away with me having to write any rust code to handle database code, right?
However every time I need data I will have to go to the database. Is there much of a performance hit when doing this? A Read from an in-memory will always be faster than a db call.
If there was not much of a performance hit I would more than likely prefer to use your plugin.
Would be interested to hear your thoughts, if you have the time.
Thanks in advance.