Skip to content

Conversation

Affie
Copy link
Member

@Affie Affie commented Oct 2, 2019

Big data added to DFGVariable

@codecov-io
Copy link

codecov-io commented Oct 2, 2019

Codecov Report

Merging #131 into master will increase coverage by 0.56%.
The diff coverage is 95.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #131      +/-   ##
==========================================
+ Coverage   49.97%   50.53%   +0.56%     
==========================================
  Files          28       29       +1     
  Lines        1763     1783      +20     
==========================================
+ Hits          881      901      +20     
  Misses        882      882
Impacted Files Coverage Δ
src/DistributedFactorGraphs.jl 100% <ø> (ø) ⬆️
src/entities/AbstractDFG.jl 100% <ø> (ø) ⬆️
src/BigData.jl 100% <100%> (ø)
src/entities/DFGVariable.jl 75% <50%> (+0.92%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 35db02e...a8f078d. Read the comment docs.

@Affie
Copy link
Member Author

Affie commented Oct 2, 2019

Initial idea for big data to get us going

@Affie Affie requested a review from GearsAD October 2, 2019 12:24
@Affie Affie mentioned this pull request Oct 4, 2019
solverDataDict::Dict{Symbol, VariableNodeData}
smallData::Dict{String, String}
bigData::Any
bigData::Dict{Symbol, AbstractBigDataEntry}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use Option 2 method here, i.e.:

bigData::Dict{Symbol, <: AbstractBigDataEntry}

#148 (comment)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whole advantage from this approach is to have an abstract container. I did some benchmarks and an abstract dict with composite types in does not seem to perform worse than a typed dict.
I'm more than open for suggestions of other ways to do it, but <: AbstractBigDataEntry will not work in this case.

The advantage is in the flexibility, the types I added for illustration and the ones I currently find useful are:

struct MongodbBigDataEntry <: AbstractBigDataEntry
    key::Symbol
    oid::NTuple{12, UInt8} #mongodb object id
    #maybe other fields such as:
    #flags::Bool ready, valid, locked, permissions
    #MIMEType::Symbol
end

struct FileBigDataEntry <: AbstractBigDataEntry
    key::Symbol
    filename::String
end

One can just as easily define other types as long as it has a key field, maybe in memory - stored in an dictionary:
If you don't mind it not working in the cloud.

struct MemoryBigDataEntry <: AbstractBigDataEntry
    key::Symbol
    dictionaryModule::Symbol
    dictionaryReference::Symbol
end

The alternatives i could think of were to standardize BigDataEntry, but I don't know what to put in there and you lose dispatch. Or to just keep the keys in a Set{Symbol} kind of way.

@GearsAD
Copy link
Collaborator

GearsAD commented Oct 21, 2019

We can close this right, it's merged into master already as part of megaPR?

@Affie
Copy link
Member Author

Affie commented Oct 21, 2019

Looks like some of the tests got lost in the merge conflicts.
Never mind bad compare, everything is there.

@Affie Affie closed this Oct 21, 2019
@dehann
Copy link
Member

dehann commented Apr 27, 2020

xref #97

@Affie Affie deleted the feature/dfgBigData branch August 31, 2020 09:20
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

Successfully merging this pull request may close these issues.

4 participants