Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

[DO-NOT-MERGE] Request for comments#3808

Closed
redknightlois wants to merge 4 commits intoTechEmpower:masterfrom
Corvalius:ravendb
Closed

[DO-NOT-MERGE] Request for comments#3808
redknightlois wants to merge 4 commits intoTechEmpower:masterfrom
Corvalius:ravendb

Conversation

@redknightlois
Copy link
Copy Markdown

Implementation of the full test suite on both MVC and Middleware configurations.
Docker image for a database server running on Windows with an embedded developer license (supports up to 9 cores with 36Gb of memory).

cc @bhauer

Still missing:

  • Setting up the docker instances for RavenDB on Linux (toolset directory)
  • Run TechEmpower in verify mode.
    cc @aviviadi @ayende @gregolsky

…igurations.

Docker image for database server running on Windows.

Still missing:
- Setting up the docker instances for RavenDB on Linux (toolset directory)
- Run TechEmpower in verify mode.
cc @aviviadi @ayende @gregolsky
@msmith-techempower
Copy link
Copy Markdown
Member

I do not see the Dockerfile for the database server mentioned in the original post. What am I missing?

@redknightlois
Copy link
Copy Markdown
Author

@msmith-techempower
Copy link
Copy Markdown
Member

AHHHH, thank you. I am just blind as a bat >_<

public MultipleQueriesController()
{ }

public MultipleQueriesController(RavenDb provider)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can't you implement IDb and use the same pattern as the other calls?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Tried, but the model has to be different. RavenDB does not support integer keys among other small different things. We can build a dedicated controller if you are worried about the impact that extra instance variable may have on the other controllers.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Right, that would be better. Also I can measure the impact it has on other scenarios (it can't have any) and get preliminary results with our infrastructure so you can iterate more quickly, based on your branches.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

public FortunesController()
{ }

public FortunesController(RavenDb provider)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Shouldn't this be used via HttpContext.RequestServices.GetRequiredService, like the others?

Copy link
Copy Markdown
Author

@redknightlois redknightlois May 31, 2018

Choose a reason for hiding this comment

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

Not really, unless we want to introduce a scope factory. That instead of creating the DocumentStore they would just OpenSession.

for (var i = 0; i < 10001; i++)
_identifiers[i] = $"{_random.Next(1, 10001)}";

// We need to use different databases because we id's are integer and RavenDB does not have tables, it has collections
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why not use a id prefix, instead?


// TODO: We need to have an static index and stream it completely.
var query = session.Advanced
.AsyncRawQuery<FortuneRaven>("from Fortune order by Id");
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think you can drop the order by Id here, this is the natural sort order when querying by collection only.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I was under the impression that it would be lexicographic instead. Gonna check that.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It is lexical anyway

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yes, you are right there... I may be able to simplify it further

{
var count = MiddlewareHelpers.GetMultipleQueriesQueryCount(httpContext);

var rows = await _db.LoadMultipleUpdatesRows(count);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is there specific format required? We can use the streaming option to pass the raw results directly to the client, bypassing any work on the server side.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yes, format is specified. There are even ordering issues AFAIK for streaming. Multiple updates is actually a Bulk Insert, haven't code it like that yet, so no streaming.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Might be better to see if we can do that directly via a query and stream it, yen.

{
var row = await _db.LoadSingleQueryRow();

var result = JsonConvert.SerializeObject(row, _jsonSettings);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same here, we can skip this cost by piping the results directly

@redknightlois
Copy link
Copy Markdown
Author

redknightlois commented Jun 4, 2018

Hi guys, anything that we should know about this?

@bhauer
Copy link
Copy Markdown
Contributor

bhauer commented Jun 5, 2018

@redknightlois Sorry, we've been distracted trying to get Round 16 wrapped up. We'll try to follow up soon!

@sebastienros
Copy link
Copy Markdown
Contributor

Could you provide a database server image that runs on Linux?

@redknightlois
Copy link
Copy Markdown
Author

@sebastienros Done. Last commit would give you a linux dockerfile

@michaelhixson
Copy link
Copy Markdown
Contributor

@redknightlois What's the state of this PR from your perspective? Are you looking for guidance from TechEmpower to get the toolset actually using the new database?

I have an open PR where I added a new database implementation (SQL Server on linux) to the toolset, where a framework is using the new database and passing tests. See: #3807

See especially the changes I had to make in the toolset/benchmark and toolset/utils directories. We would need similar changes here to make the toolset recognize RavenDB.

I also had to change our main root Dockerfile to make the necessary Python package available to the toolset so that it was able to talk to the new database. If you need to make changes in that file, which is the source for the techempower/tfb image, then Travis isn't going to be able to test it successfully because Travis pulls the image from here instead of building it: https://hub.docker.com/r/techempower/tfb/

You could rebuild the techempower/tfb image and test it locally though. That's what I did for my PR.

@redknightlois
Copy link
Copy Markdown
Author

redknightlois commented Jun 19, 2018

What's the state of this PR from your perspective? Are you looking for guidance from TechEmpower to get the toolset actually using the new database?

We are setting the groundwork to make it part of the TechEmpower framework. What I am looking for is guidance on both how to integrate everything and also on the benchmark specifically to know for sure if we are not tripping on something that could either give us an unfair advantage or disadvantage against the rest.

I will look into #3807 to replicate the changes that we would need for it. If I have any question I will ask here.

@msmith-techempower
Copy link
Copy Markdown
Member

@michaelhixson Does this require a patch from us? I am a bit confused on the status of this pull request.

@redknightlois
Copy link
Copy Markdown
Author

@msmith-techempower I didn't continue it yet. I expect to have what I need to change from #3807, in any way if you prefer, you can close the Request for comments PR and I will create a new one when we continue with this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants