Archive post
NectarEngine 0.1.4: Now with Less Failure
Before today nectarengine relied on a single, hard-coded URL for its API calls, or one you provided
Hey everyone,
Before today `nectarengine` relied on a single, hard-coded URL for its API calls, or one you provided. If that _one_ node was slow, offline, or just having a bad day, everything would time out and crash.

That's a terrible design, I needed to fix it properly.
### NectarEngine 0.1.4: Now with Less Failure
I'm happy to announce the release of **NectarEngine 0.1.4**, which is a major refactor of how the library handles node connections.
Instead of a single RPC instance, I've built a new `_RPCPool` that is much more resilient. Now, when you initialize the `Api`, it creates a pool of candidate nodes. If a call fails, it automatically retries a couple of times and then rotates to the next node in the list. This should make the bot, and any app using the library, far more reliable.
### Smarter Node Discovery
I didn't just want to replace one hard-coded list with another. The library is now much smarter about finding good nodes.
- It automatically pulls the latest, best-ranked nodes from the **PeakD Beacon** (`https://beacon.peakd.com/api/he/nodes`).
- It also uses the `@flowerengine` metadata as a fallback.
- If both of those fail, it falls back to the old hard-coded default.
This new logic also applies to **Hive Engine history nodes**. The library now pulls a list of history nodes from the beacon, and it will retry up to ten times on a failed query before giving up.
### Housekeeping
While I was in there, I did a lot of spring cleaning. I stripped out a ton of old, unused `__future__` import statements and other legacy code. I also expanded the test suite to cover all the new pool rotation and retry logic, ensuring the local `src/` package is properly imported during testing.
The new version is all built, tested, and published to PyPI.

Hopefully, this means you'll be seeing _a lot_ less of that type of error.
As always,
Michael Garcia a.k.a. TheCrazyGM