Jump to content
chibiusa Ling

Creating my own notes "app"

Recommended Posts

So, at present I use Notes on my MacBook to store all of my project data, information, to do list etc etc of things I am working on in world. However, whilst switching back and forth between two apps isn't what I would call an issue I am going to create a hud version of Notes so that the information is more readily accessible to me while I am working on a project and "in the zone". 

Now, my question isn't "how to do this" because I already have that part sorted. My question is regarding note storage. I am going to make it so that it has Project titles, folders that are contained inside of this and then notes that are contained in those folders. All displayed using XYZ. So a three tier structure. I can't decide between lists or JSON to store the note data. I do plan on eventually storing the notes on my web server before anyone mentions that, this is more regarding storage inside of the script in world. What do you think....lists or JSON. I personally think JSON might be good as it allows multi tiered structures but then again so would a strided list. Figured I would bring this to the forum to see what suggestions you all had.

What do you guys think?

Share this post


Link to post
Share on other sites

When you KNOW the order of your data and can guarantee that the "three strides" are never broken, there is no real benefit between a list and JSON. If you think you're going to move to a webserver, JSON might be better as transferring the data becomes subjectively simpler.

Though, in LSL the body of a HTTP request only contains the first 2048 bytes, which could be an issue for long notes. This loosely relates to list vs JSON because if a JSON gets truncated, it's invalid entirely.

Edited by Wulfie Reanimator

Share this post


Link to post
Share on other sites
2 hours ago, Wulfie Reanimator said:

When you KNOW the order of your data and can guarantee that the "three strides" are never broken, there is no real benefit between a list and JSON. If you think you're going to move to a webserver, JSON might be better as transferring the data becomes subjectively simpler.

Though, in LSL the body of a HTTP request only contains the first 2048 bytes, which could be an issue for long notes. This loosely relates to list vs JSON because if a JSON gets truncated, it's invalid entirely.

The order of the data is going to be Project Name -> Project folders -> Project Notes. That order definitely won't be broken although folders and notes will contain multiple entries. One of the reasons I was considering JSON was for server communication but as you said the string has to intact otherwise its invalid which is where I thought perhaps lists might be a better solution. Thought with lists I feel I will have to keep a separate running tally of list indexes to keep track of how many notes are in each project so that each set of folders and notes relate to the correct project name. In this instance I feel JSON would be better as JSON is more geared towards "tree storage", as I will call it, than a LSL strided list. Though I could search a list for a project name and then sort out what comes after into folders and notes but would that be better than JSON....urghhhh.... I think I will have to just experiment with the two and see which I feel comes out on top. I can see advantages and disadvantages to using both methods. 

-Edit (addon) : I guess if I used lists I could do it via a naming scheme. So you have project names and then the folder names start with an abbreviation of the project names and then notes of the folder names. So project name "Project Chibi 1" with folders "PC1 Ideas", "PC1 ToDo" and then the notes "PC1I1", "PC1T1"....or maybe thats over thinking it....

Edited by chibiusa Ling

Share this post


Link to post
Share on other sites
3 hours ago, chibiusa Ling said:

... it has Project titles, folders that are contained inside of this and then notes that are contained in those folders. All displayed using XYZ. So a three tier structure.

Does "XYZ" refer to some display library? (Not the three spatial dimensions, right?) I don't think I'm familiar with it, so I bet I'm not the only one.

Also, "multi-tiered" isn't hinting at nested folders, is it? Just the Project / Folder / Note identity hierarchy (plus the actual note text), right? I mean, nesting is certainly possible regardless of storage representation: the Folder identifier itself can be structured, whether it's represented as JSON, or a strided list, or (as I might do it) part of a separately cataloged key in a KVP alist. 

Anyway, that's all a long-winded aside before asking whether anybody else shares my purely subjective impression that JSON uses scads more overhead for the same data payload. If so, that might be a consideration if it would constrain the amount of note data you can practically keep script-resident, as a share of the whole corpus resident on the web server.

Share this post


Link to post
Share on other sites

[deleted]

Edited by Qie Niangao
[Duplicate post deleted. I guess the forums software was acting up for me, too]

Share this post


Link to post
Share on other sites
18 minutes ago, Qie Niangao said:

Does "XYZ" refer to some display library? (Not the three spatial dimensions, right?) I don't think I'm familiar with it, so I bet I'm not the only one.

Also, "multi-tiered" isn't hinting at nested folders, is it? Just the Project / Folder / Note identity hierarchy (plus the actual note text), right? I mean, nesting is certainly possible regardless of storage representation: the Folder identifier itself can be structured, whether it's represented as JSON, or a strided list, or (as I might do it) part of a separately cataloged key in a KVP alist. 

Anyway, that's all a long-winded aside before asking whether anybody else shares my purely subjective impression that JSON uses scads more overhead for the same data payload. If so, that might be a consideration if it would constrain the amount of note data you can practically keep script-resident, as a share of the whole corpus resident on the web server.

XYZ text. As in text as a texture on a mesh face and yes when I say multi tiered I do mean nesting. As regards JSON if I remember correctly it does use more than a list and the thought has  also occurred to me about note size in relation to script memory. So I think ultimately it will have to be done via my web server and making requests for each projects notes when I want to open them. I have to ask, what do you mean by KPV...I'm not recognising  that abbreviation

---Never mind....Key Pair Value....it just clicked with me as I sat down

Edited by chibiusa Ling

Share this post


Link to post
Share on other sites
15 minutes ago, Qie Niangao said:

Removed as was a duplicate of the above. Forum is acting up for me

Edited by chibiusa Ling

Share this post


Link to post
Share on other sites
2 hours ago, Wulfie Reanimator said:

Though, in LSL the body of a HTTP request only contains the first 2048 bytes, which could be an issue for long notes.

Only by default.  You can increase the length of the string the script will accept for HTTP body using HTTP_BODY_MAXLENGTH (although not by much but every little helps I guess).

  • Thanks 1

Share this post


Link to post
Share on other sites

Oh, XYZ text representation on the screen -- yeah, that makes sense; I was incorrectly imagining just chat text output.

KVP is "Key-Value Pair"... in SL usually describing the Experience persistent store, but really it's an enormous shared association list, conceptually a two-strided list where the first stride is a (potentially complex) key for the value payload stored in the second stride.

  • Like 2

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...