feature: add gelf, a gunified elf for managing pvp hypergraphs from elf world - #1389
feature: add gelf, a gunified elf for managing pvp hypergraphs from elf world#1389tylerchilds wants to merge 6 commits into
Conversation
|
my favorite @tylerchilds ! :) 3 questions / concerns:
|
|
thanks for the time @amark!
More in 2.
https://github.com/tylerchilds/plan98/blob/plan98/client/public/module.js#L81 compared to in this PR, where the this variable can be exposed to be controlled by the intersection of gun+elf/tag as the brain. in my research, different approaches to atomically read,write, and react to data is slightly so different, that it would be more complicated to create a generic interface that I could comfortably call a definitive version of tag. in this fork of gun+elf/tag, I use this to anticipate a seed that can serve as a root node in a gun graph: binding this, which is { seed: 'something'} The contract I expect out of any elf/tag fork is that there's an html tag that can be utilized by hypertext authors. For context, this is a pure braid fork of elf/tag back to innerHTML, if it makes sense in the gun fork to throw a sanitizer around innerHTML, we can do that or we can pull in the vdom library i use in plan98 and we can disable scripts on innerHTML. I can also back this out entirely, I added this to make it easier to interface the lower level internals of the elf/tag data structures with guns as an opinionated fork by both authors.
From my end, it'll be easier to work off this fork as a baseline for that to maintain compatibility with the learn/teach functions to make sure the arrays are backwards compatible with elves that might get ported from their current local state to a more hyper state with gun. |
|
@amark i went ahead and added the array code to this pr |
| } | ||
| k && (to.path || (to.path = [])).push(k); | ||
| if(!(v = valid(d)) && !(g = Gun.is(d))){ | ||
| if(as.array && d instanceof Array) { |
There was a problem hiding this comment.
this file is built from files in src, so you're going to have to add this change in src/put.js too?
|
removed the innerHTML logic on gelf/note.html and added gelf/array-test.html i started updating gelf.js to use the gun.open api instead of JSON.stringify and JSON.parse, but need to investigate further what I might be missing. can push a wip commit with the broken state. |
|
@tylerchilds ahhhh I've been gone in 7 countries in last half year and GitHub not send me notifications. Just saw these updates now, miss you! Still prefer to do a review, let's meet up? |
|
Cool work on adding gelf! I’m new to GUN, but I like the idea of moving away from JSON.stringify/parse toward gun.open. Curious if you think that’ll end up being the main approach once the performance details get sorted out. |
|
@vinceoooy i don't have bandwidth to continue on this, but using gun.open was my preferred way of interacting with gun and I do recommend @amark consider bringing this in-- but i don't have capacity. @vinceoooy if you take it on-- talk with @amark through whichever channel and i can answer any questions on my end if he needs me. https://thelanding.page is a fun example of a blog component "quick-blog" that could get ported to gelf with minimal effort |
This pull request binds a gun to a custom element generator and ports the basic/note.html example into it
The gelf.js file needs performance improvements before it is ready for production use. Currently, it stringifys the graph fragment for the custom element's data table as it goes into and out of the gun.
gelf.js support atomic data operations with the $.teach and can be reflected in gun per field to be the most optimized. In order to support this, gelf will need support for arrays as a primitive data structure.
We will solve the performance issues in the future as the existing is performant enough as gelf is an entity component system that drives towards shallow graph fragments.
Also to be solved in the future is the default router to support returning .js, such as the hello-world.html example that currently fails to resolve hello-world.js