<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://159.203.101.162/w/index.php?action=history&amp;feed=atom&amp;title=Dev_Meeting_Log_20090815</id>
	<title>Dev Meeting Log 20090815 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://159.203.101.162/w/index.php?action=history&amp;feed=atom&amp;title=Dev_Meeting_Log_20090815"/>
	<link rel="alternate" type="text/html" href="http://159.203.101.162/w/index.php?title=Dev_Meeting_Log_20090815&amp;action=history"/>
	<updated>2026-04-09T11:03:23Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.1</generator>
	<entry>
		<id>http://159.203.101.162/w/index.php?title=Dev_Meeting_Log_20090815&amp;diff=3524&amp;oldid=prev</id>
		<title>Tom Parker: Created page with &quot; ==Summary== * The PlayerCharacter object will be broken into facets  * Facets draw in events from the graph and share updates with events  * Facets operate with a global cach...&quot;</title>
		<link rel="alternate" type="text/html" href="http://159.203.101.162/w/index.php?title=Dev_Meeting_Log_20090815&amp;diff=3524&amp;oldid=prev"/>
		<updated>2014-02-19T00:54:18Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; ==Summary== * The PlayerCharacter object will be broken into facets  * Facets draw in events from the graph and share updates with events  * Facets operate with a global cach...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
==Summary==&lt;br /&gt;
* The PlayerCharacter object will be broken into facets &lt;br /&gt;
* Facets draw in events from the graph and share updates with events &lt;br /&gt;
* Facets operate with a global cache and have a character ID passed in so that they know what they are operating on &lt;br /&gt;
* Wiring up should be compatible with Spring, but we probably should put together an example to show people the difference in something they can poke at&lt;br /&gt;
 &lt;br /&gt;
==Transcript==&lt;br /&gt;
 &lt;br /&gt;
[08:02] *** #pcgen: [Code_SB]james karianna cpmeister [Arch_SB]thpr DrewM @Zaister&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:07] [Arch_SB]thpr: by the way, can I assume everyone has read the PlayerCharacter design changes thread?&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:08] Zaister: skimmed it&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:08] Zaister: bringin it up now :&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:08] [Arch_SB]thpr: http://tech.groups.yahoo.com/group/pcgen_developers/message/86&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:08] [Arch_SB]thpr: for anyone who wants to pull up the thread&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:08] Zaister: thx&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:12] [Arch_SB]thpr: so the background here is that we wanted to walk through a discussion around how we structure PlayerCharacter going forward&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:13] [Arch_SB]thpr: Currently, PlayerCharacter is pretty monolithic, and somewhere on the order of 20K lines&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:13] [Arch_SB]thpr: I find that unwieldy&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:13] [Code_SB]james: That's an understatement!&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:13] [Arch_SB]thpr: I also think there are some other characteristics it would be nice to migrate away&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:13] [Arch_SB]thpr: such as the universal setDirty system&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:14] karianna: oh god yes please&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:14] [Code_SB]james: :)&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:14] [Code_SB]james: Oddly enough that one doesn't bopther me so much&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:14] cpmeister: aye to that&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:14] Zaister: oh yes&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:14] [Arch_SB]thpr: to do that, we need to migrate to something that has a more &amp;quot;fine-grained&amp;quot; control&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:15] [Code_SB]james: We will need to have a change notification system of some form&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:15] [Code_SB]james: yes&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:15] [Arch_SB]thpr: absolutely&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:15] [Arch_SB]thpr: so I think that leads to starting from the Graph structure and looking at what it has/does&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:15] [Arch_SB]thpr: basically the graph serves a few purposes&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:16] [Arch_SB]thpr: stores what the PC has access to&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:16] [Arch_SB]thpr: (theoretical information like LANGBONUS)&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:16] [Arch_SB]thpr: stores what the PC has granted to it (e.g. AUTO:FEAT)&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:16] [Arch_SB]thpr: and includes the source of what granted the information (relevant for things like REMOVE:FEAT|CLASS.Fighter)&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:17] [Arch_SB]thpr: therefore some simple tests, like presence, we dont' need to worry too much about&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:17] [Arch_SB]thpr: the Graph knows that info&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:17] [Arch_SB]thpr: it is more complicated things that we need to address how they work&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:17] [Arch_SB]thpr: and we need to account for interdependency&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:18] [Arch_SB]thpr: The example that I used in the note and that I think is valuable as a simple walkthrough is HANDS&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:18] [Arch_SB]thpr: it needs to know Templates and Race&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:18] [Arch_SB]thpr: and if either of those change&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:18] [Arch_SB]thpr: (assume for a moment that the HandsFacet doesn't cache - we can come back to that)&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:19] [Arch_SB]thpr: My initial assertion is that the Graph can fire changes out of the graph in a listener/event system&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:19] [Arch_SB]thpr: There is already a GraphChangeMonitor class in the cdom branch, so that code exists&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:19] [Arch_SB]thpr: there can then be facets for each of the &amp;quot;native&amp;quot; objects (RaceFacet, TemplateFacet) that track the graph&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:19] [Arch_SB]thpr: and can store the actual items (and notify other facets of changes)&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:20] [Arch_SB]thpr: any thoughts/concerns/questions so far?&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:21] [Code_SB]james: No problems so far&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:21] [Arch_SB]thpr: ok&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:21] cpmeister: question&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:21] [Arch_SB]thpr: fire&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:22] cpmeister: do these facets send events for everything or can they be tuned for specific things? Like rather than recieving all changes they can just recieve changes such as removal or additions&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:22] cpmeister: asuming this is listening to a LIST&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:23] [Arch_SB]thpr: there are 2 event systems (using event loosely for a moment)&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:23] [Arch_SB]thpr: assuming we use the event/listener system that already exists, the graph would fire a change to all of the listeners (which would be a dozen or so base object facets) whenever the graph gained or lost a node or edge&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:24] [Arch_SB]thpr: (I think you can actually listen separately, so they would really only monitor the node changes)&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:24] [Arch_SB]thpr: the individual facets, TemplateFacet, for example, would then have to check if the change was a Template&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:24] [Arch_SB]thpr: and would ignore the message if not a template&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:24] cpmeister: ok, I was just trying to get an idea of how much of the UI facade structure is salvagable&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:25] [Arch_SB]thpr: if it was a template, then it would send an add/remove message to others&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:25] [Arch_SB]thpr: I would assume the TemplateList could implement ListModel&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:25] [Arch_SB]thpr: so you could attach to it that way in the UI&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:26] cpmeister: ok, good, that answers my questions :)&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:26] [Arch_SB]thpr: err, I meant TemplateFacet&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:26] [Arch_SB]thpr: yea, not trying to throw away the UI discussions we had Connor&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:27] cpmeister: np&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:27] karianna: OK, I'm happy so far....&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:27] [Code_SB]james: and that facade system looks like it will work fairly well based on the playing around I have done so far&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:28] [Arch_SB]thpr: so the second event system is coming out of the TemplateFacet into the other facets&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:28] [Arch_SB]thpr: I use event loosely here&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:28] [Arch_SB]thpr: because it may more properly be producer/consumer&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:30] [Arch_SB]thpr: I think we should have in our mind that the facets may be running in separate threads&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:31] [Arch_SB]thpr: but basically a TemplateFacet might send an event of a new (or removed) Template&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:31] [Arch_SB]thpr: the HandsFacet could then use that to recalculate the # of hands on the PC&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:31] [Arch_SB]thpr: obviously for some facets, they will draw on more complicated structures&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:32] [Arch_SB]thpr: there will be a BonusFacet that is responsible for tracking BONUS objects&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:32] [Arch_SB]thpr: it subscribes to all of the &amp;quot;native&amp;quot; facets and extracts BONUSes&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:33] [Arch_SB]thpr: if no questions, I'll drop in a discussion of caching in the facets&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:33] [Arch_SB]thpr: I think it's fair to say a facet should cache&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:34] [Arch_SB]thpr: there are things we have that are pretty complex calculations that we don't want to reproduce unless the underlying data changes&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:34] [Arch_SB]thpr: this leads to local vs global cache&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:34] [Arch_SB]thpr: local may be easier from a standpoint of coding a single facet&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:35] [Arch_SB]thpr: tends to eliminate casting&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:35] [Arch_SB]thpr: however has some poor side effects&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:35] [Arch_SB]thpr: couldn't be reused among 2 PCs&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:35] [Arch_SB]thpr: so if someone has a whole party loaded, we end up with N copies of that facet in memory&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:35] karianna: Which would be especially bad for gms&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:35] [Arch_SB]thpr: also couldn't be reused if we try to get PCGen running on a web server, since local state is a big no-no in a web environment&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:36] [Arch_SB]thpr: so while I like some of the characteristics of local&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:36] [Arch_SB]thpr: the side effects are too big for me to really accept that as the best option&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:36] [Code_SB]james: Agreed&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:37] [Arch_SB]thpr: that leads to how the cache is accessed&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:37] [Arch_SB]thpr: I suspect this has to be a property of events that are flying around&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:37] [Arch_SB]thpr: we certainly dont' want a call to Globals. or anything&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:38] [Arch_SB]thpr: and if changes are triggered by events, then the event needs to know the PC that is being processed&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:38] [Arch_SB]thpr: or at least the cache of that PC&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:38] [Code_SB]james: Or a character id has to be associated with the event to allow the facet to look up the right cache object&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:39] [Code_SB]james: That then decouples the cache implementation from the events, which I think is desirable&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:39] [Arch_SB]thpr: is there an advantate to using an ID vs. passing around the cache&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:39] cpmeister: um, you lost me&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:39] [Arch_SB]thpr: in how the cache is accessed, Connor?&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:40] cpmeister: are you sending events out WHILE the PC is being changed?&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:40] [Arch_SB]thpr: let me do a walkthrough assuming we're processing Hands&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:40] [Arch_SB]thpr: user adds a Template to the PC&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:40] [Arch_SB]thpr: this technically adds a Template object (with a link to the root) to the PlayerCharacter Graph&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:41] cpmeister: k&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:41] [Arch_SB]thpr: err, should be precise, &amp;quot;link&amp;quot; in this case is an edge originating at the root&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:41] [Arch_SB]thpr: and leading to the PCTemplate&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:41] [Arch_SB]thpr: as a result of that add, a NodeChangeEvent is fired&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:41] [Arch_SB]thpr: knows ADDED&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:41] [Arch_SB]thpr: knows the Template (let's call it HandsTemplate)&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:42] [Arch_SB]thpr: RaceFacet gets the NodeChangeEvent&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:42] [Arch_SB]thpr: ignores it&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:42] [Arch_SB]thpr: TemplateFacet gets the NodeChangeEvent&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:42] [Arch_SB]thpr: sees it adds a template&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:42] [Arch_SB]thpr: adds it to the internal list (which triggers the ListModel based changes)&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:42] [Arch_SB]thpr: then fires off a TemplateAddedEvent (or whatever it gets called)&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:42] [Arch_SB]thpr: this TemplateAddedEvent is caught by HandsFacet&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:43] [Arch_SB]thpr: which clears its internal cache (if it was caching) and recalculates the # of hands&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:43] [Arch_SB]thpr: that help?&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:43] cpmeister: yea, that cleared it up&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:43] [Arch_SB]thpr: cool&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:43] [Arch_SB]thpr: so back to ID vs. passing the cache&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:44] [Arch_SB]thpr: I'm still trying to understand what the ID does differently&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:44] [Code_SB]james: The main difference is that you remove knowledge of the caching mechanism from the events&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:44] [Arch_SB]thpr: There are at least 2 ways the event can hold the cache&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:45] [Code_SB]james: It becomes a local issue for the facets only&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:45] [Arch_SB]thpr: first would be the event has .getCache()&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:45] [Arch_SB]thpr: which returns a CacheObject&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:45] [Code_SB]james: (with using an ID that is)&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:45] [Code_SB]james: yep&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:45] [Arch_SB]thpr: which has a .getCacheItem(Object cacheKey)&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:45] [Arch_SB]thpr: (or Class cacheKey based on my email, but that's a detail ATM)&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:46] [Arch_SB]thpr: this means CacheObject is at least an interface that is shared wtih the facets&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:46] [Arch_SB]thpr: so high fanout of that interface&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:46] [Code_SB]james: yep&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:46] [Arch_SB]thpr: second implementation is the event has .getCacheItemFor(Class cacheKey)&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:47] [Arch_SB]thpr: which makes the event carry a bit more knowledge and not be a hollow event&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:47] [Arch_SB]thpr: but only puts the CacheObject interface knowledge into the event&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:47] [Arch_SB]thpr: but ties the facet closer to the incoming event&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:48] [Code_SB]james: The question for both of those is where does the event get the cache from?&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:48] [Code_SB]james: and why should the event care about the cache?&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:49] [Arch_SB]thpr: well&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:49] [Arch_SB]thpr: for the first setup, since the CacheObject is exposed to the Facet, it can be used when events are constructed&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:49] [Arch_SB]thpr: the &amp;quot;top level&amp;quot; facets can be given that from the PlayerCharacter object (or even during construction)&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:50] [Arch_SB]thpr: in the second case, subsequent events would have to be given (And be able to reach into private info about) the source event&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:50] [Code_SB]james: Right, so the facet will need to get it from another source anyway&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:50] [Arch_SB]thpr: but doesn't it have the same issue with the ID?&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:51] [Arch_SB]thpr: and just does something like Globals.getCacheObject(integer id)&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:51] [Code_SB]james: Well, the id has some relevance to the event&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:51] *** karianna has signed off IRC (Remote closed the connection).&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:51] [Arch_SB]thpr: but the ID is unique to any PC&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:51] [Arch_SB]thpr: and presumably doesn't change over the life of that PC&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:52] [Arch_SB]thpr: (barring a global reset option somewhere)&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:52] [Code_SB]james: Yep&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:52] [Arch_SB]thpr: how would the first facets get or generate that ID&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:52] [Code_SB]james: The vent is saying change x has happened to character y&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:52] [Arch_SB]thpr: isn't it the same problem as getting the cache&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:52] [Code_SB]james: Not really&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:52] *** karianna has joined #pcgen.&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:53] karianna: sorry&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:53] [Arch_SB]thpr: can you walk through the hands example to show how the ID gets passed&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:53] [Arch_SB]thpr: I'm not following how it's different&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:53] [Code_SB]james: Sure&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:53] [Code_SB]james: I'll just take a sec to pull up the example&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:54] [Code_SB]james: user adds a Template to the PC&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:54] [Code_SB]james: this technically adds a Template object (with a link to the root) to the PlayerCharacter Graph&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:54] [Code_SB]james: as a result of that add, a NodeChangeEvent is fired&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:54] [Code_SB]james: that event carries the character id and the affected nodes presumably&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:55] [Code_SB]james: TemplateFacet gets the NodeChangeEvent, it can get the id from the event&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:55] [Code_SB]james: TemplateFacet then fires a TemplateAddedEvent carrying that id&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:56] [Code_SB]james: HandsFacet gets the event, reads the character id and then looks up the cache&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:56] [Code_SB]james: The cache would be an object either injected at construction time (think Spring) or accessible via a global interface&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:56] [Arch_SB]thpr: so HandsFacet would do something like CacheLibrary.get(id, getClass())&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:56] [Code_SB]james: Yes&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:57] [Code_SB]james: either using a static call or a call to an instance that it was told about earlier.&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:58] [Code_SB]james: After a few years of working with Spring's dependancy injection model I'm a fan of having it as as an object that gets injected to the facet at construction time (or as part of initialisation)&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:58] cpmeister: so every event ever generated by the Graph would have to have a unique ID?&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:58] [Code_SB]james: no&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:58] [Arch_SB]thpr: every PC has a unique ID&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:58] [Code_SB]james: The id is the character id&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:58] cpmeister: oh&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:58] [Code_SB]james: yep&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:58] [Code_SB]james: Which is something that makes sense for the UI&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:58] [Arch_SB]thpr: the CacheLibrary is basically a DoubleKeyMap&amp;lt;Integer,Class&amp;gt;()&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:59] cpmeister: why not use the Character object then?&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:59] [Code_SB]james: yeah&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:59] [Code_SB]james: Too heavy&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:59] [Arch_SB]thpr: because if you use the PlayerCharacter you get tangles&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:59] [Arch_SB]thpr: the Facets are known by the PC&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:59] [Arch_SB]thpr: so they should never know about the PC&amp;lt;br/&amp;gt;&lt;br /&gt;
[08:59] [Arch_SB]thpr: class structure should be a directed acyclic graph&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:00] [Arch_SB]thpr: it also exposes bad behavior&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:00] [Arch_SB]thpr: meaning if you have the PlayerCharacter in all Facets&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:00] [Arch_SB]thpr: you may be tempted to access it or change it directly as a quick hack to fix a bug&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:00] [Arch_SB]thpr: and introduce a lot more problems than you fixed&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:00] [Arch_SB]thpr: the cache or ID provides isolation so you can't do that&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:00] cpmeister: ..but I thought that the PC was simply a key to query information out of the Graph? are the facets aware of what graph they are listening to?&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:00] [Code_SB]james: The aim being to make doing the right thing (programatiically speaking) easier than doing the wrong thing&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:01] [Arch_SB]thpr: Connor: yes, they would have to be listening to all graphs&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:01] [Arch_SB]thpr: James: exactly&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:02] [Arch_SB]thpr: well, I should correct that&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:02] [Arch_SB]thpr: Connor: literally no, a listener doesn't know who it's listening to, based on how a listener/event model works&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:02] [Arch_SB]thpr: the graphs know the facets are listening, to be exact&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:03] [Arch_SB]thpr: one graph per PC&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:03] [Arch_SB]thpr: that help?&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:04] cpmeister: so let me get this straight&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:05] cpmeister: you are worried that the graph is going to try to assess its own changes?&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:05] [Arch_SB]thpr: no&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:06] cpmeister: then what is the ID protecting?&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:06] [Arch_SB]thpr: My worry is keeping the facets ignorant of the total PlayerCharacter object&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:07] [Arch_SB]thpr: so a facet doesn't read from the PlayerCharacter object&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:07] [Arch_SB]thpr: rather it reads from the facet that should provide that detail about the PlayerCharacter&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:07] [Arch_SB]thpr: a specific example:&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:08] karianna: e.g. Facets get info from facets&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:08] [Code_SB]james: So you effectively reduce the scope of the things that the facet needs to now about and at the same time document what the facet is interssted in&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:08] [Arch_SB]thpr: something may be dependent upon a PC having two hands&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:08] cpmeister: well, whatever, I'm sure the reason surpasses my sceptisism&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:08] [Arch_SB]thpr: like equipping a two0handed sword&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:08] [Arch_SB]thpr: so the system that makes that test looks at the HandsFacet&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:08] [Arch_SB]thpr: so we know it's interested in the # of hands&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:09] [Arch_SB]thpr: it means that system is no longer closely tied to the structure of the PlayerCharacter class&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:09] [Arch_SB]thpr: meaning PlayerCharacter fans out to (is known by) a lot less classes&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:09] [Arch_SB]thpr: this makes the system more flexible by isloating changes&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:09] [Code_SB]james: @connor, no I think it is good to question these things - doing so has resulted in many problems being found early and thus being dealt with before they become intractible&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:10] [Arch_SB]thpr: also means that facets can be tested without a mock object for PlayerCharacter running around&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:10] karianna: Yup, questioning is good! You probably saw all of mine on the mailing list :)&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:11] [Arch_SB]thpr: and that updates can be fine-grained to only when the PC&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:11] [Arch_SB]thpr: 's # of hands changes&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:11] [Arch_SB]thpr: and I have to agree, the questions are important&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:11] cpmeister: would the ID system have to adapted for the UI?&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:11] [Arch_SB]thpr: the actual programming is actually a small piece of any project&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:11] [Code_SB]james: and we get to reduce recalculation&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:11] [Code_SB]james: Connor, I wouldn't think so as it would know about the PlayerCharacter object&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:12] [Code_SB]james: whichc would carry the id itself&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:12] [Arch_SB]thpr: here's the rub&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:12] cpmeister: oh, I see&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:12] [Arch_SB]thpr: I originally said the TemplateFacet would implement ListModel&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:12] [Arch_SB]thpr: for the UI&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:12] [Arch_SB]thpr: it can't if there is one global TemplateFacet and the PC is an ID&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:13] [Arch_SB]thpr: we need an interface to convert the Facets to a set of ListModels that are updated for each PC&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:13] [Code_SB]james: Good point&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:13] [Arch_SB]thpr: to isolate the UI from the facets&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:13] [Code_SB]james: My assumption is that would be where the UIFacade would come in&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:14] [Arch_SB]thpr: yes, I think that's where it goes&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:14] [Arch_SB]thpr: I just hadn't adapted to all of the consequences of no local cache&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:14] [Arch_SB]thpr: see? this is why we talk about things first&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:14] [Arch_SB]thpr: :)&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:14] [Code_SB]james: pc.getHandsFacet() would be the sort of thing I would expect the facade to use&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:15] [Code_SB]james: It would seem odd to then have to say handsFacet.getNumHands(pcId)&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:15] [Arch_SB]thpr: and then the facade knows the ID&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:15] [Arch_SB]thpr: and can pass that into the HandsFacet to get the # of hands for the PC it &amp;quot;owns&amp;quot;?&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:15] [Code_SB]james: for variables PlayerCharacter pc; HandsFacet handsFacet&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:16] [Code_SB]james: int pcId = pc.getId();&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:16] [Arch_SB]thpr: so let me double check here... the UI would see getHands()&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:16] [Arch_SB]thpr: or facade.getHands()&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:16] [Arch_SB]thpr: facade then does&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:17] [Arch_SB]thpr: pc.getHandsFacet().getNumHands(pc.getID())&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:17] [Arch_SB]thpr: I don't see a way around that&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:17] [Arch_SB]thpr: unless I'm missing something&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:17] [Code_SB]james: yeah, just seems a bit odd&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:18] [Arch_SB]thpr: actually no&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:18] [Arch_SB]thpr: pc.getHandsFacet() is wrong&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:18] [Arch_SB]thpr: it's a facet repository that knows&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:18] [Code_SB]james: or to go down the DI route, the facade already has trhe HandsFacet injected and then it just calls handsFacet.getNumHands(pcid)&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:18] [Arch_SB]thpr: so it's repository.getHandsFacet().getNumHands(pc.getID())&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:18] [Arch_SB]thpr: that's possible too&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:18] [Arch_SB]thpr: but pc shouldn't have getHandsFacet()&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:18] [Code_SB]james: yep, either would work&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:18] [Arch_SB]thpr: because the facet isn't related to a PlayerCharacter&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:19] [Arch_SB]thpr: but is reused&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:19] [Code_SB]james: yeah, that was where I was heading too - good point&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:19] [Arch_SB]thpr: well&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:19] [Arch_SB]thpr: let's pause for other questions&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:20] cpmeister: none here&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:20] [Arch_SB]thpr: I suspect the next topic is how we end up tying these facets together, since we just brushed on it anyway&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:20] DrewM: None here, very interesting stuff. :)&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:20] [Code_SB]james: I've got one for Kar, Connor, Stefan and Drew - does this make sense?&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:21] *** Papa-DRB_ has joined #pcgen.&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:21] DrewM: I'm following the theories, beyond that it is interesting and seems to make sense&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:21] cpmeister: yea, it does now&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:21] DrewM: Oh, actually yes, Are we calling Edges Facets now?&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:22] [Arch_SB]thpr: no&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:22] karianna: It's making sense so far, but I _will_ be expecting a diagram from you gentlemen :), and we should keep this log somewhere so I can wiki it for future devs&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:22] [Arch_SB]thpr: either James or I will post the log to _devel&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:22] [Arch_SB]thpr: edges are part of the graph along with nodes&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:22] [Code_SB]james: @Kar oh yes and a simple set of example classes to demonstrate will be useful too&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:22] [Arch_SB]thpr: facets are what takes data from the graph and processes that into information about the PlayerCharacter&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:23] DrewM: Tom - okay, that makes sense. Thanks.&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:23] [Arch_SB]thpr: oookay, on to wiring this stuff up?&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:24] karianna: @James - Great, we need to have clear pictures for new developers so we don't get hte wild west pcgen of old :)&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:24] [Arch_SB]thpr: okay, wiring up&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:25] [Arch_SB]thpr: one should assume we end up with on the order of 40+ facets&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:25] [Arch_SB]thpr: that makes things interesting&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:25] [Arch_SB]thpr: because we could have a rather nasty method to wire all this stuff up&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:26] [Arch_SB]thpr: that is possible to do&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:26] [Arch_SB]thpr: the open question - about which I have to admit I'm unsure - is whether there are other things we can leverage to help out&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:26] [Arch_SB]thpr: e.g. Spring or another DI framework&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:27] [Arch_SB]thpr: this would convert the long method into a long set of XML&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:27] [Code_SB]james: Well, as I have alluded to I've been using Spring for this sort of problem for a couple fo years now&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:27] [Code_SB]james: That would have the advantage of making the jump tothe web much easier too&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:27] [Code_SB]james: yes&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:27] [Arch_SB]thpr: which is kinda how this discussion started, since you were corrupting me with me Spring basics&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:28] [Arch_SB]thpr: when we diverted into PlayerCharacter design&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:28] [Code_SB]james: Although it is useful to remember that Spring philosophy is that nothing in the class should depend on Spring&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:28] [Code_SB]james: and that particularly for testing you can create and inject the dependancies manually&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:28] [Arch_SB]thpr: I don't think we have anything that would depend on Spring or the DI framework&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:28] [Arch_SB]thpr: clearly we have a model we can do without&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:29] [Code_SB]james: Spring just encourages you to do the right thing and document any dependancies&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:29] [Code_SB]james: agreed&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:29] karianna: Yeah I've been using spring the last year as well, it's a powerful framework but you have to be careful not to use it to take shortcuts&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:29] cpmeister: Spring is out of my area of knowledge...&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:29] [Code_SB]james: So what we are talking here is the difference between&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:30] karianna: @connor James can probably giver you a better primer than I, but let me know next time you're on IM and I can cover what I know of it&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:31] [Code_SB]james: I'm making a comparison example to post in a couple of minutes&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:31] [Arch_SB]thpr: If we go the Spring route, we also should do a simple mockup to get people into it slowly&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:31] [Arch_SB]thpr: or I should say quickly ;)&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:31] [Arch_SB]thpr: but to make it clear is the point&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:31] *** Papa-DRB_ has signed off IRC (&amp;quot;.&amp;quot;).&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:32] cpmeister: @kar thanks, but I can read up on it if it becomes crucial to know&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:33] [Code_SB]james: ok, so the repository way would be&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:33] [Code_SB]james: public void createFacets() { TemplateFacet tf = new TemplateFacet(); HandsFacet hf = new HandsFacet(); hf.setTemplateFacet(tf); // make these facets available for retrieval some how, probably by fields in a repository. }&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:34] [Code_SB]james: and the spring way would be&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:34] [Code_SB]james: &amp;lt;bean id=&amp;quot;tf&amp;quot; class=&amp;quot;pcgen.core.facet.TemplateFacet&amp;quot;/&amp;gt; &amp;lt;bean id=&amp;quot;hf&amp;quot; class=&amp;quot;pcgen.core.facet.TemplateFacet&amp;quot;&amp;gt; &amp;lt;property name=&amp;quot;templateFacet&amp;quot; ref=&amp;quot;tf&amp;quot;/&amp;gt; &amp;lt;/bean&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:34] [Code_SB]james: That assumes a dependancy on the template facet from the hands facet&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:35] [Code_SB]james: In both cases the facet code is exactly the saem, it is just a matter of how you create the objects&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:35] [Code_SB]james: The difference comes when somethign (e.g. the UIFacade) wants to use a handsFacet object&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:36] [Code_SB]james: In the repository way it would use a repository.getHandsFacet() call&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:36] [Code_SB]james: and in the spring way it would itself be a spring bean with a definition in the xml and a regiustered property of handsFacet that gets supplied to it when the facade gets created&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:37] karianna: Slight typo above james&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:37] karianna: 2nd bean should be a HandFacet class&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:37] [Code_SB]james: yep&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:37] [Code_SB]james: &amp;lt;bean id=&amp;quot;tf&amp;quot; class=&amp;quot;pcgen.core.facet.TemplateFacet&amp;quot;/&amp;gt; &amp;lt;bean id=&amp;quot;hf&amp;quot; class=&amp;quot;pcgen.core.facet.HandsFacet&amp;quot;&amp;gt; &amp;lt;property name=&amp;quot;templateFacet&amp;quot; ref=&amp;quot;tf&amp;quot;/&amp;gt; &amp;lt;/bean&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:39] cpmeister: the Spring framework looks quite similar to output of java.beans.XMLEncoder. :-/&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:40] [Code_SB]james: Not too supriising as Spring is designed around POJO support&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:41] [Arch_SB]thpr: any thoughts or concerns on connections?&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:42] [Code_SB]james: connections?&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:42] [Arch_SB]thpr: wiring&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:42] [Arch_SB]thpr: whatever one calls it&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:42] [Arch_SB]thpr: connecting the facets&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:42] [Code_SB]james: right :)&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:42] cpmeister: I have one&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:42] cpmeister: I can sum it up in one word&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:42] cpmeister: Threads&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:42] [Arch_SB]thpr: meaning what?&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:43] [Code_SB]james: My only main suggestion is to stick to the DI philosophy and that leaves us open to different implementations should we need to&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:43] cpmeister: or is that question getting ahead of discussion?&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:43] [Arch_SB]thpr: I'm not sure if it's a comment, concern, or what you mean by threads&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:43] [Code_SB]james: Meaning what happens if I call getNumHands as the handsfacet is processing an event?&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:43] cpmeister: how many would there be and how would they interact?&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:44] [Arch_SB]thpr: okay two issues there&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:44] [Arch_SB]thpr: Connor:&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:44] [Arch_SB]thpr: simple answer is that the listener/event system becomes producer consumer&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:44] [Arch_SB]thpr: which allows the facets to run in different threads&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:44] [Arch_SB]thpr: # is arbitrary&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:44] [Arch_SB]thpr: that then brings up another issue&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:44] [Arch_SB]thpr: which is&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:44] [Arch_SB]thpr: what if a second template is added before processing for the first one finishes&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:45] [Arch_SB]thpr: that's tricky to handle&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:45] [Arch_SB]thpr: there are a few options and I'm not sure we'll have time to walk through them&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:45] [Arch_SB]thpr: I can post to _devel on that topic&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:46] [Code_SB]james: uggh queuing&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:46] [Code_SB]james: Yeah makes sense&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:46] [Arch_SB]thpr: James:&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:46] cpmeister: since some templates exclude others once added, adding and updating template information would have to be atomic&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:46] karianna: It's something we deal with in the asynch messaging world, interesting topic....&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:46] [Arch_SB]thpr: getNumHands could either be synchronized&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:46] [Arch_SB]thpr: or&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:46] [Arch_SB]thpr: it simply runs the processing twice&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:46] [Arch_SB]thpr: it's technically a performance hit, but doens't corrupt&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:47] [Code_SB]james: Seems ike a good topic for the next meeting or a list discussion&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:47] [Arch_SB]thpr: yes, I think this is bigger than what we can do now&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:47] karianna: Yep&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:47] [Arch_SB]thpr: lots of issues as we go multi-threaded&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:48] [Arch_SB]thpr: which are beyond breaking PC into facets&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:48] [Arch_SB]thpr: so let me check that we're all on the same page&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:48] [Arch_SB]thpr: no concerns with facets as defined drawing in events from the graph and sharing updates with events&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:48] [Arch_SB]thpr: (assuming 1 thread)&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:49] [Arch_SB]thpr: wiring up should be compatible with Spring, but we probably should put together an example to show people the difference in something they can poke at&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:49] [Arch_SB]thpr: anyone disagree?&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:50] cpmeister: nope&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:50] [Code_SB]james: nope&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:50] [Arch_SB]thpr: Kar? Stefan?&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:50] [Code_SB]james: The other main topic was how do we manage the cache used by facets&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:51] [Arch_SB]thpr: ah, yes&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:51] [Arch_SB]thpr: global cache, passed by ID&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:51] [Code_SB]james: cool&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:51] [Arch_SB]thpr: the difference from that to passing the cache is painting a shed, IMHO&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:51] [Arch_SB]thpr: the ID is probably clearer and does allow injection of the cache owner, which is a benefit&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:51] [Arch_SB]thpr: if we go Spring route&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:52] [Arch_SB]thpr: ok, I have to run&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:52] karianna: I'm happy&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:52] [Arch_SB]thpr: have a good morning/afternoon/evening/night everyone&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:52] [Code_SB]james: I'll post the log later this monring, probably with the summary at the top followed by the log and a little tidying up&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:52] cpmeister: later Tom&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:52] [Arch_SB]thpr: thanks, James&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:53] karianna: You to, great discussion! Thanks James&amp;lt;br/&amp;gt;&lt;br /&gt;
[09:53] karianna: night all&lt;/div&gt;</summary>
		<author><name>Tom Parker</name></author>
		
	</entry>
</feed>