sealed abstract class Config extends FixedConfigProps with DerivedConfigFromFixedProps
See Config$ for methods to load configs. The print-config
and print-full-config
of
glngn.server.host.HostApp can be used to examine the config.
Configuration loading is a bit convoluted. The primary aspect driving this is: The initial values of configurations that must be loaded from the hocon must also be derived using functions on the configuration and environment. Which necessitates first loading a partial config then loading the full config with derived values injected.
The design used here loads the config through the follow steps:
1. First the configuration file is loaded with all derived values equal to exactly "<derived
TYPE>". Where TYPE is a description. This is a FixedConfigProps
instantiated by
Config.base
.
Only configuration in glngn.server
will be derived. All other configuration will reference
the value from glngn.server
2. Initial tuning factors are instantiated from (base, environment probes)
3. All properties with "<derived TYPE>" are derived given (base, tuning)
4. All derived properties are *serialized* to corresponding hocon.
5. This serialized typesafe config is applied *prior to application.conf*. This forms the
Config. Which finally provides the full Config interface of FixedConfigProps,
DerivedConfigProps, and an initialTuning
of TuningConfigProps.
The result is a config that should be easy enough to understand from reading reference.conf
. With
the exact config of glngn.server
output by the config
server execution option.
- Alphabetic
- By Inheritance
- Config
- DerivedConfigFromFixedProps
- DerivedConfigProps
- FixedConfigProps
- ScopedConfigProps
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
trait
ProbesConfigProps extends AnyRef
Configuration attributes for probes derived from the current environment, fixed and tuning props.
Configuration attributes for probes derived from the current environment, fixed and tuning props.
- Definition Classes
- DerivedConfigProps
-
trait
ReferenceProps extends AnyRef
All library reference.conf overrides.
All library reference.conf overrides. Names do not reflect the entire path of the config being derived. The focus is on reflecting the logical not physical.
- Definition Classes
- DerivedConfigProps
-
trait
SLAConfigProps extends AnyRef
Configuration attributes for core service SLAs derived from the current environment, fixed and tuning props.
Configuration attributes for core service SLAs derived from the current environment, fixed and tuning props.
- Definition Classes
- DerivedConfigProps
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
val
clientTimeout: Finite
From the client, all requests are expected to complete within clientTimeout.
From the client, all requests are expected to complete within clientTimeout. Which is some factor above delegateTimeout.
- Definition Classes
- DerivedConfigFromFixedProps → DerivedConfigProps
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
val
clusterPort: Int
Port used for akka cluster/remote
Port used for akka cluster/remote
- Definition Classes
- FixedConfigProps
-
val
cycleTime: Finite
The cycle time is less than the max lifetime, if non-zero, by a random amount *per node* from 1 minute to 1 hour.
The cycle time is less than the max lifetime, if non-zero, by a random amount *per node* from 1 minute to 1 hour. If max lifetime is zero, meaning disabled, then this is 0.
- Definition Classes
- DerivedConfigFromFixedProps → DerivedConfigProps
-
val
defaultPersistence: String
- Definition Classes
- FixedConfigProps
-
val
defaultSnapshotCount: Int
- Definition Classes
- DerivedConfigFromFixedProps → DerivedConfigProps
-
val
defaultSnapshotInterval: Int
Default number of events between snapshots for entities.
Default number of events between snapshots for entities. This assumes the entity is 4k (min accounted read/write size)
Derive from:
- the size of the State marshalled structure
- the (max) size of the storage event structures
- the persistence performance bounds
Goal is:
- time to serialize state T(persist-state)
- time to deserialize state T(replay-state)
- time to serialize storage event T(persist-event)
- time to deserialize storage event T(replay-event)
- assuming: The delay from event parsed till handler invoked is equal to the maximum replay time.
1. the delegateTimeout must be greater than T(replay) + T(handler) + T(persist)
2. T(replay) is O(interval*T(replay-event) + T(replay-state))
3. T(persist) is O(T(persist-event) + T(persist-state))
4. T(handler) is SLA (delegateTimeout)
Without marshalled structure size, assumptions are made. Plus the current dynamodb persistence plugin has a minimum event persist/replay time (see #59).
Assuming:
1. T(persist-event) is 10 ms 2. T(replay-event) is 10 ms 3. T(persist-state) and T(replay-state) are T(event) * 10 = 100ms
interval*T(event)+T(state) + T(handler) + T(event) + T(state) (interval+1)T(event) + 2T(state) = 0.1*basePerf interval + 1 = (0.1*basePerf - 2*T(state))/T(event) Scale a bit over unity... interval = (0.1*basePerf - 2*T(state))/T(event)
Which, in this case, would end up (0.1 * 10s - 200ms)/20ms = 40
- Definition Classes
- DerivedConfigFromFixedProps → DerivedConfigProps
-
val
delegateTimeout: Finite
All implementations for a REST request must complete within requestTimeout.
All implementations for a REST request must complete within requestTimeout. Requests are expected to support a SLO a factor above this timeout.
- Definition Classes
- DerivedConfigFromFixedProps → DerivedConfigProps
-
val
deploymentConfig: DeploymentConfig
- Definition Classes
- FixedConfigProps
-
val
entityAutoPassivateTimeout: Finite
Automatically passivate entities if no requests after this time.
Automatically passivate entities if no requests after this time. Hypothesized to be around two orders of magnitude longer than basePerf.
- Definition Classes
- DerivedConfigFromFixedProps → DerivedConfigProps
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getDouble(path: String): Double
- Definition Classes
- ScopedConfigProps
-
def
getDuration(path: String): Finite
- Definition Classes
- ScopedConfigProps
-
def
getInt(path: String): Int
- Definition Classes
- ScopedConfigProps
-
def
getString(path: String): String
- Definition Classes
- ScopedConfigProps
-
val
hasSlowStart: Boolean
- Definition Classes
- FixedConfigProps
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
val
initTimeout: Finite
Initialization timeout.
Initialization timeout. Initialization is: All ports bound and listenning. Cluster initialization process started.
Given baseSamplePeriod, the number of samples expected to fail before declaring this node DOA is hypothesized to be around 3. Which is at most 4 sample periods.
- Definition Classes
- DerivedConfigFromFixedProps → DerivedConfigProps
- final val initialTuning: TuningConfigProps
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
val
isSingleProcess: Boolean
- Definition Classes
- FixedConfigProps
-
val
maxLifetime: Finite
The maximum lifetime of any server instance or 0.
The maximum lifetime of any server instance or 0. Server application will automatically exit a random interval before this time: cycleTime.
- Definition Classes
- FixedConfigProps
-
val
maxNodeCount: Int
Maximum number of nodes that will exist for this incarnation of the cluster.
Maximum number of nodes that will exist for this incarnation of the cluster. Strongly avised never to change unless certain the number of nodes will be greater.
Cannot be changed without purging shard persistence records and full cluster down. (or changing record prefix?)
- Definition Classes
- FixedConfigProps
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
val
opsPort: Int
Port for http management of this node's server.
Port for http management of this node's server.
- Definition Classes
- FixedConfigProps
-
val
parent: Impl
- Definition Classes
- ScopedConfigProps
-
val
probes: ProbesConfigProps
Configuration attributes for probes derived from the current environment, fixed and tuning props.
Configuration attributes for probes derived from the current environment, fixed and tuning props.
- Definition Classes
- DerivedConfigFromFixedProps → DerivedConfigProps
-
val
reference: ReferenceProps
- Definition Classes
- DerivedConfigFromFixedProps → DerivedConfigProps
-
val
scope: String
- Definition Classes
- ScopedConfigProps
-
val
self: com.typesafe.config.Config
- Definition Classes
- ScopedConfigProps
-
val
serverBindInterface: String
Interface to bind the server port to.
Interface to bind the server port to.
- Definition Classes
- FixedConfigProps
-
val
serverPort: Int
Port serving this cluster's applications.
Port serving this cluster's applications.
- Definition Classes
- FixedConfigProps
-
val
shutdownTimeout: Finite
Shutdown timeout.
Shutdown timeout. The shutdownTimeout should be larger than the shutdown grace period in kubernetes.
Hypothesis is the shutdown timeout depends on the available storage bandwidth as well as number of shards. Maybe entities?
#94 Hardcoded to 120 s
- Definition Classes
- DerivedConfigFromFixedProps → DerivedConfigProps
-
val
sla: SLAConfigProps
Configuration attributes for core service SLAs derived from the current environment, fixed and tuning props.
Configuration attributes for core service SLAs derived from the current environment, fixed and tuning props.
- Definition Classes
- DerivedConfigFromFixedProps → DerivedConfigProps
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- DerivedConfigProps → AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
object
dynamodb extends ScopedConfigProps
- Definition Classes
- FixedConfigProps
glngn server is a low-code business process as a service rapid development system. Conceptually similar to a programmable Microsoft Access or Apple FileMaker for scalable event sourced business services. In addition to a library, a standalone application is provided that is useful with minimal ceremony. This can be customized with a simple API. As well as deployed to a kubernetes cluster should those advantages be required.
A deployment is cluster of glngn.server.node.AppNodes serving a dynamic composition of glngn.server.ServiceFragments. Deployments are designed to be fully usable as a standalone local application or a kubernetes service.
Contact support@dogheadbone.com for support and licensing.