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

[AspNet] Use async database operations where possible. #499

Closed
wants to merge 1,332 commits into from
Closed

[AspNet] Use async database operations where possible. #499

wants to merge 1,332 commits into from

Conversation

damianh
Copy link

@damianh damianh commented Oct 6, 2013

Changed the AdoController and EntityFrameworkController to inherit from AsyncApiController and use async db/EF operations where available. In theory, it should allow higher peak throughput by performing non-blocking I/O. In reality, it depends completely on the DB provider. As of writing, MySql, Npgsql and MongoDB don't support async I/O (Mongo support is due to land in November). SqlClient does, so the results are going to be interesting if sql server is added.

Seperately, any interest in adding NancyFX to the mix?

michaelhixson and others added 30 commits July 15, 2013 18:35
adds Test #6  plaintext URL for openresty
Upgrade to Netty 4.0.0.CR7-SNAPSHOT
Disable CodeIgniter query profiling.
Add the lapis framework to benchmarks
nginx keepalive to fastcgi backends for PHP frameworks #332
cpoll_cppsp: fixed "pipeline stall" (update to cppsp 0.2.1)
Added a raw Silex benchmark with all the required tests
Get SQL Server working with ASP.NET tests on Windows
…ameworkBenchmarks into MalcolmEvershed-aspnet-stripped

Conflicts:
	framework_test.py
Update `installer.ps1` with latest framework versions and add `Play`
Modify setup file to use mono-sgen, to improve performance when used C# ...
…t scenarios using MySql, PostgreSql, and Sql Server with ORMLite

1. Fixed an issue with the MySql tests where a new connection was
created on each call instead of opening one from the connection pool.
2. Added services to test all six scenarios against MySql, PostgreSql,
and Sql Server.
3. Added some support scripts to Create and Populate the World and
Fortune table if they do not exist when the application is started (for
local development).
4. Added Swagger-UI feature for developers to explorer and test included
services.
5. Disabled features that are not needed based on the test scenario
specifications such as SOAP and CSV output formats.
6. Updated all third-arty libraries to their current stable version.
Extended ServiceStack with all 6 tests against MySql, PostgreSql, and Sql Server using ORMLite
streamline sbt usage from different projects
Major packages:
New:
    * Python 3.3.2
Update:
    * Django 1.6b1 (from 1.6a1)
    * Flask 0.10.1
    * Tornado 3.1
The functional changes were:
1) Offload blocking requests to worker threads using exchange.dispatch
2) Use default numbers for IO/worker threads

The rest of this commit is just shifting code around.  Individual handlers
went into their own classes.
michaelhixson and others added 15 commits September 12, 2013 21:28
…issue where play-java-jpa was never being executed.
Refactored setup scripts for play to be much simpler
…roduced a performance problem whereby prepared statements were not being reused:

https://bugs.launchpad.net/bonecp/+bug/1168616

0.8.0-rc4-snapshot apparently fixes this issue, but it is not yet deployed to a release repository.

The workaround here is to downgrade bonecp back to what it was for the 2.1.x branch i.e. 0.7.1.RELEASE.

Bonecp will hopefully release 0.8.0 and Play 2.2.1 will be released with it as a dependency.
Downgrade bonecp for play 2.2 apps
Small fixes to PHPixie implementation
Linked to test requirements section of results web site.
@pdonald
Copy link
Contributor

pdonald commented Oct 7, 2013

Previous discussions about ASP.NET async

#272 (comment)
#315

@damianh
Copy link
Author

damianh commented Oct 7, 2013

@pdonald Thx. I actually searched for asp.net async here and didn't find anything related.

@bhauer
Copy link
Contributor

bhauer commented Oct 7, 2013

Thanks @damianh!

As for NancyFX, that was added in PRs #310 (including for JSON encoding only in Round 6) and #435 (not yet included in any published round).

@MalcolmEvershed
Copy link
Contributor

I like the change in theory, but do you know in practice if this will make things slower? Should it only be committed if we've seen it improve performance, or should we commit anyway? Thanks.

@KevinHoward
Copy link
Contributor

I have slightly the same feelings as @MalcolmEvershed on this, however I believe that it is not something we should exclude. Rather, it should be a demonstration of which methodology performs better.

This means that I would recommend an async and sync version, not one or the other. This will illustrate the performance between two approaches using the same technologies, which should be most beneficial.

@damianh
Copy link
Author

damianh commented Oct 8, 2013

I agree with @KevinHoward, we should have both. This would indicated the best strategy one should take for a particular sql provider. It should also highlight, at some point in the future, any improvements when the async support is implemented in the providers that don't support it yet.

I'm expecting to see MySql & Postgres async to have worse perf numbers then their sync counterpart, and the sql server async to have better perf numbers.

How do you want the asycn support done, in a separate folder 'aspnet-async'?

(Separately, also working on an owin implementation https://github.com/damianh/FrameworkBenchmarks/blob/nowin/nowin/src/Program.cs )

@bhauer
Copy link
Contributor

bhauer commented Oct 8, 2013

@damianh If the source code varies, and I believe it does, then a separate folder for this permutation is preferred. In situations where only some configuration varies, we sometimes have multiple test permutations in a single folder. It's a judgment call for the time being since we have not yet designed a clean and (mostly) consistent directory organization (#448).

Can you revise the PR accordingly?

@damianh
Copy link
Author

damianh commented Oct 8, 2013

Yep, separate folder makes sense. Will do.

@bhauer
Copy link
Contributor

bhauer commented Oct 21, 2013

I am closing this PR because it's not possible to auto merge as-is. As I understand the above, a replacement PR may be created in the future.

@bhauer bhauer closed this Oct 21, 2013
@bhauer
Copy link
Contributor

bhauer commented Nov 1, 2013

@damianh Just a heads up that Hacker News user omphalos was asking about an OWIN implementation. I just mentioned your comment above in reply.

[1] https://news.ycombinator.com/item?id=6652672

@damianh
Copy link
Author

damianh commented Nov 1, 2013

@bhauer I better get that work done for round 8!

e: I was waiting for katana 2.0 bit to be released, which happened last week, so hopefully will be in next round.

@bhauer
Copy link
Contributor

bhauer commented Nov 1, 2013

@damianh Fantastic. Thanks!

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.