2012. november 16., péntek

"Tudja itt valaki, mi az az Egység?"

Régen voltam itt és nem tudom lehet e a fórumban keresni. Tudja itt valaki, mi az az Egység?Ha valaki tudja, akkor mennyire mélyen és mennyire meggyőzően?
A kérdés vicces, de beleszaladtam, és hirtelen kedvem támadt írni róla.

Számomra az egység azt jelenti, hogy önismeret, szaktudás, politika, technológia, történelem, lélektan és társadalomtudomány területéről származó ismeretek és következtetések egyetlen hálózatot alkotnak. Mondom: alkotnak önmagukban, tőlem függetlenül.

Nagyon hosszú idő és kíméletlen elemezgetés révén az emberi elme alkalmassá válhat arra, hogy ezt a hálózatot hiányos tudása és képességei dacára felismerje, önmagát ennek közepén, a világot a külső oldalán érzékelje. Ez végtelen magányos dolog, mert ha hasonló látásmódú emberrel találkozik, nincs mit mondania - de egyetlen egyet sem talál, a többiek számára pedig érthetetlen, amit mond. Ugyanakkor ez lényegtelen, mert ez az állapot teljesen egyértelmű feladatokat és utat rajzol, melynek követésére minden erőre szükség van, és minden lényeges visszajelzést megad, továbbá az állapothoz vezető út végiggondolása elég meggyőző arra nézve, hogy nincs kint és bent: minden külső történésre pont úgy és pont akkor volt szükség, hogy a belső kialakulhasson, és ez így is fog maradni. A hálózat alkotta gömb csupán azért fontos, hogy a külső jelenségek önmagukban, önámítás és illúziók kergetése nélkül értelmezhetőkké váljanak, az egyén számára minden ismeretével harmóniában álló azonnali reakciókká alakuljanak. Az aktuális képességeinek határáig tágított emberi tudat mint szappanbuborék: színes, mozog és torzít ugyan - de semmit nem takar, és a pillanatnyi körülményekhez a minimális belső feszültséggel alkalmazkodni képes, térben zárt, lágy formát alkot.

Viszont szerintem a Mátrix első részének forgatókönyvét megíró ember tudja ezt. Talán őt keresed. Vagy inkább azt, hogy végre megértsd, és magad válj azzá, akit keresel.

Eredeti hely

Válasz erre

2012. november 15., csütörtök

There is no "Dust Framework"

The newest finding. As I was looking for the absolute minimum requirements from a framework (more precisely: an external framework runtime environment) it seems to disappear.

When I have all business logic implemented as business logic components derived from a common base class, it seems possible that the proper network of these elements (the grains of Dust) can do all the required operations. The "application" itself is not more but a component entity that has a Context, which is totally similar to any other "Context holders", like a GUI window or a serializer. The only difference is the initial boot process, where the application started on the machine, has a generated code segment that puts some preconfigured entities (like the meta-level type and service holder instances) into the Context before giving the control to the "launch" message handler.

It will take some time to process this idea.

"Népnevelő..." :-)

2012.november.15th. at 04:33
Tibor bá (blog bejegyzés vége): ... Világviszonylatban a dolgozó kisemberek százmilliói vannak súlyosan eladósodva, mert abban bíztak, hogy mindig lesz állásuk, kvázi jövedelmük, amiből majd törleszteni tudnak. Nem tudnak, tehát elveszítik még azt is, amijük van. Ez pedig szociális felforduláshoz vezet. Ezt persze lehetne kezelni, de csak akkor, ha az oligarchák le tudnák győzni a kapzsiságukat. Nem tudják, mert ők is Emberből vannak összegyúrva. Ez a Napnál is világosabb, csak olyan népnevelők nem látják be, mint például Attila (PV), vagy Kedves Loránd.

Megszólíttatván: ismét örülök, hogy nevetségesen triviális, természetesen ismert és feldolgozott tényeket tálalsz “számomra újdonságként”. Arról pedig igazán nem tehetek, hogy a felvetett problémákra adott, a jelen pillanatban elérhető emberi természetet és technológiai eszközöket alapul vevő, legjobb (és elnézést, de az itt megnyilatkozókkal ellentétben tanult, húsz éve aktívan használt és működő) rendszertervezői tudásom szerint megalapozott elemzésem és megvalósításra érdemes javaslatom
– NEM fér rá egy söralátétre
– NEM lehet hangosan elordibálni az utcasarkon a “tömegek számára”
– épp ellenkezőleg: komoly gondolkodóktól is jelentős erőfeszítést igényel a megértése.

Számomra inkább az tűnik viccesnek, hogy ez a felsorolás bárki számára meglepő, vagy hogy te egy ilyen poszt megírásával párhuzamosan komolyan gondolod, hogy a “korrupcióellenes mozgalom” ötleted egy áprilisi tréfánál komolyabban vehető.

Semmi gondom nincs azzal, hogy hülyének nézel, szíved joga. De azért talán ennyire ne reklámozd azt, hogy nem vagy hajlandó a megértés minimális szándékával komolyan végiggondolni azt, amit NEKED írok. Még akkor sem, ha számodra a párbeszédünk nem több, mint nyilvános demonstrációja annak, hogy hajlandó vagy meghagyni a blogodon a veled ellentétes véleményt.

Uff, én beszéltem.



Az utolsó sort felejtsétek el. A “feszültség-csökkentő mosoly” itt nincs a helyén.

2012. november 14., szerda

Runtime 1

The runtime is the heart of Dust - not a surprise. The most important: I must believe that it is also totally simple. I must not think about speed right now, only one rule: KISS. Later on, when I have a working implementation based on the bones, there will be time to add muscles. But I should not start with them.

What is the ultimate minimum for this environment?

There is no type management, or array, map of types. I only need type by its id on meta level (reading a serialized content, or generating a GUI), otherwise the type is referred directly from the aspect.
No need of context management, the Context instances are also in one Context: the root context of the application.
There is no static Dust API. All codes run as event processors, so they have the same base class, and the Dust API is the functions of that base class. Even Dust kernel, which is only another instance in its own Context.

2012. november 11., vasárnap

Esperanto programming

This is a strange one. I feel that I should use the Esperanto language for creating the terms in Dust. The reasons are the following.

Internationalization

Information systems are theoretically global. A person is a person, a chair is a chair, a calendar is a calendar everywhere on the Earth, at least on declaration level. Of course, we put different holidays into the calendar in Hungary and China, we write texts in different languages, and we want to see the user interface or the notification messages from our calendar in our chosen language - but the types and the business logic is the same.

However, in general we use English language to write source codes and comments - that is: we declare the elements in a natural language that we assume the other programmers will understand. So, in fact our systems are English by default, and then translated to other natural languages. However, the terms of our task domain should not be English, that is another "implementation", not the abstract definition. Luckily enough, we have an artificial language with the simplest possible (artificial) grammar, and a full word set for daily and scientific use. Luckily enough: I myself don't know Esperanto! so I will have an immediate need of anything I do to be translated to English, which I, and my fellow programmers can understand. It is a fundamental design decision of mine to separate identifiers from text information, where identifiers are hidden, programmatic information that can never get out of the system to the user, only through a translator - but now this will be an inevitable requirement because I (and my colleagues) would not understand the user interface or logs, if it is not translated to a language we know.

Esoteric

The esoteric reason behind the decision is that with Dust I start to create a parallel world. For the first time of course, I create the meta-meta layer: the definitions of "Type", "Aspect", "Entity", etc.; instances of these types will contain "themselves": the Type, Aspect, Entity, ... type definitions. Then other type definitions come which describe a Person, a Chair, etc. and then instances of persons, chairs, etc. So finally I will have an information system that can represent entities and relations in the external world. So far there is nothing new, all software does the same, yet the programmers don't think about it, and uses the constructs of the programming language for the meta layers and start with practical types. But here I talk about a system where for declarations I don't use a programming language construct, but an independent, external utility.

The structure of that knowledge, the meaning of the terms are the "words", the types: a "Person" is a structure of information that we have described in the Person type. Not a human perception of a Person, but an informatic representation of a person. A natural language word represents a human understanding - the artificial language word represents a type definition. A human knowledge can, and has to be simplified and organized to what the actual type definition can hold; and a human perception can be built by a human brain after browsing complex information networks available in the information system. I also think that all system knowledge can be translated to syntactically valid sentences; but to understand (parse) sentences, it is a fundamental need that the generation rules are clean, simple and obvious.

I accept Noam Chomsky's sentence that Esperanto is not a language. A natural language expresses and also affects the unique structure and complexity of the human brain, with all parallelism, analogies, different meanings, the very nature of human existence. This must be transformed when dealing with mathematics, natural sciences or computers to an environment that is locked to strict rules and only one, perfectly defined meaning. This can only be done on the human side, and I think all the attempts for automatic translation and machine understanding are doomed. The machine understanding will always fail on this in a certain percentage, and the more important it is that the machine does exactly what I want, the less likely that I will ever trust a speech-to-text engine and would want a button to press instead. Or: I have to learn how the machine will understand my sentences, and talk to it using an ultimately simplified "Language-for-my-coffee-maker"... But why?

We do have Esperanto, an artificial generic language. If we have the type definitions (the exact "technical meaning") of each word in a transparent form (again in Esperanto), we have a perfectly clean interface to the system: we can know what attributes, commands, relations we can refer to when talking to the coffee machine. We can use a simple but generic (and so globally available) language that is easy to learn, and so enter a world where we can actually talk to any entity in an unambiguous way, and we don't have to learn a locally crippled natural language for each new type we meet (as we do today for each new software, forget the text-to-speech part, any user interface does just this... not to mention the famous example of the new Office package).

I think it is possible that with Esperanto we can actually do anything in this information system. We can take a totally new component, understand its features, query its state and use its function, all without any additional user interface, just by using the fact that we know Esperanto (the "human script language of Dust"). The essential simplification and clarification between our thoughts and the machine understandable, unambiguous commands - and back: building ideas from the received unambiguous information is done in our brain, using our own, internal natural/artificial language translation. In this scenario, all parties do what they are the best at.

The last sentence: the business logic is now implemented in a programming language - but as I have already mentioned: a source code is nothing else but a more human readable form of a forest (mathematical graph term) of construct nodes of that language (declaration, value transfer, decision, call, repeat, ...). This is to what the compiler/interpreter transforms the text files, and then executes it (interpreter) or further transforms it to machine instruction code arrays. Thinking in this way, the source code itself is equivalent to an entity hierarchy, and any entity hierarchy can be transformed to Esperanto sentences, so perhaps this is the end of programming languages as well: we only need the declaration of the construct nodes to express just any action using them. (Of course this is not among the first targets, just a strange idea.)

2012. november 10., szombat

Az ezeregyedik kiáltvány :-)

2012.november.8th. at 21:00
65, Tibor bá: Ez annyira szép, és elegáns párhuzam, hogy kifélkövérítettem. Csak azt kellene belátnod, hogy a Viktorok is mind benne vannak az “emberi természetben”. Vágj le egyet, nő helyette három.
Köszi, gondoltam, hogy jól passzol ide.

A jelenség természetességével is tisztában vagyok, ez egyben frappáns válasz is ejha (66) felvetésére ("Lehet, hogy likvidálni kéne"). A gond csak az, hogy egy kis (falu méretű) közösségben ezt a viselkedésmódot a sarki kocsmában néhány nyolc napon túl gyógyuló mozdulattal kigyógyítják bárkiből – egy “modern” “demokráciában” viszont öltönyös szakértők és bloggerek járják körbe-körbe a végtelenségig, mi meg bambán hagyjuk kiteljesedni.
67, hubab: Amit eddig elolvastam tőled, abból azt veszem ki, hogy nem vagy hajlandó figyelembe venni annak a puszta lehetőségét sem, hogy az emberiség már túlnyújtózott a maga takaróján, és a jelen népesség puszta életben tartása is csak a föld egyre csökkenő tartalékainak teljes felélése árán lehetséges, míg azok léteznek. ... Mitől vagy olyan biztos abban, hogy a hajó még nem ment el? Hogy egyáltalán létezik még elvi megoldás a pozitív kimenetre?
Biztos nem vagyok semmiben. Viszont jogomban áll ELDÖNTENI, hogy miért tartom érdemesnek élni és dolgozni – és mire nem pazarolok időt.

Felvetésedre a válaszom röviden: a “civilizált ember” mai, nyugati közfelfogás szerinti definíciója természetesen tarthatatlan. Viszont szerintem HA képesek leszünk a valódi szükségleteink kielégítésére koncentrálni az idióta álomkergetés helyett, HA hajlandóak leszünk újra DOLGOZNI, közösségként gondolni önmagunkra és hinni a bennünk rejlő lehetőségben, AKKOR nyerhetünk elég időt az “újratervezéshez”. Ha nem, akkor bizony pofára esünk, és NEM lesz “csendesen eléldegélés a romokon”, meg felemelkedés.
Hosszabb választ a Hajnalvilág könyv 97. oldalától olvashatsz.
[... persze erre "hubab" már nem válaszolt.]


2012.november.9th. at 07:34
65, Tibor bá: Én csak krónikás vagyok. Én nem okozom az eseményeket, csak észlelem és közzé teszem. Ha lenne hatalmam azon lennék, hogy minden magyar a 10 százalékban legyen.
Azért lefutom ezt az “én csak krónikás vagyok” kört is újra.

1: NEM vagy objektív, ahogy a világon egyetlen ember sem az, semmilyen szempontból nem vagyunk alkalmasak rá. Ezzel a megállapítással mindaddig egyet is értesz, amíg nem rád vonatkozik (a saját objektivitásodra mint abszolút jellemzőre, és nem mint szándékra hivatkozol).

2: Az objektivitás MÉRTÉKE valóban meghatározza azt, hogy mennyire pontosan látjuk a világot, és ettől függ az, hogy mire vagyunk KÉPESEK a jelen pillanatban. Például: az álmodozókat megvezetik, mert direkt ezt kívánják, és minél nagyobb a homogén álmodozók köre, annál hatalmasabb (és idiótább) vezért emelnek maguk fölé. Szimpla MATEK. Egyébként a tréfa kedvéért: a “fides” jelentése hit, latinul.

3: Viszont UGYANILYEN fontos az, hogy milyennek akarod látni a világot, milyennek hiszed a jelenségek látszata mögött. Ennek alapján hozol döntéseket, és (képességeid mértékében) ebbe az irányba MOZGATOD a világot.

—

Te “csak” krónikás vagy. De ezzel mindenkit, aki a blogodat olvassa, elriasztod a nagy közösségi, konstruktív gondolkodástól, az ember jövőjébe vetett hittől; és egyéni túlélős barkácsolásra biztatod, táplálod bennük azt az illúziót, hogy ennek bármi értelme lenne. Pedig te is leírod, hogy az ebben gondolkodók szépen állítsák sorba a szeretteiket, húzzanak ki kilenc “eldobhatót” minden egyes olyan emberért, akit szeretnének megtartani. VAGY: próbáljanak más megoldást keresni, még ha lehetetlennek látszik is.

Továbbá: HA Orbán Viktor olvasná a blogodat, és a benne leírt jövőképet, a párbeszédek tartalmát és színvonalát, szerinted elgondolkodna azon, hogy mit is csinál? Szerintem éppen ellenkezőleg: ebben is csak visszaigazolást látna. Nem is alaptalanul.

Na ezért vitáztam veled eddig – de már minden fontosat elmondtam.


2012.november.10th. at 04:35
77 Tibor bá Ez az a kitérőktől hemzsegő szöveg elkerülésének üdítő példája, amit nálad még nem volt alkalmam tapasztalni. Inspiráló!

Az objektivitásról írottakkal egyetértek. Az ember legfeljebb törekszik rá, de tökéletesen nem tudja elérni. Na de, tudsz ennél jobbat? Ráadásul ez mindenkire, tehát rád is vonatkozik. Az a tudat, hogy abszolút objektív neme lehetsz, nem béníthat le. Különben is döntéseidnél egyéni dolgokkal súlyozod a tényezőket, ami máris a szubjektivitás felé tol. Például: Túlélési stratégia esetén nekem jó, ha van hátra egy évtized, esetleg másfél. Nyilván a felkészülésnél ez egy objektív tényező számomra, de más nézete szerint szubjektív.

Krónikás ügy: Juliánusz barát időben jelezte, hogy a mongol horda nyugatra tart. Kérdésem: Ezzel elriasztotta a nagy közösségi, konstruktív gondolkodástól a magyarokat? Ellenkezőleg, inspirálhatta volna őket, ha hallgatnak rá. – persze ezt te másképp látod. Jogod van hozzá.
Hátulról előre: “mit csinálhat máshogy egy krónikás”?
Például ahelyett, hogy “birkanépezik”, meg túlélő tanfolyamokat szervez (mert “nem szeretném, de úgyis minden összeomlik”), meg “mozgalmat indít a korrupció ellen (HAHAHA…) mondhat olyat, hogy

Hölgyeim és Uraim, ébresztő!

Magyarországon IGENIS VANNAK olyan emberek, akiket a felelősségtudat és személyes felelősségvállalás, a szaktudás és a jó szándék tesz vezetővé, NEM a “modern” “demokrácia” amúgy is fejre állított, majd lassan kézi távvezérlővé barkácsolt szabályai. Például:


A sor folytatható, alternatívák kereshetők. De ahelyett, hogy a zsibbadt tömeget ekézném nyafogva, meg százalékokon töprengenék, kijelentem, hogy ÉN személyesen őket akarom vezető szerepben látni, és kérlek téged, kedves olvasó:

  • gondolkodj el azon, hogy ilyen emberi minőséget akarsz-e az ország vezetésében látni – vagy azt, akik most ücsörögnek ott!
  • keress további jelölteket, vitázzunk EZEN nagy szavak, zsidózás meg turulos-koronás maszlag helyett – és nézzük végre LEVEGŐNEK azokat a balfékeket, egyetlen gondolatot, egyetlen másodpercet ne pazaroljunk rájuk!
  • ha van kedved, csinálhatunk akár mozgalmat is, de NEM azért, hogy MI mondjuk meg a tutit, hanem azért, hogy végre ŐK mondhassák meg!
  • és végül: ÉN követni fogom őket akkor is, ha éppen kényelmetlen, amit mondanak, mert BENNÜK én személyesen megbízom!


Még akár idézhetnél is tőlem, mondjuk ilyet:

A fásultság, végtelen unalom és kiábrándultság nem kellemes érzés, de alapvetően jó. Azokról az eszközökről, amelyek igyekeznek egységes, százalékokkal és mutatókkal mérhető tömeggé formálni bennünket, egyenként kiderül, hogy mennyit érnek, ugyanakkor mibe kerülnek nekünk és a bolygónak. A király meztelen, hiába a kikiáltók hangos üvöltése, a fizetett hangulatcsinálók suttogása a tömegben – az ember újra keresni kezdi szomszédja kezét.

Tudjuk már, hogy a bennünket pirosra, narancsra, kékre vagy zöldre festő, százalékokért bármit kimondó „teamek” folyamatosan lesnek, méregetnek minket; minden óhajt és az ellenkezőjét is felírják zászlajukra – csak sajnos oly kevés már ott a hely a korábbi elvek, ígéretek mellett.

Így aztán egyre erősebben vágyunk arra, hogy valaki végre mondjon igazat, ha fáj is – és ne hagyja abba csak emiatt. Igenis szúrja a tűt, vágja a húst, fájjon, ha kell; de szeretet, felelősségtudat és hit legyen a szemében, ne tartson poharat a véremnek, és ne koccintson vele a műtőasztal alatt.

Ma mindez vágyálom csupán, és nem a szereplők miatt, mert bár ők egyénileg természetesen felelősek az általuk okozott kárért, de ha lecseréljük őket, ugyanolyanok állnak a helyükre. De talán éppen ez tesz minket elég erőssé, elhatározottá ahhoz, hogy felvállaljuk és kimondjuk: igen, én magam vagyok ez a rendszer.
Magam vágytam arra, hogy szebb világot hazudjanak nekem, én kívántam, hogy elvakítsanak, elkábítsanak, és magam is részt veszek mások becsapásában. Most viszont látni akarok, színről színre úgy, ahogy a dolgok vannak, és igazat akarok mondani akkor is, ha ez sokba kerül nekem, mert megcsömörlöttem már ettől a kusza, önmagának folyamatosan ellentmondó rendszertől, amelynek része vagyok. Leesni az ágyról nagyon kellemetlen, de ha ez szükséges ahhoz, hogy végre felébredjünk egy lázálomból, akkor megéri.
(Hajnalvilág, 2008 - 86. oldal)

—

TE mondhatnál ilyet, mert EZ valóban “inspirálhat” embereket a nagyobb közösségi összefogásra – az általad elővett témák és hangulat NEM.
Én nem mondhatok ilyet, mert szerintem a jelen helyzet következmény, az okok feltárásáért ennél jóval messzebbre kell menni.

Az objektivitásos téma:

Igen, ha sarokba szorítalak és éppen jó hangulatod van, akkor egyáltalán válaszolsz, nem küldesz elmeorvoshoz (mint korábban néhányszor) és képes vagy elismerni – de csak olvasd el ezt az egyetlen bekezdésedet. Azonnal visszatámadsz, és már azonnal elfelejted, hogy KIVEL beszélsz.
ÉN vagyok az, aki állandóan a saját szubjektivitását tekinti alapnak, ÉN vagyok az, aki csak a szóismétlés miatt nem írja bele minden mondatába, hogy “szerintem”. ÉN vagyok az, aki az egész életét azzal tölti, hogy magukat objektívnak és alaposnak képzelő emberek kósza ötleteiből egy valóban objektív világban (számítógép) működő rendszert faragjon.

Igen, képes vagyok lemenni arra a szintre, amit te szeretsz, de ott a jelen problémákra NINCS MEGOLDÁS, mert ahhoz igen távoli rendszerek közötti összefüggési hálózat ismerete és feltárása szükséges alapkövetelmény! EZT próbálom elmesélni a “kitérőktől hemzsegő” szövegeimben. És igen: baromi kemény agymunkát igényel a követése is, nem is várhatom el senkitől – tőled sem, nem hogy az “istenadta néptől”. De akkor minek és kinek beszélek?

No azt hiszem, itt volt elég, megint az ellenállhatatlan ágyúgolyó és az áttörhetetlen fal konfliktusánál járunk.

2012. november 8., csütörtök

Entity containers and locks


Entity containers targets the problem of transactions: changing multiple entity instances and attributes within a single action. The change must be "atomic", all updates must be done or discarded to keep the components in valid, consistent state - but the modification process requires time, and the operation may be interrupted by a failure (hardware, system, connection - this is the traditional transaction management) or another concurrent modification (programming language lock and synchronization constructs).

Moving the state representation to Dust means that the code should never meet this situation - it can control the "commit" / "rollback" operations, but it does not have to actively protect anything from transaction errors: it should work as configured. The encapsulation gives a way to support this, using a hierarchy of entity containers.

The Dust runtime is merely an entity instance container, with an API to get references to them, access their content and send messages. Its actual operation: the ability of handling the types, entities, messages, and that it can go for other entities upon requests are actually the functions of some required (and later time: properly protected) kernel "meta" entities.

As long as an operation accesses entities and reads their content, we have no problem, this operation can run in parallel with many components accessing the same instance. Writing causes the trouble. Of course, parallel write requests should not be allowed - but we also should not let a write operation complete while another code is actually reading the same entity, because it is nonsense to get different results to the same question (like: I make a decision because of the state of an item, and do other actions, yet the item state gets modified at the same time).

The solution (at least seems to be) quite simple, using the restrictions above. When a code uses a reference, it gets connected to its local usage pool, and also linked into the using contexts list of the aspect. When the message processing ends (the code returns), the references are released and removed from the list. When a code request a write operation, the Aspect gets locked to that code, and all concurrent write requests are suspended until this lock lives. However, the code does not change that aspect instance: it is shallow-cloned into a secondary Entity container. Whenever this code, or any other that it calls refers to this Aspect, they receive this temporal instance; but it is linked to the original container, and any instance missing from the current container will be resolved from (or by) its parent.

So, the update code collects duplicates into the local container, but does not break other processes by the parallel modification as long as it runs. When it ends, the temporary context is released and the updates are committed. This is the point when readers could be broken, so the commit process waits for all current references to be released to the item, and also blocks opening new read references to the target objects. In the root level, commit means updating the instance in its persistent storage as well.

Deadlocks

Of course, this "generic approach" has inevitable problems because of its simplicity. It can naturally result in deadlocks: parallel processes both waiting for an instance blocked by the other. However, this information is not hidden somewhere in the runtime, behind the language constructs, but clearly visible in the Dust runtime thread manager - and can be resolved there. On the other hand, the approach of atomizing the business logic and moving all state representation to Dust means that the message responding codes will be short and simple, so the synchronization problems "should" become more visible and manageable.

Releasing and listening

In longer operations the coder should take care of the consequences of having some entities locked for a longer period of time, consider the side effects and implement the behavior wisely. For example: one entity contains information that has effects on other entities. When this entity changes, many others also has to be updated. If it runs in cycle, it would gradually lock all the touched entities, which is not good - so, it can commit changes for each item thus releasing them from the local context. Of course, with the messaging architecture this is not the case: the update request can be broadcast to all members, the message processor does the update, so the change is done in the local context of the called message processor, and the local commit is done when the processor exits.

However, what should happen to the originating object? It depends. It may remain locked all along the update process to block concurrent modification. Or the relevant data can be extracted for creating the update message, and then the code can release the entity, so even if it gets updated during the child processes, the actual modification will be coherent (though obsolete). Or, the source object can be released, but the process can listen to its change, and if it gets updated while the process is running, it can stop the operation and restart it with the updated information again.

Operation contexts

Another typical situation is when the modification process is of "unknown length": the system enters a state of updating some entities, but has to wait for external events to happen. This is the generic scenario behind all user interfaces, server communication, interaction with a hardware component, etc. I would say that reading data from the hard drive is also the same situation.

The current programming methodology uses wait calls, spins in cycles, etc, in this case, which is again a situation when the code represents the application state, and which considered evil in Dust. The command is sent to the hardware, the information is presented to the user, so this task is done, the activated message processor code must return. The event will appear some time later, dispatched to the component again, resulting in a data change (mouse movement and click -> user interface component state change -> data modification), the relevant message processors are called, and then again the system stops and waits for the next event.

The state between these operations are stored in an operation context, a temporal persistent entity container. This is independent from Dust kernel container (which represents the "actual global state of the things"), and floats above it, containing "one required new state under construction". Such contexts can be created by some system level components - like one that can display a GUI window, open a network channel or start a stream deserialization process. When the context is closed, it can rollback the operation: throw the container, or, by default, commit it: update all entities of the parent container. Yes, this is a tree, and a window called modally from another window can update the parent window's context, and NOT the root under it (and for exchange, it can see the actual modifications made on the parent window).

This again relates to locking. The GUI displays many entities, and updates some. The update locking can break through the context depending on the configuration. The definition should contain if it

  • locks the target item globally, blocking others to modify it, but ensure that no concurrent modification takes place - better for atomic components,
  • or let others do parallel modification and merge the modifications on commit if needed - better for big components like source codes.
The displayed entities are another problem: they would block updates because of the read registration. An alternative is that the GUI elements listen to the displayed entity, but release it. So, the updates are allowed, but the controls get notification about it and so they can reflect to parallel changes. This is a recipe both for parallel displaying and editing the same data instances, and for screen sharing, depending on if the listening is registered to the target or the GUI element entity.