Distribution of Knowledge
In Webstructor, knowledge is represented by Things related one to another as Properties.
There are two major problems related to knowledge distribution. First - how Things areidentified across different Applications/Applets (Spaces, actually) running the same World. Second, what are the rules for synchronization of knowledge being concurrently maintained by different owners of knowledge (let us call them Agents).
These problems may be considered within distributed system configuration where only two different Agents communicate (exchange by knowledge) at one time.
Identification of Thing
There may be several different approaches for Thing identification.
First, one might unify Things by unique identifier (ID) assigned upon creation of Thing. The problem with this approach is that if two different Agents create Thing for "cat" (describing concept of animal "cat") independently and assign unique IDs to two different Things, they exchange these Things not being able to unify them and merge them. One might argue that these two "cats" might be unified by fact that both of them share the same Properties ("mammal", "mouseeater", etc.). Then it turns out that Properties are represented by other Things that should be unified somehow.
Second, Things may be unified solely by Properties they have. For example, if something is "mammal" and "mouseeater" for two different Agents at the same time, it might be used to make decision that this is the same Thing for both of them. Still, if two Agents add different properties to this Thing concurrently, this thing will not be the same for each Agent anymore.
Third approach is to identify Thing by meaningful symbolic name. Although there is still a possibility that two Agents call the same thing differently, this probability is not as big as chance to create different unique IDs for the same Thing. This is approach used in Webstructor although Property-based unification is something to be considered in the future.
Synchronization of Knowledge
There are few cases when concurrent changes in knowledge made by two independent Agents may require synchronization. Let us consider these cases.
Let us consider what happens during knowledge exchange - all case by case.
Agent 1 creates Thing A non-existent for Agent 2
In this case, Agent 2 simply becomes aware about existence of Thing A.
Agent 1 creates Thing A existent for Agent 2
In this case, Agent 2 just acknowledges the fact.
Agent 1 removes Thing A non-existent for Agent 2
In this case, Agent 2 has nothing to do at all. Still, because of the following situation, removal of Things is not allowed procedure in Webstructor.
Agent 1 removes Thing A existent for Agent 2
In this case, we have potential deadlock problem. It might happen that Agent 1 removes Thing A at the same time when Agent 2 adds some Properties to it. To do that correctly, Agents should negotiate their intent to remove the same Thing at one time. Although it might be possible to implement some "knowledge locking" mechanism for two Agents, it become impossible to keep "distributed knowledge locking" in the random net of numerous Agents. That is why implicit knowledge removal is not currently supported by Webstructor.
Agent 1 creates makes Thing B to become Property of Thing A while Agent 2 is not aware about this relationship
In this case, Agent 2 simply becomes aware about existence of relationship between Things A and B.
Agent 1 creates makes Thing B to become Property of Thing A while Agent 2 is aware about this relationship
In this case, Agent 2 just acknowledges the fact.
Agent 1 disregards Thing B as Property of Thing A while Agent 2 is not aware about this relationship
In this case, Agent 2 has nothing to do at all.
Agent 1 disregards Thing B as Property of Thing A while Agent 2 is aware about this relationship.
This situation is similar with Thing removal. Although, it is allowed to remove Property of some Thing, it is not guaranteed that this change will remain for Agent 1 unless Agent 2 removes the same Property at the same time. If no synchronous deletion of some Property is made across all communicating Agents, remaining Property have chance to get replicated from one of Agents to all of them.
From the consideration above, it is clear that the major problem in the way Webstructor distributes knowledge across instances of Webstructor Applications running the same world is deletion of knowledge. Current solution discussed above is not quite satisfactory because in the real system it leads to heaps of junk knowledge. That is why two complementary approaches described below are intended to solve this problem (in the future versions).
Junk Knowledge Collection
By junk knowledge, we mean any unreferenced knowledge. That is, situation is quite similar with garbage collection in Java - object is removed from memory as soon as there is no other objects referencing it. By unreferenced knowledge, we mean any Thing or Property that is neither Property of at least one other Thing nor it is referenced by at least one Node in some View.
First, this will be relevant to Things, because there is no clear criteria how to define referenced or unreferenced Property.
Consistent Knowledge Merge
The idea behind this approach is as follows. No one can delete some relationship between Things or say that some Thing has no some Property. Rather one might prove that certain relationship is wrong and certain Thing can not really possess respective Property. This is intended to take place when portion of knowledge is submitted to World of some Agent. At this point, some kind of inference engine should be used to verify consistency of existent knowledge. If there is not consistency, conflict should be resolved (either manually or using some rules). To resolve conflict, some knowledge should be deleted.
For one example, if new portion of knowledge coming to Agent 2 from Agent 1 makes some piece of existent knowledge at Agent 2 wrong, Properties representing the wrong knowledge should be deleted. Otherwise, if it appears that that is new knowledge wrong, Agent 2 should send corrective knowledge back to Agent 1 to let latter revise its own knowledge base.
(C) Copyright 1988-1998,2001 Anton Kolonin
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.