User:Which Linden/Office Hours/2009 Aug 6

From Second Life Wiki
< User:Which Linden/Office Hours
Revision as of 12:01, 6 August 2009 by Which Linden (talk | contribs) (Created page with '* [11:00] ATechwolf Foxclaw: Hi which * [11:00] Which Linden: hey there! * [11:00] ATechwolf Foxclaw...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
  • [11:00] ATechwolf Foxclaw: Hi which
  • [11:00] Which Linden: hey there!
  • [11:00] ATechwolf Foxclaw: Hmm...not many here today
  • [11:00] Which Linden: the loading screen image should totally become the Snowglobe app icon
  • [11:01] ATechwolf Foxclaw: lol
  • [11:01] Which Linden: it is like way cool
  • [11:02] ATechwolf Foxclaw: They need to come up wiht a few new login screens. The ones they got are poor and low rez.
  • [11:03] Which Linden: for snowglobe, or in general?
  • [11:03] Which Linden: cause, I was recently observing how the loading screens are pretty damn decent for the mainline viewers
  • [11:04] Which Linden: I'm glad someone's paying attention to that aspect of the user experience
  • [11:04] ATechwolf Foxclaw: The login screen is just the client loading up a web page. Its just snowglobe I think points in a different web page.
  • [11:04] Which Linden: yeah
  • [11:04] Which Linden: [1] is the "normal" one
  • [11:04] ATechwolf Foxclaw: better created ones are needed.
  • [11:04] ATechwolf Foxclaw: Perhaps a few around Zindra? lol
  • [11:05] Which Linden: with little censor bars all over everything :-)
  • [11:05] Shockwave Plasma: and a note that says Here be Dragons
  • [11:05] ATechwolf Foxclaw: lol
  • [11:05] ATechwolf Foxclaw: Some Linden needs to sneak that one in
  • [11:06] ATechwolf Foxclaw: Heck, if manament wants to make a few dollors, allow creative ads there. It would be better. ;-)
  • [11:07] Morgaine Dinova: Alopha :-)
  • [11:07] Morgaine Dinova: And Aloha too :-)
  • [11:07] Which Linden: hi there morgaine, missed you last week
  • [11:07] Which Linden: nice hat
  • [11:07] Morgaine Dinova: Slept through last week, hehe. And nearly missed it again :-(
  • [11:08] Shockwave Plasma: I thinght it was an alternative to Asprin
  • [11:08] Morgaine Dinova: lol
  • [11:08] Morgaine Dinova: Keeps the rain off
  • [11:08] Which Linden: anyone been following the discussions on eventletdev?
  • [11:09] Which Linden: been pretty active lately
  • [11:09] ATechwolf Foxclaw: Can't see the hat. Text only here.
  • [11:09] Morgaine Dinova: ATech's sitting on the tiny seat, how uncivilized :-(
  • [11:10] Morgaine Dinova: Woot!
  • [11:10] Which Linden: text only SL client?
  • [11:10] ATechwolf Foxclaw: yes. Radegast.
  • [11:10] Morgaine Dinova: Thanks ATech :-))
  • [11:10] ATechwolf Foxclaw: I think "HD - Classic Balck Leather Couth" was the largert one?
  • [11:11] Which Linden: hah, so you have to specify where to sit based on names?
  • [11:11] ATechwolf Foxclaw: Wich, very handy when you dn't want to waste bandwith with textures.
  • [11:11] Which Linden: yeah, I imagine, my laptop's getting pretty hot right now
  • [11:12] Shockwave Plasma: I was using sleek for a while, until it made my inventory read only Grrrr
  • [11:12] Morgaine Dinova: Most people put their coffee mug on the table :P
  • [11:13] Morgaine Dinova: Hi Dahlia :-)
  • [11:13] Dahlia Trimble: hi :)
  • [11:14] Which Linden: good day!
  • [11:14] Which Linden: do we want to talk about eventlet today, or perhaps some other topic??
  • [11:14] Dahlia Trimble: is eventlet underclued
  • [11:15] Morgaine Dinova: Are there any timings available for eventlet?
  • [11:15] ATechwolf Foxclaw: What or who is eventlet?
  • [11:15] Which Linden: [2]
  • [11:16] Which Linden: timings? what do you mean?
  • [11:16] Morgaine Dinova: Speed and overhead benchmarks / tests / measurements
  • [11:17] Hermit Barber: Hi Dahlia.
  • [11:17] Dahlia Trimble: so now that I've trained myself to think event-driven, I dont have to?
  • [11:17] Dahlia Trimble: Hi Hermit :)
  • [11:17] Mealea Ying: it says here its quick.... and BlooKitty, you are short so dont worry about overhead
  • [11:17] Morgaine Dinova: lol
  • [11:17] Dahlia Trimble: lol
  • [11:18] Morgaine Dinova: Hiya Hermie :-)
  • [11:18] Mealea Ying: Hya Hermit!
  • [11:18] Which Linden: Morgaine: I welcome your input about how to develop such benchmarks, and what to compare them to -- I'd be interested in setting up continuous builds that ran them every time there was a change and bitched about regressions
  • [11:18] Hermit Barber: Hi everyone else rezzing slowly and not showing on the snowglobe minimap until rezzed.
  • [11:18] Morgaine Dinova: Which: oh, that's a good idea.
  • [11:19] Mealea Ying: BlooKitty, remember the FPS problem we had here? you should try it with shadows on
  • [11:19] Dahlia Trimble: I think the minimap gets it's avatar info from a different message than normal avies
  • [11:19] Morgaine Dinova: Uh oh, bad?
  • [11:19] Mealea Ying: yah I can make a pot of coffee between frames
  • [11:20] Which Linden: do shadows work on the mac yet?
  • [11:20] Mealea Ying: rollerskating is out of the question
  • [11:21] Mealea Ying: uhoh
  • [11:21] Morgaine Dinova: Which: well Enus is setting up all manner of tests using PyOGP, and is very interested in regression testing. Perhaps once there's a framework into which we can slot tests, we could add some for eventlet.
  • [11:22] Dahlia Trimble: what is LL using eventlet for?
  • [11:22] Which Linden: I think the standard in the python world for continuous builds is buildbot
  • [11:22] Which Linden: We use it for a bunch of things; server code, misc scripts, PyOGP uses it
  • [11:23] Which Linden: "networky things" encapsulates it best
  • [11:24] Morgaine Dinova: Not in the sim though, since that's C++. What kind of networky areas?
  • [11:24] Dahlia Trimble: so eventlet rather than twisted?
  • [11:24] Dahlia Trimble: or with it?
  • [11:24] Which Linden: no twisted, we have some folks here who have used twisted in the past, but they're pretty happy with not having to use it again
  • [11:24] Dahlia Trimble: lol
  • [11:24] Elric Ember: This may be of interest: [3]
  • [11:25] Which Linden: networky stuff like ; proxying requests to the proper inventory host
  • [11:25] Which Linden: god shouting to the entire grid
  • [11:25] Elric Ember: One CI server to rule them all
  • [11:25] Morgaine Dinova: Hehe
  • [11:25] Morgaine Dinova: It's official then. God uses eventlet.
  • [11:25] Elric Ember: Can simplify maintenance aspects
  • [11:25] Dahlia Trimble: so a coroutine is like a thread?
  • [11:26] Which Linden: yes, another term for coroutines is "green threads"
  • [11:26] Dahlia Trimble: oh ok
  • [11:26] Which Linden: it is like a thread but it doesn't involve any preemption, so you don't have to mess around with locks and all the other things that make threads horrible
  • [11:26] Mealea Ying: awwww BlooooKitty
  • [11:27] Elric Ember: Does python implement coroutines as threads or within them?
  • [11:27] Morgaine Dinova: Mealea: that would be me ;-)
  • [11:27] Mealea Ying: yep!
  • [11:28] Which Linden: Python itself has no coroutine implementation; eventlet uses the greenlet library, or, runs on stackless
  • [11:28] Elric Ember: ah ok
  • [11:28] Which Linden: greenlets are pretty orthogonal to threads
  • [11:28] Which Linden: it is not advisable to mess around with threads and coroutines together too much because of risk of head asplode :-)
  • [11:29] Which Linden: python threads suck anyway
  • [11:29] Elric Ember:  : D I bet
  • [11:30] Which Linden: do any of you have any "networky" applications?
  • [11:30] Latif Khalifa: networky?
  • [11:30] Dahlia Trimble: a few, but I'm no expert
  • [11:30] Morgaine Dinova: Heh, all languages suck in that area, and are desperately trying to catch up with Erlang. And failing miserably at it. :P
  • [11:30] Dahlia Trimble: well maybe not "Networky", but networky
  • [11:31] Latif Khalifa: my english parser is not up to task today lol
  • [11:31] Shockwave Plasma: couldn't progarm her way out of a paper bag, even with a handful of Contructers
  • [11:32] Latif Khalifa: what does it mean? "networky app"
  • [11:32] Dahlia Trimble's: "select()" manual page has tattered corners
  • [11:32] Elric Ember: Latif: chatty or talks alot
  • [11:33] Latif Khalifa: i think libomv counts then lol
  • [11:33] Dahlia Trimble: libomv would probably qualify lol
  • [11:33] Latif Khalifa: hahaha
  • [11:33] Which Linden: on Python threads: [4]
  • [11:33] Which Linden: definitely
  • [11:33] Latif Khalifa: yeah, we're pretty talky alright :P
  • [11:33] Dahlia Trimble: or try opensim ;)
  • [11:33] Latif Khalifa: uhm, that too
  • [11:33] Which Linden: so pyogp is kind of the python equivalent of libomv; and it uses eventlet
  • [11:34] Which Linden: it'd be lovely if we could get coroutine-based networking into the C++ code; I think there were some aborted attempts a few years ago
  • [11:35] Latif Khalifa: dahlia, btw. i rewrote the baker, have a look when you get time... i kept it managed image, didn't go system.drawing route as you suggested
  • [11:35] Latif Khalifa: Which, c# event handling is perfect for those sorts of things, have you every played with mono?
  • [11:35] Dahlia Trimble: kk
  • [11:36] Which Linden: I've not used C# at all, Latif
  • [11:36] Elric Ember: Someone might've written a C++ implementation as part of their thesis. The IEEE archives might have something
  • [11:36] Which Linden: what's so cool about the event handling?
  • [11:37] Which Linden: Elric: there's definitely C++ coroutine libraries out there
  • [11:37] Dahlia Trimble: inline delegates
  • [11:37] Latif Khalifa: enus was able to connect 300 bots to the grid using libomv from a single laptop
  • [11:37] Latif Khalifa: it performs well
  • [11:37] Dahlia Trimble: inline delegates are pretty simple to work with
  • [11:38] Which Linden: hah, as Morgaine would say, where are the benchmarks??? :-P
  • [11:38] Latif Khalifa: which, is simply beutiful :)
  • [11:38] Dahlia Trimble: libomv uses them a lot
  • [11:38] Which Linden: hm, the thing about evnetlet is you don't need delegates at all; you just write code as if it were blocking
  • [11:38] ATechwolf Foxclaw: If Radegast get multi-account support, I may use that to see how many alts I can log in at once. hehe
  • [11:38] Latif Khalifa: Which, I would not want that
  • [11:38] Which Linden: inline delegates are certainly better, but it's still "callback hell"
  • [11:38] Dahlia Trimble: Opensim uses packet pools and threadpools, kinda painful but seems to handle a lot of traffic
  • [11:39] Latif Khalifa: why callback hell?
  • [11:39] Dahlia Trimble: its an inline callback, kind of acts as a blocking request
  • [11:40] Which Linden: maybe I'm not understanding inline dllegates
  • [11:40] Latif Khalifa: in c# I could in any class/control, whereever put GridClient.OnNetworkConnect += MyFunc; then myFunc(blah blah) { Log("I am now connected") }
  • [11:40] Which Linden: so myfunc is an inline delegate?
  • [11:40] Latif Khalifa: no its not in this case
  • [11:40] Which Linden: oh, so how would that be written with inline d;legates?
  • [11:40] Latif Khalifa: but... i can have 20 functions subscribe to this event
  • [11:41] Which Linden: man I cannot seem to spell that word delegates
  • [11:41] Latif Khalifa: GridClient.OnNetworkConnect = delegate() { Log("I am connected"); }
  • [11:41] Latif Khalifa: +=
  • [11:41] Which Linden: ha, right, ok, so it's an anonymous function basically, right?
  • [11:41] Latif Khalifa: so you can add as many delegates as you want
  • [11:42] Latif Khalifa: for an event
  • [11:42] Latif Khalifa: yes, but it handles adding many of them automagically
  • [11:42] Dahlia Trimble: theres another form which waits on an inline event
  • [11:42] Elric Ember: Which: That link is a great read. Thank you
  • [11:42] Dahlia Trimble: cant remember the syntax offhand
  • [11:43] Which Linden: so the way you'd write this using coroutine based networking is GridClient.connect(); Log("I am connected");
  • [11:43] Which Linden: if you want a bunch of callbacks (which is, btw, a very uncommon use case in my experience), just do a for loop
  • [11:43] Which Linden: for callback in callbacks { callback() }
  • [11:44] Which Linden: the common use case is way shorter, and the multi-callback use case is clearer, too
  • [11:44] Latif Khalifa: if you are making a gui app., its quite common to have many many delegates invoked per single event
  • [11:44] Which Linden: yeah, GUI programming is pretty different than network programming
  • [11:44] Latif Khalifa: i want to disable buttons, change caption text, close logs, etc etc when i get disconnected from the grid for istance
  • [11:45] Which Linden: GUI programming makes more sense when written event-driven
  • [11:45] Which Linden: but networking is not thus
  • [11:45] Latif Khalifa: network does too, especially for SL protocol
  • [11:45] Which Linden: a common use case is "make one http request, then, based on the results, make one or two more"
  • [11:46] Latif Khalifa: GridClient.Self.OnImReceived += do stuff
  • [11:46] Which Linden: i think we're approaching this from different sides
  • [11:46] Which Linden: definitely the GUI code that responds to events should be callback-based where appropriate
  • [11:46] Dahlia Trimble: RequestLogout(); if (!logoutEvent.WaitOne(Client.Settings.LOGOUT_TIMEOUT, false)) Shutdown(DisconnectType.NetworkTimeout);
  • [11:47] Dahlia Trimble: theres an example
  • [11:47] Morgaine Dinova: All a bit pathetic compared to Erlang processes, where you can happily run millions in parallel if you have the memory. That's one area in which all other languages are wannabes.
  • [11:47] Latif Khalifa: erlang is written in erlang then i suppose, not is some other pathet wannabe language as C?
  • [11:47] Which Linden: but it's much easier to write stuff as "result1 = httprequest(url); if result1.foo: httprequest(url2) else: httprequest(url3); httprequest(url4)
  • [11:48] Which Linden: with callbacks the above snippet would be...ugh, more than I want to type
  • [11:48] Dahlia Trimble: lol
  • [11:48] Dahlia Trimble: it all pays the rent I guess ;)
  • [11:48] Which Linden: heh :-)
  • [11:49] Which Linden: inline delegates are better, though, for sure, because they're at least closures
  • [11:49] Which Linden: in C++ you have to pack all your state up into a struct and stick it in the callback object
  • [11:49] Latif Khalifa: well writting event driven code seems strange at first but i think its perfect for implementing protocols like SL protocol
  • [11:50] Latif Khalifa: there are hundreds of different things that can happen
  • [11:50] Dahlia Trimble: SL™ protocol is all event driven anyway
  • [11:50] Latif Khalifa: yes
  • [11:50] Which Linden: I think the SL protocol was originally developed under the constraints of C++, now that we're moving to capabilities it will start looking less and less event-driven
  • [11:51] Latif Khalifa: event queue is also perfect for implemeting it firing off events
  • [11:51] Dahlia Trimble: gotta run... tc all :)
  • [11:51] Elric Ember: tc
  • [11:52] Morgaine Dinova: Which: did your message queueing evaluation go beyond that document you showed us? Any final conclusions?
  • [11:52] Latif Khalifa: libomv is basically a network layer that gets and decodes udp and caps messages, and fires off events that your app them might want to decide to handle
  • [11:52] Morgaine Dinova: Cyu Dahlia
  • [11:52] Latif Khalifa: such us OnInstantMessageReceived or on OnLoggedIn
  • [11:52] Which Linden: Morgaine: well we've ben trying to come up with architectures that get around the limitations of the various packages, but in general, no, no progress
  • [11:52] Morgaine Dinova: nods
  • [11:53] Which Linden: Latif: yeah, certainly client libs that use liomv should be event-driven, but libomv itself might be cleaner and easier to maintain if it were written using coroutine-based networking
  • [11:54] Latif Khalifa: it could... we implement it using c# ThreadPools for packet capturing, decoding, which is more in line how you would implement it in c/c++
  • [11:55] Which Linden: oh yeah, I bet C# threads are decent for that sort of thing
  • [11:56] Latif Khalifa: yes, and they are easy to program compared to say pthreads... the runtime takes care of assiging them to different processors, etc, which is also configurable
  • [11:57] Which Linden: yeah, the only advantage coroutines have over well-implemented language threads is that they are somewhat faster
  • [11:57] Which Linden: (if well-implemented themselves)
  • [11:58] Latif Khalifa: yes, thread startup/teardown does have significat cost
  • [11:59] Which Linden: I guess we agree! :-)
  • [11:59] Which Linden: Time for me to head for lunch.
  • [11:59] Which Linden: Thanks for your time and thoughts
  • [11:59] Latif Khalifa: hehe, take care Which
  • [11:59] Elric Ember: For performance, logging when context switches or GIL contentions occur could help
  • [11:59] Morgaine Dinova: Cya Which
  • [11:59] Elric Ember: tc
  • [11:59] Which Linden: Have a wonderful day!