Morbo, i for one welcome our new development web server overlord!

162 views
Skip to first unread message

Sebastian Riedel

unread,
Jun 16, 2011, 11:43:16 PM6/16/11
to mojol...@googlegroups.com
There have been a lot of complaints about "--reload", it leaks memory like crazy, crashes a lot and is generally not very reliable.
To address these issues we've now added a new self-restarting development web server called Morbo.
Instead of reloading modules at runtime it actually kills and restarts the application process.

https://github.com/kraih/mojo/commit/5af1133ee81416c4bab8c759d13e24ad52cc7692

Usage is pretty simple and similar to Hypnotoad.

% mojo generate lite_app
...
% morbo myapp.pl
Server available at http://127.0.0.1:3000.

% morbo myapp.pl --listen https://*:5000
Server available at https://127.0.0.1:5000.

By removing a few hacks required for the old "--reload" support we also managed to reduce memory usage by about 1mb per worker process and increase overall performance by 5-10%.

It is still experimental, but i'm looking forward to your feedback and patches, please go ahead and test Morbo extensively!

--
Sebastian Riedel
http://mojolicio.us
http://twitter.com/kraih
http://blog.kraih.com


Jason Dixon

unread,
Jun 16, 2011, 11:44:22 PM6/16/11
to mojol...@googlegroups.com
Very glad to hear this. I gave up on --reload a while back so I'll be
happy to give this a test drive soon.

Thanks,
Jason

> --
> You received this message because you are subscribed to the Google Groups "Mojolicious" group.
> To post to this group, send email to mojol...@googlegroups.com.
> To unsubscribe from this group, send email to mojolicious...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mojolicious?hl=en.
>

--
Jason Dixon
DixonGroup Consulting
http://www.dixongroup.net/

sri

unread,
Jun 16, 2011, 11:53:08 PM6/16/11
to Mojolicious
Btw. I'm not sure yet what files to watch by default.
At the moment it starts with just the application script and you have
to add directories yourself.

% mojo generate app
...
% cd myapp
% morbo script/myapp -w .

It's a bit tricky because for normal Mojolicious applications you
would want to watch everything below the current working directory,
while for single file Mojolicious::Lite apps in your home directory
that could be rather unpleasant.

--
sebastian

sri

unread,
Jun 17, 2011, 5:15:59 PM6/17/11
to Mojolicious
Morbo will now also by default watch the "lib", "templates" and
"public" directories in the current working directory.
That should cover the most common use cases.

--
sebastian

sri

unread,
Jun 18, 2011, 2:25:10 PM6/18/11
to Mojolicious
And Morbo has now been released together with Mojolicious 1.44. :)

https://github.com/kraih/mojo/blob/v1.44/Changes

--
sebastian
Reply all
Reply to author
Forward
0 new messages