[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gambas-devel
Subject:    Re: [Gambas-devel] gb.memcached
From:       Benoît_Minisini <gambas () users ! sourceforge ! net>
Date:       2012-11-27 18:57:16
Message-ID: 50B50D0C.7030803 () users ! sourceforge ! net
[Download RAW message or body]

Le 26/09/2012 14:38, Beno=EEt Minisini a =E9crit :
> Le 26/09/2012 13:59, Beno=EEt Minisini a =E9crit :
>> Le 26/09/2012 06:50, Sebastian Kulesz a =E9crit :
>>> Hi!
>>>
>>> In rev 5206 i added a memcached client. It's fully implemented and
>>> works perfect, except for one thing, i only managed to store strings
>>> :(
>>>
>>> It's not that i could not store other datatypes, in fact, it can
>>> (strings are easy to debug), but the memcached server relies in the
>>> client to send the byte size of the data it has to store, which proved
>>> to be really hard to calculate. It should be trivial to also implement
>>> other native datatypes (i.e. integers, floats, etc) with a *really
>>> big* if structure. But the problem was with arrays and collections.
>>> Although the interpreter can serialize the objects, i *previously*
>>> need to send the byte size of the blob.
>>>
>>> If you look at the code, you will see that in the Store() function i
>>> hard coded an if statement to calculate the offset based on the length
>>> of the string (using the "Binary Data Representation" wiki page [0] ).
>>> The same could be done with integers, for example, but couldn't find a
>>> way to do this for objects.
>>>
>>> My question is: Would it be possible to expose the (de)serialization
>>> functions and return the blob as an utf-8 string? It would then be
>>> trivial to implement the rest
>>>
>>> In the meantime, you are free to play only with strings ;)
>>>
>>> Thanks!
>>>
>>> [0] http://gambasdoc.org/help/cat/datarep?v3
>>>
>>
>> What's the use of memcached?
>>
>
> Other points:
>
> - As in gb.net.pop3, you must not make public symbols related to the
> underlying protocol.
>
> - Public constants must be named with the Pascal convention
> ('TheConstantName' and not 'THE_CONSTANT_NAME')
>
> Regards,
>

Did you look at that points? And can you explain quickly what is the use =

of that component? Then I will look what I can do about the =

serialization thing. :-)

Thanks.

-- =

Beno=EEt Minisini

---------------------------------------------------------------------------=
---
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Gambas-devel mailing list
Gambas-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic