User:Zero Linden/Office Hours/2007 Sep 06
Jump to navigation
Jump to search
Transcript of Zero Linden's office hours:
[8:12] | Zha Ewry: | Hark. Zero. A cafeinated Zero. |
[8:12] | Saijanai Kuhn: | sure, but if Apple could use an optimized pipelines for games programming, it would free up resources for other things. Assuming that that would fix the problem, of course |
[8:12] | Saijanai Kuhn: | WELL-caffinated, one asumes |
[8:12] | Zero Linden: | yes - cafeinated, and finally logged-in! |
[8:13] | Tedd Maa: | OS X is still BSD based, these things take time |
[8:13] | Tedd Maa: | going from BSD to a fully fledged multimedia OS is no small task |
[8:13] | Zero Linden: | ya know, 18 months ago - every blip in operations caused most of us in dev to get involved |
[8:13] | Saijanai Kuhn: | OS X is likely always going to be FreeBSD based. The former chieft-tech officer helped design BSD IIRC |
[8:13] | Zero Linden: | now - there are so many people, that it isn't useful for us all to jump on it |
[8:13] | Zero Linden: | so - ops folks were on it and all I did was watch from the sidelines |
[8:14] | Saijanai Kuhn: | this sounds like a drastic improvement, at least for your home life |
[8:14] | Tedd Maa: | BSD in its pure form is useless for videos/high end games |
[8:14] | Saijanai Kuhn: | I'm pretty sure that Avie helped redesign it at least somewhat to target that market |
[8:15] | Saijanai Kuhn: | at least you're not ruthed this time, Aha |
[8:15] | Saijanai Kuhn: | Zha |
[8:15] | Zha Ewry: | Sigh. |
[8:15] | Tedd Maa: | ping |
[8:15] | Zero Linden: | pong? |
[8:16] | Tedd Maa: | hurray :) |
[8:16] | Zero Linden: | well- alas, I've got to go at 8:30 - waaaay busy day |
[8:16] | Zha Ewry: | So... Quick question zero.. Just becausde I'm curious. |
[8:16] | Saijanai Kuhn: | Zero, I've been playing with teh GUI classes. I think you're slightly wrong about the xml being too closely tied to the client, but there's sure some NASTY dependencies in the classes themselves |
[8:16] | Zha Ewry: | When I see (Hippos) as an active friend, (and no others) which part of the process had flaked out? |
[8:17] | Zero Linden: | hehe - (Hippos) |
[8:17] | Tedd Maa: | well, it beats Nullsofts Lama fetish |
[8:18] | Zero Linden: | that's what I get for trying to be cute |
[8:18] | Saijanai Kuhn: | someone pointed to me this HUGE thread about hippos. 600+ messages |
[8:18] | Zero Linden: | control-shift-alt-H = hippos! |
[8:18] | Zero Linden: | small easter egg in code base |
[8:18] | Zero Linden: | but control-shift-H = Go Home |
[8:18] | Zero Linden: | don't slipp |
[8:18] | Zha Ewry: | Oh my. |
[8:18] | Zha Ewry: | yes, it does. |
[8:18] | Zero Linden: | so (Hippos) as a name isn't actually a failure |
[8:19] | Saijanai Kuhn: | htat's hippocritical, ZEro |
[8:19] | Zero Linden: | Regions deal with avatar ids, which are 128bit UUIDs |
[8:19] | Zha Ewry: | Well, presumbably, it's some placeholder or another. |
[8:19] | Zero Linden: | the mapping of a UUID to a name is a database lookup |
[8:19] | Saijanai Kuhn: | actually, what I read says there's a 1% chance of it happening at random as a joke |
[8:19] | Zero Linden: | so there is a name cache object in the sim (actually, same class is in the viewer) |
[8:19] | Zero Linden: | that lets other code do something like this: |
[8:20] | Zero Linden: | gNameCache.getName(someID, callback); |
[8:20] | Zero Linden: | wehre the callback is like foundName(agentId, firstname, lastname) |
[8:20] | Zero Linden: | so what happens is, something wants the name |
[8:21] | Zero Linden: | and the name cache doesn't have it, so it calls the call back immediatly with "(waiting)" |
[8:21] | Zha Ewry: | Right, which we also see. |
[8:21] | Zero Linden: | and then later calls it with "Amy Beta" |
[8:21] | Zha Ewry: | From time to time you see (waiting) as a friend |
[8:21] | Zero Linden: | the "(hippos)" version is just a random replacement for "(waiting)" for amusement only |
[8:21] | Zero Linden: | just a string swap |
[8:21] | Zero Linden: | NOW |
[8:21] | Zero Linden: | for debatebale reasons |
[8:21] | Tedd Maa: | FYI its possible to run viewer over terminal server if you start SL before you log on |
[8:22] | Zero Linden: | the name cache offers another API |
[8:22] | Zha Ewry: | Soemtimes, often I get (hipppos) and (waiting) back to back and no live friends. |
[8:22] | Zero Linden: | gNameCache.getName(agnetId, &firstName, &lastName) |
[8:22] | Zero Linden: | see the problem with that? There is no way to update the caller |
[8:22] | Zha Ewry: | Right. |
[8:22] | Zha Ewry: | So.. if iti isn't in the cache, you DOA, if you use that call |
[8:23] | Zero Linden: | Alas, this an impedence mis-match with imperative languages and network programming |
[8:23] | Zha Ewry: | unless you inspect the result, and retry yourself, and all. (Which implied you know the strings which repreent bad result.. which.. ick) |
[8:23] | Zero Linden: | one assumes you can always deliver the correct answer right now, the other assumes you might get around to it at some point |
[8:24] | Zero Linden: | This forces application programs to constantly code in a sort of continuation passing style (the callback) in a language that doesn't really support it too well |
[8:24] | Zero Linden: | (C++) |
[8:24] | Zero Linden: | Zha - fortuently noone (that I know) inspects the strings |
[8:24] | Zha Ewry: | Right.. And.. that's pervasive in the code, it seems, which probably is unavaoidable |
[8:24] | Zero Linden: | if they use the "short cut" call, they get what they ask for - a non-updating answer |
[8:25] | Zero Linden: | The whole thing is annoying - since think of all the places in the viewer you want to display a name |
[8:25] | Zero Linden: | everyone of those has to code this kind of continuation style |
[8:25] | Zero Linden: | and then you have to deal with - well, here's the call back, but, er, what if the user closes the thing displaying the name before the answer comes back? |
[8:26] | Zero Linden: | so, it also begs for weak pointers |
[8:26] | Zha Ewry: | Does the immediate response give you a return indicating if it found a name? |
[8:26] | Tedd Maa: | event hooks then |
[8:26] | Zha Ewry: | Event hooks are just another form of continuatoin.. the same issue, of what happens, if the reason for the callback went away, obtains. |
[8:26] | Zero Linden: | no, Zha |
[8:27] | Zha Ewry: | Ah. So you can't even say "Got it, I don't need the continuation.." sigh. |
[8:27] | Zero Linden: | Tedd - the problem with event hooks is that then you must create an event for every possible callback and they all must go through the same system - and usually type |
[8:27] | Zero Linden: | so it is a global design bottle neck |
[8:27] | Tedd Maa: | yes, but less code - hook up, place request - if object goes away hook is removed (with GC or on obj dispose) and reply ignored |
[8:28] | Zha Ewry: | Messier framework code, tho. |
[8:28] | Zero Linden: | not to mention, then you have to do some form of event registration or you're distributiong too many around |
[8:28] | Tedd Maa: | breaks your standard code, but it works... |
[8:28] | Saijanai Kuhn: | this is SL. Framework mess worries? er... |
[8:28] | Zha Ewry: | Since.. you now have to manage the creation and destruction under threadsafe locks, and all. |
[8:29] | Zero Linden: | at which point, Tedd, it is about the same as registering and unregistering the callback |
[8:29] | Zero Linden: | which the name cache supports |
[8:30] | Zha Ewry: | So, will you be in SF, on Thursday next? |
[8:30] | Zha Ewry: | (Err, that was aimed at Zero) |
[8:30] | Zero Linden: | In much of the HTTP code we use this sort of paradigm: create an instance of a subclass of a HTTPResponder and hand it |
[8:30] | Tedd Maa: | as so often, no easy way around it .. point is time, you can't execute sequenced code but skip through commands that use time |
[8:31] | Zero Linden: | to the HTTP client class for making some request. When the answer comes back from the server, invoke a result() method on the object |
[8:31] | Zero Linden: | or an error() method if something goes wrong |
[8:31] | Tedd Maa: | Im about to implement HTTP object in OpenSim LSL engine |
[8:31] | Tedd Maa: | fun programming |
[8:31] | Zero Linden: | that instance generally keeps ref-counted pointers to the things it needs. If something changes while the request is out so that we don't need the info any more |
[8:32] | Zero Linden: | we just set a state bool in the reponder instance so that when it gets it's result() or fail() it just returns |
[8:32] | Zero Linden: | Yes |
[8:32] | Zero Linden: | So, Zha, yes - I'll be in SF next Thursday, and there will be no office hours |
[8:32] | Zero Linden: | here |
[8:33] | Zha Ewry: | Well, I'll cheat, and see you there, then |
[8:33] | Zero Linden: | the rest of you - keep an eye on the wiki |
[8:33] | Saijanai Kuhn cries. But my Zero fix. What about my zero fix? | |
[8:33] | Squirrel Wood: | POKE!!!! |
[8:34] | Zero Linden: | starting next Thursday I'm going to be talking in much greater detail about coming architectural changes in the next year |
[8:34] | Zha Ewry: | Heh. I went cold turkey for two weeks while on Vacation. |
[8:34] | Squirrel Wood: | I need your vote on https://jira.secondlife.com/browse/MISC-632 :p |
[8:34] | Zero Linden: | in fact, LL is going to solicit lots of input from the community on it |
[8:34] | Saijanai Kuhn needs to start reading up on server architecture. Actually, needs to finish reading that INTRO to servers he's got inn a box someplace | |
[8:34] | Zero Linden: | This will all be of a very techinical nature - not picking UI features |
[8:34] | Squirrel Wood: | /ao on |
[8:35] | Zero Linden: | more like - here are 100 different protocols in the system, help us revamp them for going over web services |
[8:35] | Tedd Maa: | "Modern Operating Systems" is a good book to read |
[8:35] | Zha Ewry: | Much more peverse stuff, such as the proper nature of annotating REST based servcie endpoints :-) |
[8:35] | Tedd Maa: | one of the best I've read |
[8:35] | Saijanai Kuhn: | OK. Who is it by? |
[8:35] | Squirrel Wood: | 100 protocols... reduce them to one ^^ |
[8:35] | Tedd Maa: | Tanenbaum |
[8:35] | Saijanai Kuhn: | Think I have that one. Xenix, right? |
[8:35] | Zero Linden: | Squirrel -there are about 400~500 messages in the Second Life system |
[8:36] | Tedd Maa: | it goes over common hardware/OS+some exotic in great detail |
[8:36] | Zero Linden: | the comprise somewhere between 200 to 300 functions the system performs.... each of which can be thought of as a protocol -- in the pure sense |
[8:36] | Zero Linden: | you might perfer to think of them as APIs |
[8:36] | Zero Linden: | or as functions |
[8:36] | Zero Linden: | but really all the same thing |
[8:36] | Zha Ewry: | Contracts? |
[8:36] | Saijanai Kuhn: | I'm still hunting for the code that handles llSetText 's hover text. |
[8:36] | Zha Ewry: | Yeah, all the same in the end. |
[8:36] | Squirrel Wood: | Oy |
[8:36] | Zero Linden: | That too |
[8:37] | Zero Linden: | SL is complex, no doubt, and rich in functions |
[8:37] | Squirrel Wood: | wrap them into one protocol where the header tells what kind of "decoder" is needed for the payload data |
[8:37] | Saijanai Kuhn: | and rich it compexity too |
[8:37] | Saijanai Kuhn: | rich in* |
[8:37] | Zero Linden: | Squirrel |
[8:37] | Zero Linden: | yes, the bottom layers of the protocol stack will be shared |
[8:37] | Zero Linden: | from bottom to top: |
[8:37] | Squirrel Wood: | :) |
[8:38] | Zero Linden: | IP - TCP - HTTP - LLSD |
[8:38] | Zha Ewry: | But. the real meat is in the contract that happens as you unwrap that next level up. |
[8:38] | Zero Linden: | so now we just need to design the URL endpoints (one per function, probably) and the LLSD payloads of both the request and the response |
[8:38] | Zero Linden: | for about 200 to 300 features |
[8:38] | Saijanai Kuhn: | will the revision be able to handle "peer2peer" communciations as well on the client side? |
[8:38] | Zero Linden: | and then we're done |
[8:38] | Zha Ewry: | LOL |
[8:38] | Zero Linden: | well.... except for the implementation part |
[8:39] | Zero Linden: | No, the new architecture doesn't really handle peer to peeer at all-- |
[8:39] | Zha Ewry: | and desctribe the idempotency of each call, the lifecylcle of all the resources, the relationship between modified versions of resources. |
[8:39] | Squirrel Wood: | beer-2-beer... ^^ |
[8:39] | Saijanai Kuhn: | a long-term need though, I think |
[8:39] | Zero Linden: | since most users are on asymetric network connections: both upload is lower, and due to firewalls and NAT, you can't connect in |
[8:40] | Squirrel Wood: | What about torrent ? |
[8:40] | Saijanai Kuhn: | Private sandboxes, collaborative computation, etc... |
[8:40] | Zero Linden: | The later being the biggest problem |
[8:40] | Zero Linden: | well, torrent requires that savvy users modify their firewalls |
[8:40] | Zero Linden: | and, well, my mother can't do that! |
[8:40] | Zha Ewry: | Chuckle. |
[8:40] | Zero Linden: | Nor can many corporate users |
[8:41] | Zero Linden: | Nor should most home users |
[8:41] | Saijanai Kuhn is still working on hosting a test apache server that can communciate with SL from his mac | |
[8:41] | Zero Linden: | (lemme just open up this fireall thingy on my cabel modem box..... Port? I dunno - just all of 'em I guess..... ) |
[8:41] | Tedd Maa: | well, there is a hole in the firewalls and routers |
[8:41] | Tedd Maa: | UDP |
[8:41] | Saijanai Kuhn: | firewall + NAT. Only recently learned what NAT meant |
[8:41] | Squirrel Wood: | Well, I for once cannot connect to SL at all from work because SL doesn't honor proxy settings defined in IE for example. |
[8:41] | Tedd Maa: | you can specify source/destination port and hence establish a session with ayone |
[8:42] | Zero Linden: | Tedd, not usually, UDP only works in if you speak out on it in most routers |
[8:42] | Tedd Maa: | as long as you can negotiate th eports first |
[8:42] | Zero Linden: | and even then it is dicey - believe me, weh know! |
[8:42] | Tedd Maa: | both speak out the first time, as long as ports match the session is established |
[8:42] | Tedd Maa: | then both can communicate |
[8:42] | Squirrel Wood: | got a router and firewall here. both are still using the out-of-the-box settings. torrents work flawlessly. |
[8:42] | Zha Ewry: | Sometimes.. |
[8:42] | Zero Linden: | Tedd, yes, there are tricks that VOIP uses ... but having read the technical details, I'm not fond of the idea of implementing such |
[8:43] | Zero Linden: | and really, we don't have a big use case for peer to peer right now |
[8:43] | Saijanai Kuhn: | the voice server stuff took a while to get right |
[8:43] | Tedd Maa: | no, not advocating that .. ;) |
[8:43] | Zero Linden: | for example, there is little that peer to peer would do to enahcne this experience we are sharing |
[8:43] | Zha Ewry: | peer to peer, in a deep sense, also has interesting state melding issues |
[8:43] | Squirrel Wood: | UDP is often blocked entirely in company networks |
[8:43] | Saijanai Kuhn: | for most users, absolutely |
[8:43] | Tedd Maa: | just saying, UDP CAN be used to overcome router/firewall problems |
[8:43] | Saijanai Kuhn: | but some scientific users might find the collaborative computation of value |
[8:43] | Zero Linden: | Well, firends - sorry due to SL borkage today's was short - but I've already got to go |
[8:43] | Tedd Maa: | I have written a prototype app and testet it, it works |
[8:43] | Saijanai Kuhn: | and I still want to play in my private sandbox with a few friends |
[8:44] | Zha Ewry: | Glad you made it at all. |
[8:44] | Saijanai Kuhn: | thanks very much for coming, Zero |
[8:44] | Zero Linden: | I'll be here Tuesday.... |
[8:44] | Zha Ewry: | Saijanai.. you may still be better off putting up a private sim, |
[8:44] | Zero Linden: | till then |
[8:44] | Zha Ewry: | then doing that peer to peer |
[8:44] | Tedd Maa: | bye |