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

Better data model and optimized indexing #218

Merged
merged 11 commits into from
Feb 13, 2014
Merged

Better data model and optimized indexing #218

merged 11 commits into from
Feb 13, 2014

Conversation

synhershko
Copy link
Contributor

Time counters and datestamps are not properly indexed and hence can't be properly queried (using ranges etc). Sorting on times did work because it was stored as strings that were lexicographically ordered, but there wasn't much that could have been done with it.

What I do here is move to using RavenDB best practices as well as fix bugs that weren't yet discovered as querying isn't fully implemented. I may even write some more tests if I'll be in the mood. I have more details in the individual commits.

This is still WIP as I work my way around the data that is being indexed for messages and fix the indexing and querying as I go along.

Comments welcome.

Critical/Processing/Delivery times were stored by strings. This commit stores them as numerics by using Ticks. Also using the null-value pattern for when there's no data to store instead of using 0's.
This affects QueryableExtensions.Sort being used from GetMessagesByQuery. Need to figure out if this is a wanted effect; also, no secondary sorts are supported.
Removing a recursive call in on of the maps
@synhershko
Copy link
Contributor Author

Changed PR title. This is still WIP but now directed more towards data model and indexing best-practices and optimizations

@synhershko
Copy link
Contributor Author

@johnsimons this PR seems to get bloated and go sideways. Can we merge it in before it becomes stale and then work off it to get more refactoring done (I'll discuss some of them with you tomorrow)?

@johnsimons
Copy link
Member

Yep, I can bring it in today

On Thursday, 13 February 2014, Itamar Syn-Hershko notifications@github.com
wrote:

@johnsimons https://github.com/johnsimons this PR seems to get bloated
and go sideways. Can we merge it in before it becomes stale and then work
off it to get more refactoring done (I'll discuss some of them with you
tomorrow)?

Reply to this email directly or view it on GitHubhttps://github.com//pull/218#issuecomment-34919286
.

{
return negotiator
.WithHeader("QueryTimeMs", stats.DurationMilliseconds.ToString(CultureInfo.InvariantCulture))
.WithHeader("IsStale", stats.IsStale.ToString());
Copy link
Member

Choose a reason for hiding this comment

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

are these just for diagnostics?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, maybe staleness can be reflected in the UIs as well

@johnsimons johnsimons merged commit 82ac620 into develop Feb 13, 2014
@johnsimons johnsimons deleted the numeric-fields branch February 13, 2014 01:50
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.

None yet

2 participants