[openstack-dev] [wsme] [ironic] [ceilometer] [magnum] [kite] [tuskar] WSME unmaintained ?

Julien Danjou julien at danjou.info
Fri Apr 17 07:12:29 UTC 2015


On Thu, Apr 16 2015, Jay Pipes wrote:

>> I think this may be the way to go. The intent of WSME is admirable
>> (the multiprotocol stack) but the execution leads to unwarranted
>> complexity.
>>
>> I think a framework more specifically dedicated to JSON APIs, or
>> even just being "webby" and correct would be better. Something
>> _much_ simpler and _much_ more aligned with WSGI.
>
> Amen. Honestly, I never liked WSME and now that projects are no longer
> supporting XML, I don't see any reason to continue using it.

Yeah, supporting XML was one of the good point of WSME… back then and a
reason to pick it… back then.

> Like you say, it adds way too much unnecessary complexity to the API
> framework, IMHO. Better to just use a simple JSONSchema framework
> (using the jsonschema Python library) to do input validations and have
> schema definitions in JSONSchema instead of random attribute factories
> like:

In Gnocchi we rely on voluptuous¹. The good part is that it allows to
write shorter and more Pythonic schema. The downside might be that it's
not portable obviously.

> Personally, I prefer the Falcon approach to routing, which is what I call
> "explicit object dispatch" ;)
>
> class ThingsResource:
>
>     def on_get(self, req, resp, user_id):
>         ... do some stuff
>         resp.set_header('X-Powered-By', 'Small Furry Creatures')
>         resp.status = falcon.HTTP_200
>
> things = ThingsResource()
> app = falcon.API()
> app.add_route('/{user_id}/things', things)

After using Pecan for a while, I'm leaning toward explicit routing too.
This Falcon API looks right too.
Honestly Pecan is messy. Most of the time, when coding, you have no clue
which one of the method is going to be picked in which controller class.

Cheers,
-- 
Julien Danjou
-- Free Software hacker
-- http://julien.danjou.info
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150417/576f4e05/attachment.pgp>


More information about the OpenStack-dev mailing list