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

standardize API Entry or Element #403

Closed
dehann opened this issue Apr 25, 2020 · 15 comments · Fixed by #519
Closed

standardize API Entry or Element #403

dehann opened this issue Apr 25, 2020 · 15 comments · Fixed by #519
Labels
API data: entry=>blob Previously bigdata, suggested over `smalldata` decision standardization vote
Milestone

Comments

@dehann
Copy link
Member

dehann commented Apr 25, 2020

also see #401

@dehann dehann added this to the v0.7.x milestone Apr 25, 2020
@Affie
Copy link
Member

Affie commented Apr 25, 2020

My intention with entry was to differentiate between just adding the ‘pointer’ to the data and the complete data record.

@dehann
Copy link
Member Author

dehann commented Apr 26, 2020

HI @Affie , okay thanks -- could you perhaps update the Nouns in the wiki please, not sure I follow 100% but we can use your lead as a starting point for the Nouns?

Maybe we can just add a clear example here of when to use Entry and when to use Element ...

DF Guessing

Writing this without being sure:

Example 1

I have a new piece of data I want to store, should I call addDataEntry or addDataElement?

Example 2

I know there is a piece of data and trying to just get a copy and don't care exactly how it is retrieved -- getDataEntry or getDataElement

Example 3

I'm trying to discover what data is available stores, should I be searching with the listDataElements or listDataEntries.

@dehann dehann mentioned this issue Apr 26, 2020
5 tasks
@Affie
Copy link
Member

Affie commented Apr 26, 2020

Ok, will take a look.
Why not just addBigData! for the wrapper version?

@dehann dehann modified the milestones: v0.7.x, v0.7.6 Apr 27, 2020
@dehann
Copy link
Member Author

dehann commented Apr 27, 2020

Jip, that is what I did, see #405 -- and dont mind the error being fixed in #410 .

Although we still need to resolve Entry or Element for general use beyond the convenience wrapper.

@dehann
Copy link
Member Author

dehann commented May 2, 2020

Why not just addBigData! for the wrapper version?

Oh, should be more specific -- did we not decide against the wording "BigData" and opted for "Data" and and "Smalldata" Nouns instead?

Question here remains though, Element or Entry -- or at least what's the difference?

EDIT: PS, later we can reduce to addData! once we have firm footing on Entry vs Element vs Record.

@dehann dehann modified the milestones: v0.7.6, v0.8.x May 2, 2020
@dehann
Copy link
Member Author

dehann commented May 2, 2020

So Entry is the "description" of a "Data Element". The Element itself (the big blob of bytes) is kept in the DataStore. The Entry description is kept in the DFG object (only a small object)?

@dehann dehann modified the milestones: v0.8.x, v0.7.6 May 2, 2020
@dehann
Copy link
Member Author

dehann commented May 2, 2020

If so, then lines like these should be cleaned up:

element = GeneralBigDataEntry(dfg, node, descr, mimeType=mimeType)

@Affie
Copy link
Member

Affie commented May 2, 2020

It seems confusing and I don't really understand your question.

Why don't we name it Key and Record?
Or whatever the generic standard is for databases.

@dehann
Copy link
Member Author

dehann commented May 2, 2020

It seems confusing and I don't really understand your question.

I had hard time figuring out the difference between Entry and Element and seems the code is bit muddled. My current understanding is that Entry is our own format to hold the DB key, description/label, mimeType etc:

mutable struct GeneralBigDataEntry <: AbstractBigDataEntry
key::Symbol
storeKey::Symbol # Could swap this to string, but using it as an index later, so better as a symbol I believe.
createdTimestamp::DateTime
lastUpdatedTimestamp::DateTime
mimeType::String
end

<<<PS, DataEntry or DataEntryGeneral might be closer to the verbNoun naming convention -- we can sort that one out later.>>>

Why don't we name it Key and Record?

I think Key does not envelop enough, since that would only be a unique identifier. But these are related since we already have entry.key see above.

The question of Element vs "Record" is bit less clear cut. Unfortunately "Record" and Entry sound very much the same too. Currently it seems the code has Element playing role of a "Record".

My suggestion is we leave "Key" and "Record" as names used by the database technology used, in much the same way we have kept the name Vertex (perhaps Node) as name associated with the graphing technology underneath.

Lets hear if @GearsAD has an opinion on naming convention.

My suggestion for the short to medium term remains: #403 (comment)

@dehann
Copy link
Member Author

dehann commented May 2, 2020

add added aliases for addData! and fetchData as was suggested above.

@dehann dehann modified the milestones: v0.7.6, v0.8.x May 2, 2020
@Affie
Copy link
Member

Affie commented May 4, 2020

Works for me, when I came up with the Entry thing I just named it the first word that came to mind, but I wanted a distinction from the then used Element. I don't really mind what its called and think Sam will know best as you suggest. As long as the functionality is there to add the "key" separately to the graph.

@dehann
Copy link
Member Author

dehann commented May 30, 2020

Sounds good, think we are on the same page -- thanks for adding the Entry and Element, it will find its rhythm soon enough. In an attempt to avoid confusion, how about one Noun from Entry/Element/Record (which seems quite similar to me), and then pick either Data/Blob as a replacement for what is currently called Element? I'm just thinking out loud -- this is likely a DFG v0.9.0 thing.

@dehann dehann modified the milestones: v0.8.x, v0.9.0 May 30, 2020
@dehann dehann added the data: entry=>blob Previously bigdata, suggested over `smalldata` label May 30, 2020
@Affie
Copy link
Member

Affie commented May 31, 2020

From them I like entry and blob
So then

  • a dataEntry refers to the key+
  • a dataBlob refers to the value that will be at some key+

So something like addDataBlob(dfg, label, entry=>blob)

getDataBlobs(dfg, label)

@GearsAD
Copy link
Collaborator

GearsAD commented Jun 8, 2020

Yes, entry is what is saved in database (it's the details about the data) and element is the actual data itself (part that's saved on disk/etc.). I understand there's a bit of confusion about this because the terms are so similar. entry and blob are good.

@dehann
Copy link
Member Author

dehann commented Jun 17, 2020

entry=>blob sounds great. It's a 3-0 vote, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API data: entry=>blob Previously bigdata, suggested over `smalldata` decision standardization vote
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants