[Developers] Write grammar questions: question 4 -- when are links inserted?
David Flanagan
david at davidflanagan.com
Wed Jun 4 21:16:43 UTC 2008
Tim,
Thank you for this very clear explanation. I think it means that I'll
have to add cookie handling to the metaweb.py module that I develop in
my MQL documentation. I think I've got some examples near the end of
the last chapter that do writes followed by reads, and unless python's
urllib2 is automatically handling cookies for me (which I don't think it
does) those examples won't work anymore...
David
Tim Kientzle wrote:
> David,
>
> The mwLastWriteTime cookie is an innovation that we've come up with to
> try to balance the performance requirements of most read-only users
> with the need for users who are making changes to see immediate
> response to their changes. This is handled through a special cookie
> that works transparently for most users but does occasionally confuse
> developers:
>
> * The mwLastWriteTime cookie is updated automatically by the
> Freebase.com server whenever you write (including mqlwrite,
> interactive client, blob upload, or otherwise). As long as you're
> working with a single application that tracks cookies (either a
> browser or another application), you will read the results of your own
> writes.
>
> * By default, we cache pretty aggressively. If you don't have a
> suitable cookie, we'll provide cached results if we can. This gives
> faster responses to the majority of users who are readers. Our cache
> timeouts vary depending on the particular request, but about 1 hour is
> typical.
>
> * The only case where you'll see inconsistencies is if you have two
> applications. For example, people see this when they do writes from a
> script and then try to see the results in their browser (or vice
> versa). The problem here is that the script will get an updated
> cookie, but the browser has an old cookie.
>
> * You can always get an up-to-date cookie from the "touch" service: /
> api/service/touch. In the Freebase.com web GUI, press 'F8' to bring
> up the developer toolbar and click 'Refresh cache' to update your
> cookie.
>
> * We use a cookie instead of an envelope parameter because the value
> needs to be set by and visible to the server. Only cookies support
> this style of usage.
>
> * The contents of the cookie are determined by the server and are
> subject to change. Please do not try to synthesize it yourself.
> (Even today, the cookie actually has more information than just a
> timestamp; if you just synthesize a timestamp, you risk getting some
> very strangely inconsistent results.)
>
> Let me know if this isn't clear enough.
>
> Cheers,
>
> Tim Kientzle
>
>
>
> On Jun 3, 2008, at 12:44 PM, David Flanagan wrote:
>
>> Will M: Could you clarify this for the rest of the list? I can't find
>> much documentation for this cookie. What is the right thing to do
>> with
>> it when writing apps that are not browser-based? Should we always
>> insert a synthetic cookie with the current time into our mqlread
>> requests? Or will the absence of the cookie ensure that we get the
>> lastest results?
>>
>> And why is this a cookie rather than an envelope parameter, anyway?
>>
>> David Flanagan
>>
>> Will Fitzgerald wrote:
>>> Will Moffat said it was that the 'mwLastWriteTime' cookie wasn't
>>> being
>>> updated locally. He was right.
>>>
>>> Dr. Documentation, if you're reading this, -- can you put this on
>>> your list of things to document?
>>>
>>> Will F.
>>>
>>> On 6/3/08, Will Fitzgerald <will.fitzgerald at pobox.com> wrote:
>>>> Using my own Ruby code, I'm trying to insert type links, but I'm
>>>> wondering what, if anything, I'm doing wrong.
>>>>
>>>> For example:
>>>>
>>>> http://pastie.caboo.se/207795
>>>>
>>>> It appears, although the link looks like its being updated, the link
>>>> isn't yet live to the final query. If I do the same list of
>>>> actions on
>>>> the web-based MQL editor, there is no problem. Is there some
>>>> difference with authenticating changes between the web-based editor
>>>> and client software?
>>>>
>>>>
>>>>
>>>> --
>>>> Will Fitzgerald
>>>> weblog: <http://www.entish.org/willwhim>
>>>> Stop US torture: <http://www.unsubscribe-me.org>
>>>>
>>>
>> _______________________________________________
>> Developers mailing list
>> Developers at freebase.com
>> http://lists.freebase.com/mailman/listinfo/developers
>
> _______________________________________________
> Developers mailing list
> Developers at freebase.com
> http://lists.freebase.com/mailman/listinfo/developers
>
More information about the Developers
mailing list