Code review comment for lp:~termie/nova/eventlet_objectstore

Revision history for this message
Jay Pipes (jaypipes) wrote :

> > Hi Andy! Good stuff.
> >
> > 1076 + mapper.connect('/',
> > 1077 + controller=lambda *a, **kw: RootHandler(self)(*a, **kw))
> > 1078 + mapper.connect('/{bucket}/{object_name}',
> > 1079 + controller=lambda *a, **kw: ObjectHandler(self)(*a, **kw))
> > 1080 + mapper.connect('/{bucket_name}/',
> > 1081 + controller=lambda *a, **kw: BucketHandler(self)(*a, **kw))
> >
> > What was the purpose of that? Seems overly complicated and I'm not sure what
> > the use of doing that was versus something like:
> >
> > root_handler = RootHandler()
> > obj_handler = ObjectHandler()
> > bucket_handler = BucketHandler()
> > mapper.connect('/', controller=root_handler)
> > mapper.connect('/{bucket}/{object_name}', controller=obj_handler)
> > mapper.connect('/{bucket_name}/', controller=bucket_handler)
> >
> > Could you please explain? Thanks!
> >
>
> Each handler has to be a new object, as this is a direct port of Tornado's
> code it expects to modify local state (through such calls as "set_header")
> rather than operate on a request object directly, and expects to have access
> to a parent application object.

Hmm, you lost me on that one...

-jay

« Back to merge proposal