Root / Assembly / ARCCore / AREnumType / DocumentationOnlyEnum / ARConcepts / _Member / ExposingApplicationState

EnumMemberAttribute

ExposingApplicationState

KeyValue
DescriptionThe traditional debugging process usually entails reading through logs and querying about your application state through a debugging tool. AgoRapide encourages logs and application state to be distributed over the PropertyStream by default, thereby making debugging simpler (the information is always available, and not restricted to some local access).

You are encouraged to expose your internal application state to the PropertyStream through the use of classes implementing LogContext (and possible also use PKLogAttribute) like PConcurrent.

This has two implications (as implemented by PConcurrent):
1) Any call to Log / HandleException ends up in the property stream.
2) Any change to internal properties will be reflected in the property stream automatically without even having to make 'manual' calls to Log (because all calls to -SetP- will automatically be logged to the property stream).

Some example classes inheriting PConcurrent and using this principle in AgoRapide are:

StreamProcessor (search for code like 'IP.SetPV(StreamProcessorP.ClientUpdatePositionPath ...)
ActualConnection (search for code like 'IP.Inc(ActualConnectionP.CountReceiveMessage)')

In summary, much of the inner working of these classes are automatically exposed to the property stream without any special code having to be added.
Note how manual calls to Log are also automatically exposed to the property stream in these classes.
Note how threads are always given a descriptive name in these classes, making the logging even easier to follow.

All this makes debugging and understanding the inner workings of your applications much easier reducing the need for external logging and debugging tools.

Note also that by exposing the internal application state to the PropertyStream it can be read 'from' wherever convenient.
In other words, you do not have to limit use of IP to only data-objects like 'Customer', 'Order' and similar, but you can also use it for internal parts of your application
EnumMemberExposingApplicationState
EnumTypeARCCore.ARConcepts
LongDescriptionNote that calls to Log will by default not be exposed to the PropertyStream.
See also
log.
ExceptionText, Heartbeat,
Log, HandleException

4 items


Generated 2020-10-13 11:11:01.101 UTC