Mongrel2 1.4 Is Out, LOTS OF GOODIES
- From:
- Zed A. Shaw
- Date:
- 2010-10-16 @ 18:45
It's been about 2 weeks since the last release, and this one's got a lot
of fixes for tons of bugs, a completely redesigned IO buffering system,
support for XML or JSON sockets, and a cool BBS demo in Lua.
Go grab it at http://mongrel2.org/home#download
Here's what's changed (from almost 250 commits):
* JSON or XML routing can be used for messages to a socket. JSON is
routed with @blah and XML with the root tag <blah. This should make
flash games lots of fun (or just generic message routing).
* Optionally set the raw_handler=1 flag in Handler() and it won't base64
the results. This is for newer flash clients that don't need this.
* Fixes for various m2sh config loading problems.
* Redesigned IO buffering that works with files, sockets, or SSL and is
a kind of "half-ring-buffer" should speed things up and reduce ram
copying during parsing, and also make XML, JSON, or HTTP play nice
together.
* New commands in the control port: help, stop, terminate. You can now
manage Mongrel2 without PID files.
* Generally cleaned up all debug printing so you get less junk in the
error.log.
* Tons of tests in tests/system_tests that I'm actively using to thrash
mongrel2.
* Memory leaks and errors fixed galore.
* Access logging is now sent to a 0mq thread that does it lazy and
doesn't block your mongrel2 process. Future versions will let you point
this 0mq access log at anything you want.
* Lots of code cleaning and auditing, this is an ongoing habit from now
on.
* A totally fun BBS written in Lua using mongrel2-lua and redis that is
accessible from a simple Python command line client. Look in
examples/bbs/ and I'll be blogging about it soon.
Things that are still broken:
* SSL, the IOBuf code sort of broke this, but hopefully nobody was using
it yet.
* Performance. getaddrinfo is *killing* us on proxying, IPv6 lookups are
slow as dirt, and generating payloads for handlers uses a ton of
string/memcpy operations. To name a few.
Grab it and try it and report *any* errors you have. Thanks!
--
Zed A. Shaw
http://zedshaw.com/
Re: [mongrel2] Mongrel2 1.4 Is Out, LOTS OF GOODIES
- From:
- Colin Curtin
- Date:
- 2010-10-17 @ 18:16
On Sat, Oct 16, 2010 at 11:45 AM, Zed A. Shaw <zedshaw@zedshaw.com> wrote:
> * JSON or XML routing can be used for messages to a socket. JSON is
> routed with @blah and XML with the root tag <blah. This should make
> flash games lots of fun (or just generic message routing).
This sounds awesome. Can you talk a little more about this? Maybe an example?
Colin
--
=begin
Colin Curtin
Engineer, Cramer Development
http://cramerdev.com
email: colin@cramerdev.com
skype: colin.t.curtin
phone: +1.805.694.UNIX (8649)
=end
Re: [mongrel2] Mongrel2 1.4 Is Out, LOTS OF GOODIES
- From:
- Zed A. Shaw
- Date:
- 2010-10-17 @ 19:48
On Sun, Oct 17, 2010 at 11:16:28AM -0700, Colin Curtin wrote:
> On Sat, Oct 16, 2010 at 11:45 AM, Zed A. Shaw <zedshaw@zedshaw.com> wrote:
> > * JSON or XML routing can be used for messages to a socket. JSON is
> > routed with @blah and XML with the root tag <blah. This should make
> > flash games lots of fun (or just generic message routing).
>
> This sounds awesome. Can you talk a little more about this? Maybe an example?
Yeah, I'm actually going to be writing up a couple of client examples to
go with the python one for the BBS and then talking about the protocols
but here's the quick version.
First the parser now recognizes HTTP, JSON and XML. If you connect to
Mongrel2 and send an HTTP request it parses it like normal. If you send
something that's @blah { ...}\0 then it considers that JSON. If you
send <blah>...</blah>\0 then it considers that an XML message.
To route the JSON messages it just uses the @blah path like before, and
I've made it strict that @ is how you start a json path. That really
hasn't changed. You then receive messages like normal on the backend,
but they have a METHOD header of JSON.
XML is the really cool part. It uses the root tag's beginning, and
routes <blah but not the rest. It then takes everything until it hits a
final >\0 combination. You then put routes into your mongrel2.conf
that are <blah or <foo-bar and patterns from that and it'll route it to
the handlers that you specify. Even Dir handlers, so you could have
static XML responses to things.
This means you could send <chat name=""><msg>blah</msg></chat> and it'd
route on routes <chat or you could do <chat/> or <chat>..</chat>.
The path you get then is <chat, the body of the message is the whole XML
tree, and the METHOD is XML.
We now then use this for handling the <policy-file/> stuff that flash
sockets want, and will eventually let you use a Dir to serve up a
specific policy file later.
--
Zed A. Shaw
http://zedshaw.com/
Re: [mongrel2] Mongrel2 1.4 Is Out, LOTS OF GOODIES
- From:
- Sabin Iacob
- Date:
- 2010-10-16 @ 20:23
On 10/16/2010 08:45 PM, Zed A. Shaw wrote:
> It's been about 2 weeks since the last release, and this one's got a lot
> of fixes for tons of bugs, a completely redesigned IO buffering system,
> support for XML or JSON sockets, and a cool BBS demo in Lua.
>
> Go grab it at http://mongrel2.org/home#download
download link no worky
Re: [mongrel2] Mongrel2 1.4 Is Out, LOTS OF GOODIES
- From:
- Zed A. Shaw
- Date:
- 2010-10-16 @ 20:26
On Sat, Oct 16, 2010 at 10:23:55PM +0200, Sabin Iacob wrote:
> On 10/16/2010 08:45 PM, Zed A. Shaw wrote:
> > It's been about 2 weeks since the last release, and this one's got a lot
> > of fixes for tons of bugs, a completely redesigned IO buffering system,
> > support for XML or JSON sockets, and a cool BBS demo in Lua.
> >
> > Go grab it at http://mongrel2.org/home#download
>
> download link no worky
Yep, sorry about that, it's up now.
--
Zed A. Shaw
http://zedshaw.com/
Re: [mongrel2] Mongrel2 1.4 Is Out, LOTS OF GOODIES
- From:
- Sabin Iacob
- Date:
- 2010-10-16 @ 20:53
On 10/16/2010 10:26 PM, Zed A. Shaw wrote:
> On Sat, Oct 16, 2010 at 10:23:55PM +0200, Sabin Iacob wrote:
>> On 10/16/2010 08:45 PM, Zed A. Shaw wrote:
>>> It's been about 2 weeks since the last release, and this one's got a lot
>>> of fixes for tons of bugs, a completely redesigned IO buffering system,
>>> support for XML or JSON sockets, and a cool BBS demo in Lua.
>>>
>>> Go grab it at http://mongrel2.org/home#download
>> download link no worky
> Yep, sorry about that, it's up now.
thanks, PPA updated for lucid, now fighting with launchpad to get the
maverick build done
Re: [mongrel2] Mongrel2 1.4 Is Out, LOTS OF GOODIES
- From:
- Zed A. Shaw
- Date:
- 2010-10-16 @ 22:52
On Sat, Oct 16, 2010 at 10:53:36PM +0200, Sabin Iacob wrote:
> On 10/16/2010 10:26 PM, Zed A. Shaw wrote:
> >> download link no worky
> > Yep, sorry about that, it's up now.
>
> thanks, PPA updated for lucid, now fighting with launchpad to get the
> maverick build done
Can you like me to the PPA? I'd like to look at it.
--
Zed A. Shaw
http://zedshaw.com/
Re: [mongrel2] Mongrel2 1.4 Is Out, LOTS OF GOODIES
- From:
- Sebastian Otaegui
- Date:
- 2010-10-16 @ 23:17
https://launchpad.net/~iacobs/+archive/mongrel2
On Sat, Oct 16, 2010 at 5:52 PM, Zed A. Shaw <zedshaw@zedshaw.com> wrote:
> On Sat, Oct 16, 2010 at 10:53:36PM +0200, Sabin Iacob wrote:
> > On 10/16/2010 10:26 PM, Zed A. Shaw wrote:
> > >> download link no worky
> > > Yep, sorry about that, it's up now.
> >
> > thanks, PPA updated for lucid, now fighting with launchpad to get the
> > maverick build done
>
> Can you like me to the PPA? I'd like to look at it.
>
> --
> Zed A. Shaw
> http://zedshaw.com/
>
--
Those who do not understand Unix are condemned to reinvent it, poorly.
Any sufficiently recent Microsoft OS contains an ad hoc,
informally-specified, bug-ridden, slow implementation of half of Unix.
Re: [mongrel2] Mongrel2 1.4 Is Out, LOTS OF GOODIES
- From:
- Zed A. Shaw
- Date:
- 2010-10-16 @ 23:34
On Sat, Oct 16, 2010 at 06:17:46PM -0500, Sebastian Otaegui wrote:
> https://launchpad.net/~iacobs/+archive/mongrel2
Very cool, I'll try it out and let you know what I think.
--
Zed A. Shaw
http://zedshaw.com/
Re: [mongrel2] Mongrel2 1.4 Is Out, LOTS OF GOODIES
- From:
- Sabin Iacob
- Date:
- 2010-10-17 @ 18:11
On 10/17/2010 01:34 AM, Zed A. Shaw wrote:
> On Sat, Oct 16, 2010 at 06:17:46PM -0500, Sebastian Otaegui wrote:
>> https://launchpad.net/~iacobs/+archive/mongrel2
> Very cool, I'll try it out and let you know what I think
found some time today to make debian/rules use the proper overrides and
add a -dbg package (debug symbols); for the latter I'm just using make
dev and letting dh_strip do the rest, looked like the simplest solution