digitalmars.D - vibe.d in techempower web framework benchmark
- deadalnix (15/15) Apr 25 2013 I have been discussing with the author of techempower web
- 1100110 (4/20) Apr 25 2013 Heck, I feel the same way.
- Dicebot (9/24) Apr 25 2013 I'll try to make one in nearby time. Quite worried about "the
- 1100110 (26/26) Apr 25 2013 [diet.d]
- Dicebot (3/14) Apr 25 2013 They are exactly the same. writeJsonBody calls the very same
- 1100110 (3/9) Apr 25 2013 I suspected as much.
- =?UTF-8?B?U8O2bmtlIEx1ZHdpZw==?= (15/27) Oct 01 2013 I've finally taken the time to do the first step and integrated a simple...
I have been discussing with the author of techempower web framework benchmark. He ended asking me a pull request to integrate vibe.d . See : http://www.techempower.com/benchmarks/ The instruction to create a pull request are here : https://github.com/TechEmpower/FrameworkBenchmarks I don't have much time right now, so if someone want to do it, that would be awesome. If nobody volunteer, I'll do it, but I clearly lack time right now. I also lack knowledge about how to get the best out of vibe.d and risk to propose an under performant pull request. vibe.d perform very well in many situation, so I think this is a good opportunity to demonstrate what we have and do some advertisement for D.
Apr 25 2013
On 04/25/2013 02:06 AM, deadalnix wrote:I have been discussing with the author of techempower web framework benchmark. He ended asking me a pull request to integrate vibe.d . See : http://www.techempower.com/benchmarks/ The instruction to create a pull request are here : https://github.com/TechEmpower/FrameworkBenchmarks I don't have much time right now, so if someone want to do it, that would be awesome. If nobody volunteer, I'll do it, but I clearly lack time right now. I also lack knowledge about how to get the best out of vibe.d and risk to propose an under performant pull request. vibe.d perform very well in many situation, so I think this is a good opportunity to demonstrate what we have and do some advertisement for D.Heck, I feel the same way. I would love to see good, idiomatic vibe code. I'll at least play so I can compare mine.
Apr 25 2013
On Thursday, 25 April 2013 at 07:06:45 UTC, deadalnix wrote:I have been discussing with the author of techempower web framework benchmark. He ended asking me a pull request to integrate vibe.d . See : http://www.techempower.com/benchmarks/ The instruction to create a pull request are here : https://github.com/TechEmpower/FrameworkBenchmarks I don't have much time right now, so if someone want to do it, that would be awesome. If nobody volunteer, I'll do it, but I clearly lack time right now. I also lack knowledge about how to get the best out of vibe.d and risk to propose an under performant pull request. vibe.d perform very well in many situation, so I think this is a good opportunity to demonstrate what we have and do some advertisement for D.I'll try to make one in nearby time. Quite worried about "the current tests exercise the frameworks JSON seralization and object-relational model" though, application level utilities have not been performance priority in vibe.d and such tests severely limit performance capabilities by tying them to inherently slow processing bottleneck. (I'd expect to see both DB access and JSON serialization cached in process memory for real performance-critical web apps, those a re just too slow)
Apr 25 2013
[diet.d] import vibe.d; import vibe.data.json; import std.array; shared static this() { auto settings = new HttpServerSettings; auto router = new UrlRouter; settings.port = 8080; settings.hostName = "localhost"; ///Json Response router.get("/json", &handleJson ); listenHttp(settings, router); } /// Json Response void handleJson(HttpServerRequest req, HttpServerResponse res) { Json tmp = serializeToJson(["message":"Hello, World!"]); res.writeBody(tmp.to!string, "application/json"); /** Does this one still meet the qualifications, * and which should be used? * res.writeJsonBody(["message":"Hello, World!"]); */ } Someone Get Bearophile in here. I bet he'll tell me _exactly_ what is what with this. =P
Apr 25 2013
On Thursday, 25 April 2013 at 09:26:19 UTC, 1100110 wrote:... void handleJson(HttpServerRequest req, HttpServerResponse res) { Json tmp = serializeToJson(["message":"Hello, World!"]); res.writeBody(tmp.to!string, "application/json"); /** Does this one still meet the qualifications, * and which should be used? * res.writeJsonBody(["message":"Hello, World!"]); */ } ...They are exactly the same. writeJsonBody calls the very same serializeToJson inside.
Apr 25 2013
On 04/25/2013 04:31 AM, Dicebot wrote:On Thursday, 25 April 2013 at 09:26:19 UTC, 1100110 wrote:I suspected as much. Thank you.void handleJson(HttpServerRequest req, HttpServerResponse res) { res.writeJsonBody(["message":"Hello, World!"]); }
Apr 25 2013
Am 25.04.2013 09:06, schrieb deadalnix:I have been discussing with the author of techempower web framework benchmark. He ended asking me a pull request to integrate vibe.d . See : http://www.techempower.com/benchmarks/ The instruction to create a pull request are here : https://github.com/TechEmpower/FrameworkBenchmarks I don't have much time right now, so if someone want to do it, that would be awesome. If nobody volunteer, I'll do it, but I clearly lack time right now. I also lack knowledge about how to get the best out of vibe.d and risk to propose an under performant pull request. vibe.d perform very well in many situation, so I think this is a good opportunity to demonstrate what we have and do some advertisement for D.I've finally taken the time to do the first step and integrated a simple benchmark target into a fork of the benchmark suite: https://github.com/s-ludwig/FrameworkBenchmarks/tree/master/vibe.d It's still very rough and misses the actual DB queries and proper testing of the setup scripts. If anyone with a running MySQL server and some experience with the mysql-native driver wants to add the missing query execution code that would be great! The most obvious possibility for improvement is the JSON serialization. That currently allocates twice, once for T->JSON and once for JSON->string -- it shouldn't allocate at all. Since std.serialization still seems to take some time, I'll probably add something to the existing serialization code in vibe.d for that. See also http://forum.rejectedsoftware.com/groups/rejectedsoftware.vibed/thread/1670/#post-5094
Oct 01 2013