[Twisted-Python] AmpList: length limitations

Vlad Shevchenko vlad.shevchenko at gmail.com
Wed Mar 31 16:04:08 MDT 2010


Why does not serialize each AmpBox separately?

On Thu, Apr 1, 2010 at 12:45 AM, <exarkun at twistedmatrix.com> wrote:

> On 03:54 pm, vlad.shevchenko at gmail.com wrote:
> >Hi all!
> >
> >    Stuck with AmpList again :( Im trying to send/retrieve data much
> >larger
> >then 64K and choose AmpList cause it "Convert a list of dictionaries
> >into a
> >list of AMP boxes".
> >
> >My original data looks like a long list of dicts [ {1}, {2}, ..., {x}
> >].
> >I convert it to [
> >    {'data': 'json encoded 1,2 dicts'},
> >    {'data': 'json encoded 3,4 dicts}',
> >    ...
> >] hoping EACH element in converted list will be converted to AmpBox and
> >retriever on wire.
> >
> >However, still got TooLong exception on AmpBox.serialize(). AmpBox
> >trying to
> >serialize all my converted list but not each dict in it separately.
> >
> >Does this behavior ok, or this is a bug?
>
> When you use an AmpList, the value is still serialized as a single key's
> value string, so the 64k limit still applies, even if it has sub-
> structures of its own, none of which exceed the limit.
>
> At the Twisted sprint hosted by Flumotion last weekend, some people were
> working on adding real streaming support to AMP.  I think most of the
> progress made was in understanding how the implementation should work,
> though.
>
> The associated ticket is #2529.
> >
> >--
> >WBR, Vlad
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>



-- 
WBR, Vlad Shevchenko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20100401/a0cbdb03/attachment.html>


More information about the Twisted-Python mailing list