RejectedSoftware Forums

Sign up

vibe.d as a front-end server

Hello,

Recently discovered vibe.d and was totally amazed by it's performance and ease of use.
I'm a PHP developer right now, but looking into world of modern frameworks and languages to choose what could be the possible "ideal" solution for next-gen projects. I've tested nodejs, dart, elixir, some frameworks for them. After some years of PHP development working with all those bundles seems a bit confusing (never did thing like HTTP server, requests and so on on PHP part, also compiling part - I don't know if there's another way to work with frameworks like vibe.d, but do I actually need to recompile every time I change something in my code while working on it?).

Also, after some testing, I discovered that vibe.d can actually serve apps without nginx as a front-end server. With it, it's much more (almost 2x) slower. And without nginx, assuming you actually do some kind of low level programming, it's performance is just outstanding! What could be the cons of running vibe.d apps without front-end server?

Thanks.
Mikhail

Re: vibe.d as a front-end server

On Mon, 29 Jun 2015 05:45:20 GMT, mikhail wrote:

it's performance is just outstanding! What could be the cons of running vibe.d apps without front-end server?

Thanks.
Mikhail

You'll know if you ever need a feature that nginx has... It only takes me a few lines to compensate whenever that happens.

If you don't want to re-compile every time you change something, you can use a file server and change the HTML, or setup a database and change things through a database manager.

Re: vibe.d as a front-end server

I think the most important feature you'll miss from Nginx is load-balancing. Most other things are sort of trivial to implement on top of vibe.

We are soon going live without Nginx, and I don't have plans to ever use it, at least I hope I won't need to.

Re: vibe.d as a front-end server

On Mon, 29 Jun 2015 23:09:19 GMT, Márcio Martins wrote:

I think the most important feature you'll miss from Nginx is load-balancing. Most other things are sort of trivial to implement on top of vibe.

We are soon going live without Nginx, and I don't have plans to ever use it, at least I hope I won't need to.

Have you tried VibeDist? I also think doing DNS round-robin is a good idea if your architecture was designed with it in mind

Re: vibe.d as a front-end server

Am 29.06.2015 um 07:45 schrieb mikhail:

I'm a PHP developer right now, but looking into world of modern frameworks and languages to choose what could be the possible "ideal" solution for next-gen projects. I've tested nodejs, dart, elixir, some frameworks for them. After some years of PHP development working with all those bundles seems a bit confusing (never did thing like HTTP server, requests and so on on PHP part, also compiling part - I don't know if there's another way to work with frameworks like vibe.d, but do I actually need to recompile every time I change something in my code while working on it?).

There is a preliminary implementation for automatic recompilation on
non-Windows systems [1]. The application is still recompiled and
restarted, but you'll just notice a short delay and don't have to care
about it otherwise. If you are using sessions, you'd just have to use a
RedisSessionStore (or some other externally backed session store) to
make this seamless.

Easiest way to try: Use the "Download ZIP" button on GitHub and then run
./build.sh on the extracted sources. You should also switch to
ld.gold, as it is several times faster.

Re: vibe.d as a front-end server

On Mon, 29 Jun 2015 05:45:20 GMT, mikhail wrote:

but do I actually need to recompile every time I change something in my code while working on it?).

Thanks.
Mikhail

Coming from python frameworks which instantly reloaded templates, recompiling hasn't been an issue for me (2-5 seconds on a modern laptop, i7 processor). However, diet templates don't line up 1:1 with jade, so if you have "mysterious" template issues, try commenting any complicated lines you just added.

I'm not too far in, but, tbth, it's been less stress than learning other frameworks, simply because I enjoy D, and I feel like what I'm learning is far more practical.

Another little note is I read on a forum that DMD takes about 2GB RAM to compile. I tried to compile code on a test server with 512 MB, and had compiling errors. The binary ran fine. Nothing bad, just, different is all.