Closed mitchmindtree closed 5 months ago
The lock pattern is something that we will likely use in other crates. Maybe we should move it to essential base. I'd really like to have it available especially when writing the node because otherwise people get tempted to use naked mutex with async code which is something I've spent enough of my life debugging to avoid at all costs. We could do this in a follow up pr but I prefer the utils crate was left here as a reminder to do that.
We could make a little dedicated lock-sync
crate in its own repo and publish it to crates.io? Then we could share it between server and node repos for example. Can't imagine it would need much maintenance.
My only beef with utils
crates is that they tend to become a bit of a dumping ground for stuff, and can be a bit ambiguous when exposed publicly. But I'll replace it for now and open an issue.
Is there any reason to not put it in the essential base repo? It's pretty similar to the hash or crypto crates
Yeah true that sounds fine
Closes #67.
This addresses a few small inconsistencies in naming:
server/
->rest-server/
(essential-rest-server
)essential/
->server/
(essential-server
)memory-storage
->essential-memory-storage
rqlite-storage
->essential-rqlite-storage
transaction-storage
->essential-transaction-storage
test_utils
->test-utils
, addpublish = false
essential-server
docsAlso adds some small crate root docs to
essential-server
to clarify that its purpose is to act as a library, and refers toessential-rest-server
for an executable implementation.Removed
utils
crateI considered doing
utils
->essential-utils
, but noticed that the only thing left was the thinLock
wrapper, and as it's only used inmemory-storage
I moved it into a module there. Let me know if you'd prefer to keep autils
crate around and I can re-add it.Edit: since re-added - see here.
Besides these, no other changes beyond automated re-ordering of imports were made, despite github struggling to show the diffs properly. I think the server name changes are messing it up a little.