This week has seen a couple of bug fix releases to Holster, the first was just dealing with connection issues to websockets and also indexedDB in the browser. Holster will now wait for both to be ready and will retry any requests. I previously had some waits in application code to deal with this, but it feels better for Holster to handle it. Now you can just make requests without worrying if the browser is ready.
The second fix was more serious because I noticed I had some missing data in my application using Holster. I tracked it down to how files are split on disk once they reach the configured size limit. I had issues with this in the beginning but didn't look at the existing radisk code too closely. This time I went through the whole flow and found better ways to handle splits, so time to throw lots of data at it again and see how it holds up!
Holster 1.0.2
Another small bug fix release, this one was more of a problem in application code using Holster, but investigating what went wrong there led to some improvements.
The app I'm working on requires a server account and if one doesn't exist when it starts it would create one in Holster. The problem is the user lookup timeout was too short, so it created a second account! This was not helpful since it provides a public key to the browser to look up account information... and now it's split across multiple accounts which isn't going to work.
The answer was to remove the account creation code from the app entirely. This meant I needed a new way to set up the server account in the first place, which led to a nice use of the Node REPL to configure it manually:
// Or switch to "@mblaney/holster/src/holster.js" in your own project.
const {default: Holster} = await import("./src/holster.js")
const holster = Holster()
const user = holster.user()
I've left out the actual commands, but from there you can use holster and user to query the API. Besides fixing my problem it also provides a nice way to interact with your data from the command line.
Holster updates
The second fix was more serious because I noticed I had some missing data in my application using Holster. I tracked it down to how files are split on disk once they reach the configured size limit. I had issues with this in the beginning but didn't look at the existing radisk code too closely. This time I went through the whole flow and found better ways to handle splits, so time to throw lots of data at it again and see how it holds up!
Holster 1.0.2
The app I'm working on requires a server account and if one doesn't exist when it starts it would create one in Holster. The problem is the user lookup timeout was too short, so it created a second account! This was not helpful since it provides a public key to the browser to look up account information... and now it's split across multiple accounts which isn't going to work.
The answer was to remove the account creation code from the app entirely. This meant I needed a new way to set up the server account in the first place, which led to a nice use of the Node REPL to configure it manually:
// Or switch to "@mblaney/holster/src/holster.js" in your own project. const {default: Holster} = await import("./src/holster.js") const holster = Holster() const user = holster.user()I've left out the actual commands, but from there you can use
holsteranduserto query the API. Besides fixing my problem it also provides a nice way to interact with your data from the command line.