Re: User defined session serialize handler
| From: | Yasuo Ohgaki | Date: | Sat, 24 Jan 2015 16:20:26 +0000 |
| Subject: | Re: User defined session serialize handler | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-81079@lists.php.net to get a copy of this message | ||
Hi Rowan,
On Sun, Jan 25, 2015 at 12:35 AM, Rowan Collins <rowan.collins@gmail.com>
wrote:
> On 24 January 2015 03:45:22 GMT, Thomas Bley <mails@thomasbley.de> wrote:
> >Sessions take a big amount of data in production systems, so it might
> >be worth to use msgpack (or others) as an option.
>
> This came up before, and it was pointed out that a fast implementation of
> something like msgpack would need to be implemented as an extension anyway,
> not userspace code. And extensions can already register a serialisation
> handler, so do not need a userspace callback; I believe igbinary implements
> this, for instance.
I agree that fast serializer should be implemented by native code.
However, once user serialize handler is implemented, overhead of user
serialize handler is calling 2 PHP functions. i.e. serialize/unserialize
functions whatever module provides. Users may compress/encrypt session data
whatever methods also. If user wants serialize/compress/encrypt, 6 PHP
functions calls are required. It would be reasonably fast. User serialize
handler provides much freedom than now.
I cannot write all possible serialize handlers users want. Therefore, I
would like to introduce user serialize handler.
Regards,
--
Yasuo Ohgaki
yohgaki@ohgaki.net