This page gathers my raw ideas as they appear in my brain. Therefore comments on this page is just something like as idea snapshot. It do not reveal anyhing on Ideal Software Architecture, but the way concepts comes into my conscience.
Legend |
The thoughts incorporated in ISA appear with this green box containing the location where this idea is taken into account. |
The thoughts partly incorporated in ISA appear with this blue box containing the location where this idea is taken into account. |
The thoughts rejected from ISA appear with this red box containing the location where this idea is rejected if any. |
The thoughts not actually incorporated in ISA appear with this gray box containing the location where this idea is not taken into account. The purpose of this box is mainly for blog internal management. |
#
In order to perform an quick character prtesentation change detection on 64 bits encoded characters, a AND with 3 operands should be implemented in µP. Operands will be :
#
Comments in LL are Just first class fields as others. Such fields are for instance summary, description.
Comments have 2 faces:
1 – They are so general that a mode precise classification of comments is preferable.
Otherwise an over usage or misuse can be done of them.
2 – They are so convenients to add any non anticipated observation of any kind on every thing.
Otherwise it is not flexible to express something without free text.
#
Exchange protocole
Get an objet :
Ask(asked class name, optionnal asked OID, optional asking context) : Asked object.
Send(target class name, optionnal target OID, sent object, optioanal sending context).
On an ask an other parameter is nedded, the depth. Possible vaalues: Lazy, components, aggregates, controled, extended a complète.
#
About SOA
SOA is a great paradigm for intégration of large heterogenous systems.
ISA is large in its intentions, but is also homigenous. So in first analysis, SOA is not retained in ISA. In place, the direct Object exchange Protocol appears uniform and suffisant.
#
A service can be an object on which the operations are called remotely.
#
The notion of view is not limited to an Object, but Is a “package” of related objects, and therefore of related views.
#
Inspite of using a hiérarchical name résolution mmeca isumm like URLs and necessary TLD,a search engineapproach is prefred. Il is Just necessary for providers to register on it and for xonsummers to ask an Object loction to several of them. The namme resoltion gakes one timme. And moreiver it cqn ne larger in functilns that Just seachibng by a name
#
Get and put ojects at the Operating Systèm Object level results un 3 opérations put, get and Search.
Thieses opeations works in modes local, remote or both
Theh result in system orders like save, load, ask, sens nd Search.
#
A run (remotely) operation has also to be incorporated.
#
`LL`
Displayable objets have opérations display and edit. They also have a set of opérations That allow them to adapt them self to the exécution context: Apply palette, appply fonts,, apply style. All the apply opérations ask the dispyable objet to do its best effort to be as close as possible to the look and feel where it is running.
#
Color Is one of the basic types (in uP?) like pixel and canvas.
Canvas are put and get from/to display device.
#
`LL`
Application is it necessary. In some way yes because we need things like container or parameters. But in fact application are Just Object runned from the OS by executing one of its constructor.
What we really need is an exécution context That can be injected on instanciation of any Objects That require it : A contextualised Object having a pointer to the exécution context (volatile or not).
#
O.S. UI is Just a Search engine targeting locally, a universe or the whole world.
It as favorites objects (or classes That are objects too) around.
Therefire one has Just to publish an Object in the universe he wanted.
Object published sould have properties like icon, description, summary, keywords…
#
See how to supports XOR constraint between relations.
#
For persustency one nreds:
– a notification mecznisum between Object and their vViews (bidirectionnal)
– A transaction manager That could ne distruted keepung track of all afgected Object or view.
– A location manager telling to Objects whzre they are located. The location us one property of persistant Objects.
#
Bibliography distributed objets:
http://slideplayer.fr/slide/514055/#
http://pagesperso.lina.univ-nantes.fr/~prie-y/ens/04-05/MIAG-SIA/CM_SIA_4.pdf
#
`LL` does not have keyword, only ponctuation. Every thing is Object.
Some Ponctuation characters , . : {}[] having usual meaning in english or mathematics.
Usual natural langage rules applies as soon as possible. For instance, the first character of an expression (a name for instance) is upper case when defined, but is lower case when used inside a phrase (an instruction).
Expressing a class:
{
Name:Person.
Name space:com e-CS Sample.
Base class:Class.
Properties:{
Name:Last Name.
Type:String.
Access:Get and set.
},{
Name:First names.
Type:string.
Multiplicity:One or more.
Container:Array.
}.
Methods:{
Name:Get age.
Return:integer.
Run:{
Return
}
}.
#
Descending navigation operator: \ antislash.
Climbing navigation operator: / slash.
#
Used in namespace, object membrers access, including collection indexing.
In object membrers access, it could be ommited if the expression is not ambiguous.
#
Security by confident tiers with wich each ends agree on and have a pre-existing crypting key.
The agreement is made thru a class refering to its provenance: The confident tiers.
This class implements its own security mecanisum.
#
With tiers of diffrents kind, (open world, government, educational, supra-national, entreprise, etc.) the communication key between two node can be made securly.
See to have some thing like a blockchain with a Proof of Authority principle. Cf. Programmez N°208 page 69.
#
Cache :
A large part of software engineering can be seen as a cache management (data base, ORM, servers, etc.).
On the other hand, cache is also often a problem because of difficulties in refreshing (when to do it, how to effectively force it, security problem by substitution (proxy, phishing), etc.).
-> ISA have to address this problematic in an uniform way.
Basicaly the answer could be : never cache except at terminator level or internally by component.
Where typical terminators are :
1/ Final storage (in/out)
2/ Final consumer (in/out)
Where components are unsecable units like microprocessors.
#
Object in memory
Object in memory starts by a sbyte. This 64bits represents its state : Persistant (have an OID), is dirty (modified), is mapped memory adress mapped to OID for the current instance execution. This last bit avoid to have an entry in the O.S. mapping table of OID to RAM adresses.
#
A sbyte, for square byte, is the word for 8×8=64bits.
#
One of this bit is dedicated to indicates test objects (either unit/integration/pre-production/production depending of the universe the object belong).
Tests objects are excluded from search exempt if the search specify it want tests objects.
#
To save space, the type string could be UTF8 and the type text UTF32 Extended with presentation 64bits characters.
#
Symbols, as Unicode norm specifies, and characters, coming from the typographical world, have to be distinguished.
String of symbols are a first type of Unicode symbols represented using UTF-8 to save space.
Text of characters are a second type of 64 bits with 32 bits for typographic characteristics and one symbol using UTF-32. This low level integrated and uniform presentation could widly improve display rendering velocity by delegation to hardware components.
Space occupation is not a concern for the last case. Remember that when 7/8 bits ASCII codes were specified, before µP where only 4 or 8 bits…
More over, in documents, block of text could be defined by (a) a String for the content and by (b) one Text character for the presentation of the whole content.
#
The display of object could be autosuffisant. This mean an object can be displayed in it self without any container (application, window or panel). This could help making composite systems.
Displayed objects could interact for display layout or even to interact more deeply at the object level, in the case of gaming applications.
Several display modes could be imagined : console, text (as MS-DOS 4.01 was), graphic, window based, etc.
#
`LL` Parameters
Management thru a dedicated object with one property per parameter.
This parameter object is either acceded directly like any other object or thru the Runtime Object. In this last case, parameters are loaded explicitly and acceded like This:
Runtime add parameters {parameter object}.
Runtime\Get parameter {parameter class full name, parameter name}.
Runtime remove parameters {parameter class full name}
The Runtime Object is the volatile face of the Operating System.
#
Displayed name and message
Displayed name is one of the property of a member.
For rendering, the following policy could be implemented at runtime to allow internationalisation supports
Variable displayed name : Runtime\Get displayed name {object property}.
Condition displayed name = null : {
displayed name : object property\Displayed name.
}.
Condition displayed name = null : {
displayed name : object property\Name.
}.
return displayed name.
NB : The syntax is not LL, in particular for conditionnal expressions.
Runtime add messages {message object}.
Runtime\Get message {message class full name, message name, substitution object}.
Runtime remove messages {message class full name}
#
`LL` Component sould be supported to load a set of classes.
Properties: Name, version, array of classes, array of dependancies, LL version.
Component is an interface.
#
This promote network transfert and compilation efficiencies.
#
O.S. command line syntax is `LL`.
The O.S. is also an Object (similar to PowerShell).
#
`LL` Objects are represented as source code because:
– Allows Terminator compilation. This Is important for performance and hardware adpatation in particular about number of CPU (some ones or undreds).
– This avoid the actual langage prolifération.
– Promote open sourcing.
Classes are stored in two variety by the O.S.: Source code and native compiled.
#
Object has an Access rights property.
Access rights controls the following concepts :
a) Access : Public, Profiles, Users.
b) Rights : Search, Read, Write, Execute.
Class is an Object. Additionnaly, Class has an Instances access rights property that controls the access rigths for all instances of that class. If Access rights property is not defined at the Object level, it inherits them of the classes it aggregates, class by class. The inheritance comes first from the Instances access rights property , and secondary, if not defined, from the Class object Access rights property.
To save space, free access could be granted when the Access rights property has no value (null).
#
The last sentence violates one Security Design Principles. Fail-Safe Defaults : The default access to an object is none.
#
To save memory occupation of an object, a 64bits fields map specify for each class what fields and properties have a value.
Then only setted bits have a corresponding 64bit value. This fields are in the class order.
Consequencies :
1/ Only 64 fields can be declared by class.
2/ If a property or a field is newly affected, the object have to be reallocated.
3/ Having many properties on the Object class is not costly.
The point 2/ impacts can be minimized by allocating a full space Object in case of new allocation (constructor) or in case of reallocation. The compiler can also prevent reallocation by its code analysis.
#
In the LL language properties are simple fields with an external visibility.
If any compute is needed, an operation have to be declared.
This approach gives a clear separation of the static and dynamic members and avoid the property versus operation dilemna encountered in C# language for instance.
#
`LL` Consider auto allocation.
When acceding a method on an Object (O) thru a property (P) of its container Object (C), if it throw an null pointer exception, the runtime catch it, and if a defaut constructor exists, allocate automaticaly the Object (O, set the property (P) and recall the method.
This feature is useful for instance for adding on collection or relationship properties.
This avoid pollution of the code by many not null checks.
#
Consider auto loops.
#
ISA Wish N°1 – Plug and play generalized
Step into
Embedded hardware and software are not a concern, exept for update.
Local ressources like power needs, connectivity needs have to ne addressed.
Remote ressources like software download, or resquesting treatment have also to ne addressed.
#
On platforms with less than N CPU, `LL` compilers allocate a single CPU/Thread/Process to a top level use cases and all of its child objets. This could affect negativly performances on this kind of systems => See how to address this problem.
On platforms with more than N CPU, LL compilers allocate a CPU/Thread/Process per object. This follows the scale out principle expressed in Wish N°2 – Distribution.
In order to avoid CPU context swapping, that push and pop all registers, and relying on the whole object world of ISA, swapping only occurs at the end of an method execution or property access. And after running the method post-conditions and object invariants. Therefore, and together with a stack of called methods on an object (the effective form of that stack have to be determined), there is no need to swap the CPU context of that object because it has ended its current execution.
For long running operations, a time quota is allocated to method execution (say 1ms for instance => about 50 000 lines of code on a 1GHz platform). If it is reached, a CPU context swapping occurs. To avoid problems on maintaining that quota counter, a dedicated register decremented at each clock cycle could be incorporated to CPU. And an interruption on that CPU thrown each time this register reach 0.
#
Visibility in `LL`.
Visibility is a property of a class or of its members.
Possible values are: private, class and its childs, object, package and its childs, module (default value), public.
A module is a class. It gather classes and modules in properties Classes and Modules.
Module is a delivery unit. It is deployed on a node. Modules must be deployed on a single node (in a universe). It could be either downladable to other nodes or runnable on its node.
It exposes a facade made of: classes and view as public members and also operations.
#
`LL` A class is an object.
An object resides (is persited, is deployed) on only one node.
A class is particular in the fact that it can create object following the structure it describes.
The class OID is its full qualified name.
Any object have an associated full view that share all its properties. Views can resides on several nodes. Get instruction on an object results in getting a full view on it. Put instruction on an object furnishing a corresponding view, results in object update (if possible).
Getted views are updated on object updates.
#
Persistence management
Persistence of objects have to be transactional. Consistant read also have to be warranted.
To do that, the solution can either rely on a locking system (like in RDBMS) or on a double buffering pattern (like for video display).
The first solution with locks slows both write and read operations, and even the whole operating system.
Double buffering clearly favorise quick reads, up to near zero cost of transactions.
This kind of persistence could be done like that:
Having a partition R, with two subpartition R1 and R2 of same size.
1-a) When all reads occur on R1, the OS write validated objects (invariants checks) in a transaction Tn on R2 and update its internal indexes.
1-b) If Tn aborts on R2, objects are rollbacked by reading R1.
2) The operating system waits for running reads on R1 to complete.
3-a) Then it swap partitions : Reads are now done on R2, and writes on R1.
3-b) Objects involved in Tn residing in memory are updated.
3-c) Tn is validated.
4-a) Before processing the next transaction Tn+1, Tn is replayed on R1.
4-b) In the same time, listeners are notified of updated objects.
With this double buffering solution, reads are not impacted at all by transactions, and writes are slowed linearly by previous ones in case of large loads. This pattern scales out easily.
For objects that are mainly writing oriented, like logs objects, a dedicated partition W can be allocated. On W objects included in a Tn transaction are written directly, but consistant read is not warrantied.
#
Persistence and storage device (disk)
While in ISA every think is an object, and like for microprocessor, the object notion could be directly supported by storage devices (or by controler cards).
Object could be acceded by their OID, the physical location management would be delegated to hardware devices. This would greatly improve I/O performances.
#
`LL` Indexing of members
In LL class definition, members should be indexed by an ordering number. This index makes easy member addressing. It avoid in many case having to rely on introspection that is slow, because of its name based access.
Index adressing is directling supported by microprocessor for table. Therefore in memory, objects members can by a simple table ordered by this externalized index.
This externalized index is present in object serialization. This improved a lot deserialization.
A design time, the index property of members can be supported by IDE thru an “auto index” affectation (similar to “default value” but with an incrementation).
#
`LL` Objects, table and indexing
As previously said at Object in memory, Object in memory starts by a sbyte. This 64bits represents its state.
More generaly a base principal can be that structured types always starts by a state sbyte.
For table, the state is its size.
In ordinar world, counting begins at 1. In computer science, it often starts at 0 because of indexed addressing of table by microprocessor. This policy, also inherited of C language, comes together with not managed length or based on a terminator (\0 for strings). This is really dirty isn’t it ?
All of that taken together plus the just above comment on Indexing of members drives to implements LL as follow :
– Index starts at 1.
– The 0 index, the address of the object, points to the state of the type.
– Tables and the like (string, etc.) state is its length.
This policy is both simple and efficient for microprocessor operations.
This comment is OK on its premise, but supported differently thru the Smart Pointer in the same spirit.
#
`LL` Historization
Have a VID that is a timestamp. Stamped by the transaction.
Mechanics of final consistency.
Complete history is reliable because link only on the OID plus the interval of duration of the version of the object, allows to know all the objects has a point in time.
The history classes have the name of the Postfix base class History. It follows the general view synchronization mecanism for update.
Historization can have a compression mechanims by only story changes, like the Historian PI.
#
Indexing OID
As the OID is generated either by increment or by a random operation, the hash code can just be the X last digits of the OID to have an good distribution. Where X is the size of the hashtable.
#
Coordinated transaction
1) lock all objects for 1minute max with a subtransaction Object per node.
2) do the job on each node giving all the other subtransactions
3) on each node if teceiving ok from all subtransactions commit. If not rollback.
4) main transaction status resulys of notification of all subtransaction
This mecanisum is completly sure, efficient and take advantage ISA.
The only problem is that each node have an Observer on all the other nodes. This makes a lot of network traffic if the number of node is important Nx(N-1) events (small).
![Nx(N-1)](/wp-content/uploads/2017/08/NxN-1.png)
#
`LL` Exceptions
Exceptions should be throwable in group in a differed way.
In a method, Exception could be accumulated one by one and at the end, an Exceptions Object thrown if it has at least two Exception inside and an Exception Object if it Is alone.
To do so, when an Exception is thrown an Interrupt processing argument could be provided to tel if the treatement continue or should stop.
#
`LL` Exceptions and log
Exceptions should logged atomatically if a logger is defined in the runtime environment.
#
`LL` maturity level
In order for LL to be accessible to both beginners and advanced organisations, it could supports a maturity level.
In function of this degree of maturity, the concepts and mandatory elements are applyed or not. But in any case, the forward compatibility in all compartments is warranted.
For instance, at beginners level comments are not mandatory and UML modeling is not available, at higher degree comments are mandatory and UML available.
#
This feature could be incorporated lately in the `LL` by selecting the features that are from available from a given matutity level.
For instance “Interrupt processing argument” on Exception could be tagged as high maturity level.
#
Persistancy
Use composition and aggregates to load objects together.
Problem 1 of Top 10 most common java performance problems
In composition, objects are also stored together because they are often used together and that it promotes storage proximity.
#
Persistancy
Problem 2 Cf. Top 10 most common java performance problème
View synchronisation can be tuned, default is deferred (thru Oberver DP). Values are : deferred, synchronised (in transaction), deprecated (mark as dirty), snapshot (not updated).
Prefer always values for settings inside components: The more tuning, the more rooms for experts.
#
Persistancy
Problem 3 Cf. Top 10 most common java performance problème
Pools, of connection or of any kind, have to be autmatically adapted by the O.S.
#
Persistancy, Security large usage
Receiving large objects and/or frequent requests have to prevented automaticaly by the O.S.
Large ressources usage coming from external or internal users must be identified and profiled. If nesserary a human user must be notified.