v0.1.0-dev.4: Custom Apis, Unique Views, WebAssembly
Pre-releaseWelcome to the first release on GitHub. I wanted to take this moment to talk a little bit about the development of this project.
I've added a CHANGELOG.md. I may not do much to highlight breaking changes this early on in development, but once we have a 0.1.0 release, I'll start tracking breaking changes. At this point, PliantDb
is purely experimental, and while I applaud anyone attempting to use it, using it this early will likely break as I continue to develop the API.
For the near future, I want the flexibility to change drastic things without worrying about how it impacts existing user's code. Until we have a successful decent-sized project using PliantDb
, I think it's impossible to be confident everything is designed well.
Lastly, I wanted to mention that this year seems to just fly by. I hadn't realized it was April 26 when the last release happened. I have a goal to get a new version of Cosmic Verge running on PliantDb
, but we are ambitious. In the process, we are redoing our presentation layer. As such, it may have looked like I lost interest in this project and moved on.
Fear not, this project is near and dear to my heart, which is why the first product of the Gooey
project is this example which shows how to build a simple Gooey
app and PliantDb
server with a basic custom API. Because of the new support for WebAssembly, the example even works in a modern browser.
If you have any questions or feedback, feel free to join the discussion on our Discourse forums.
From the CHANGELOG
Added
-
View::unique()
has been added, allowing for aView
to restrict saving documents when multiple documents would end up with the same key emitted for this view. For example, if you have aUser
collection and want to ensure eachUser
has a uniqueemail_address
, you could create aView
with the key ofemail_address
and return true fromunique()
, andPliantDb
will enforce that constraint. -
Permissions support has been added across the platform with granular access. The
pliantdb::core::permissions
module contains the data types involved. More documentation and examples are to-come -- users and roles haven't been added yet. -
The initial underpinnings of customizing the
PliantDb
server have been added. First, there's theBackend
trait. Right now, its only purpose is to allow defining aCustomApi
. This allows applications built withPliantDb
to extend the network protocol withRequest
andResponse
types that just need to supportserde
. For a full example, check out this in-developmentGooey
example. -
An initial version of a WebAssembly client is now supported. It only supports WebSockets. While there has been news of
QUIC
support in the browser, it's a limited implementation that only exposes an HTTP protocol. As such, it is incompatible with thePliantDb
protocol. Eventually, we hope to supportWebRTC
as an alternative to TCP in WebAssembly. The example linked in the previous bullet point can be built and loaded in a browser.