Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I already have a new version "zenbase-2.1.8_2-beta-plus" with browser OK and nodejs OK! #6

Open
parajbs opened this issue Apr 20, 2022 · 2 comments

Comments

@parajbs
Copy link

parajbs commented Apr 20, 2022

Hello Fluffy9,

Yesterday I installed "SkynetLabs/gundb-relay(branch "skynet-nodejs")" on my dev server and fixed errors while doing so
I have now created a super working new version of "zenbase-2.1.8_2-beta-plus" that works both in the browser and in nodejs!
But I think there is still a problem with the gun in the relay!

I haven't published the version "zenbase-2.1.8_2-beta-plus" on github yet because I also use "SkynetLabs/nodejs-skynet" and there in the "src/client.js" the line:

  getJSON: browserClient.db.getJSON.bind(browserClient),

added so that "getJSON" also works in nodejs!
I'm still waiting for the line to be included in the original repo!
Although I also have a version that works without the correction of "SkynetLabs/nodejs-skynet", but the version is extremely big, and double functions for browser and nodejs!

"SkynetLabs/nodejs-skynet" without correction:
// SkyDB
this.db = {
setDataLink: browserClient.db.setDataLink.bind(browserClient),
};

"SkynetLabs/nodejs-skynet" with correction:
// SkyDB
this.db = {
setDataLink: browserClient.db.setDataLink.bind(browserClient),
getJSON: browserClient.db.getJSON.bind(browserClient),
};

If you want to help with the problems then I'll try to upload both versions of my dev server to my githab repo today or tomorrow!

You can contact the developers of "SkynetLabs/nodejs-skynet" to include this line:
getJSON: browserClient.db.getJSON.bind(browserClient),
see above!!!
"db.getJSON" can then also be used in the nodejs version!
Danger! IMPORTANT! "setJSON" is not meant because this doesn't work, only "getJSON"! This is why "getJSON" is compatible with skydb data!

  • How about a cool WebUI?
  • And as an option encryption and decryption of the data by Gun or by skynet (there is no such thing for skydb at the moment!) or
    other secure encryption!
  • Or user DB, via skynet-mysky or Gun SEC?
@Fluffy9
Copy link
Owner

Fluffy9 commented Apr 22, 2022

Hey, I read this twice and I'm still not sure if I understand.

  • While I helped create the SkynetLabs/gundb-relay + SkynetLabs/gundb-adapter project, I think they've made some changes to it. I don't really know what's going on with it anymore or any errors
  • Are your other bullet points suggestions for Zenbase?

@parajbs
Copy link
Author

parajbs commented Apr 23, 2022

Hello Fluffy9,

Sorry, but I can not do that deutsch and it must always be about Google, translated, that's why the text problems or understanding!

On your GitHub Repo "Fluffy9 / ZenBase", is in your "Readme.md"
Under section "About ZenBase" this text (Cross Platform. IT Runs on Browsers, Mobile Devices. (Servers Coming Soon!))!
For the server version (NODEJS), the functions "client.db.setJSON and client.db.getJSON" must be rewritten because they do not work in nodejs!
Therefore, "M-Cut" has solved these differently in the NodeJS version (not with setJSON and not getJSON)!

Yes, M-Cut has created this version branch "Skynet-Nodejs" by (skynetLabs / gundb-relay)!

In my version (parajbs/gundb-relay), I have made further corrections for the NODEJS version to your web browser version and also to skydb from Skynet compatible!

Have even created a version where both versions work together in a version!

###########

But now to your version !!!
I created a test center page so that I can show you the error of your version!

Info:
Test-1 is your version 2.1.7:
Here is the setJSON defect in store.put!

Test-2 is your version 2.1.7 + my correction!
Here I have repaired setJSON in store.put!

Test-1
Link-1:

https://jsfiddle.net/mzhlb4dk/1/

Test-1 instructions important!:

  1. Please open Link-1, and it appears "JSFIDDLE.NET" with testcenter-page!

  2. Now open the browser-console of your browser because the mistakes there are better to see!

  3. Configure the testcenter and save in the localStorage of the browser! Only the settings are saved in the localStorage!

  4. Next in the testcenter in the "gun.put"-area, enter value and press the PUT-button!
    Now you see a mistake in the browser-console:
    For exact error words in the browser-console!
    And the GET-area has disappeared (is wanted in the testcenter!)!

  5. You now have to perform "RUN" in "jsfiddle.net" so that the page is invited again, and the "gun.get"-area reappears!
    Just just "Get Value"-button! No data will not be displayed to your version, as there is an error in step4!
    Very important! Do not use the PUT-button before!

Important information: If you run both commands together in a test step, then the data of "gun.put()" is stored in the in-memory (graph) of Gundb and the "gun.get()" will be the data only from the In-Memory (Graph), the "store.put" Error still comes in your version and thus no data has been uploaded to Skynet!

##########

Test-2:
Link-2:

https://jsfiddle.net/mzhlb4dk/2/

For Test 2 Instructions:

  1. Please open Link-2, and "JSFIDDLE.NET" will appear again with testcenter page, but my version!

  2. Now open the browser-console of your browser because the mistakes there are better to see!

  3. Configure the testcenter and save in the localStorage of the browser! Only the settings are saved in the localStorage!

  4. Next in the testcenter in the "gun.put"-area, enter value and press the PUT button!
    Now you will see in the browser-console! There are no mistakes!
    The data was loaded on SkyNet! All ok!
    And the get-area has disappeared again (is so wanted in the testcenter!)!

  5. You now have to perform "RUN" in "jsfiddle.net" so that the page is invited again, and the "gun.get"-area reappears!
    Just just "Get Value"-button!
    Cool the data is displayed!
    Everything worked!
    Very important! Again, do not previously use the PUT-button!

I hope my testcenter-page could glare to the problem!

If you still haven't understood it, then you just have to compare your version with my cornered version, then you will find the difference!
If everything worked, and you have an interest in my latest version, contact me and I'll shake you the links!

Have fun with my test center!
parajbs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants