hakuban 0.7.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -18
- package/hakuban-with-wasm.js +806 -1329
- package/hakuban-with-wasm.js.map +1 -1
- package/hakuban-with-wasm.min.js +1 -1
- package/hakuban-with-wasm.min.js.map +1 -1
- package/hakuban.js +804 -1322
- package/hakuban.js.map +1 -1
- package/hakuban.min.js +1 -1
- package/hakuban.min.js.map +1 -1
- package/hakuban.wasm +0 -0
- package/package.json +5 -6
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Convenient data-object sharing library.
|
|
4
4
|
|
|
5
|
-
Are you tired of handling all the little details of propagating object states?
|
|
6
|
-
Computing differences, serialization, network propagation (timeouts, keep-alives, ...), somehow catching-up on reconnection,
|
|
7
|
-
load balancing object production, event delivery, object lifetime control etc. **Hakuban does all of that for you.**
|
|
5
|
+
Are you tired of handling all the little details of propagating object states?
|
|
6
|
+
Computing differences, serialization, network propagation (timeouts, keep-alives, ...), somehow catching-up on reconnection,
|
|
7
|
+
load balancing object production, event delivery, object lifetime control etc. **Hakuban does all of that for you.**
|
|
8
8
|
|
|
9
9
|
For details on structs, modules, cargo feature flags, event handling, etc. head on to [documentation](https://docs.rs/hakuban/).
|
|
10
10
|
|
|
@@ -29,9 +29,10 @@ It's **not** meant for and **won't** do: message passing, remote function calls,
|
|
|
29
29
|
|
|
30
30
|
## Usage example
|
|
31
31
|
```rust
|
|
32
|
-
let exchange =
|
|
33
|
-
|
|
34
|
-
let mut
|
|
32
|
+
let exchange = Exchange::new();
|
|
33
|
+
|
|
34
|
+
let mut observe_contract = exchange.object_observe_contract((["some-tag"],"xxx")).build();
|
|
35
|
+
let mut expose_contract = exchange.object_expose_contract((["some-tag"],"xxx")).build();
|
|
35
36
|
|
|
36
37
|
tokio::spawn(async move {
|
|
37
38
|
//ExposeContract emits ObjectStateSink when first observer appears
|
|
@@ -41,7 +42,7 @@ tokio::spawn(async move {
|
|
|
41
42
|
});
|
|
42
43
|
|
|
43
44
|
tokio::spawn(async move {
|
|
44
|
-
//ObserveContract emits ObjectStateStream
|
|
45
|
+
//ObserveContract emits ObjectStateStream
|
|
45
46
|
let mut object_state_stream = observe_contract.next().await.unwrap();
|
|
46
47
|
let object_state = object_state_stream.next().await.unwrap().json_deserialize::<String>();
|
|
47
48
|
println!("{:?}", object_state.data);
|
|
@@ -60,11 +61,11 @@ Hakuban ruby ffi binding.
|
|
|
60
61
|
|
|
61
62
|
Hakuban compiled to wasm, with JS interface to use in browser.
|
|
62
63
|
|
|
63
|
-
### Hakuban webapp
|
|
64
|
+
### Hakuban webapp state manager
|
|
64
65
|
`(TODO: add url)`
|
|
65
66
|
|
|
66
|
-
Webapp
|
|
67
|
-
* Every link
|
|
67
|
+
Webapp state manager, with:
|
|
68
|
+
* Every link being open-in-new-tab compatible, and copy-link compatible
|
|
68
69
|
* Short urls, optionally exposing selected state variables
|
|
69
70
|
* All urls (== application states) are shareable
|
|
70
71
|
* State can be bigger than what fits in a url (as long as it's built progresively)
|
|
@@ -82,13 +83,12 @@ Commercial (aka. shameless plug) robotic ui-testing platform.
|
|
|
82
83
|
|
|
83
84
|
## Roadmap
|
|
84
85
|
Not ordered by priority:
|
|
86
|
+
- actor-ish api. allowing registration of object-producing lambdas, to be instantiated on demand in separate tasks.
|
|
87
|
+
- object signing, and access tokens
|
|
85
88
|
- preloading/side loading
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
-
|
|
89
|
-
- expose introspection/statistics objects
|
|
90
|
-
- more efficient and simpler network protocol
|
|
91
|
-
|
|
89
|
+
- immunity to broken/malicious diffs
|
|
90
|
+
- expose more introspection/statistics objects
|
|
91
|
+
- lazy serialize/deserialize
|
|
92
92
|
## License
|
|
93
93
|
|
|
94
94
|
Distributed under the MIT License. See `LICENSE` for more information.
|
|
@@ -109,9 +109,8 @@ The list does not contain change- or message- focused projects, nor projects wit
|
|
|
109
109
|
* [Fluvio](https://www.fluvio.io/)
|
|
110
110
|
* [deepstream](https://deepstream.io/)
|
|
111
111
|
* [nhost](https://nhost.io/)
|
|
112
|
-
* [zenoh](https://zenoh.io/)
|
|
112
|
+
* [zenoh](https://zenoh.io/)
|
|
113
113
|
* just diffing, if you don't need the network and lifetime control parts:
|
|
114
114
|
* [serde-diff](https://github.com/amethyst/serde-diff)
|
|
115
115
|
* [dipa](https://github.com/chinedufn/dipa)
|
|
116
116
|
* [deltoid](https://github.com/jjpe/deltoid)
|
|
117
|
-
|