Packages

  • package root

    glngn server is a low-code business process as a service rapid development system.

    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.

    Definition Classes
    root
  • package glngn
    Definition Classes
    root
  • package server

    Definition Classes
    glngn
  • package core
    Definition Classes
    server
  • package entities
    Definition Classes
    server
  • package host
    Definition Classes
    server
  • package model
    Definition Classes
    server
  • package prelude

    Provides a custom prelude that re-exports common dependencies.

    Provides a custom prelude that re-exports common dependencies. This will re-export

    Useful for initial developments. If the external prelude conflicts with additional imports there will be odd "no implicit found" errors. In which case this prelude is not appropriate to use.

    import glngn.prelude._

    Use of this prelude is not required. Each aspect is provided as a mix-in and separate object.

    For example, to import only the types and values defined in glngn.server that are generally useful for development:

    import glngn.server.prelude.GlngnServerPrelude._
    Definition Classes
    server
  • package services
    Definition Classes
    server
  • AppEnvironment
  • AppIO
  • Config
  • ServiceEntity
  • ServiceFragment

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.

Linear Supertypes
DerivedConfigFromFixedProps, DerivedConfigProps, FixedConfigProps, ScopedConfigProps, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Config
  2. DerivedConfigFromFixedProps
  3. DerivedConfigProps
  4. FixedConfigProps
  5. ScopedConfigProps
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. 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
  2. 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
  3. 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

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. 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
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  7. val clusterPort: Int

    Port used for akka cluster/remote

    Port used for akka cluster/remote

    Definition Classes
    FixedConfigProps
  8. 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
  9. val defaultPersistence: String
    Definition Classes
    FixedConfigProps
  10. val defaultSnapshotCount: Int
    Definition Classes
    DerivedConfigFromFixedProps → DerivedConfigProps
  11. 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
  12. 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
  13. val deploymentConfig: DeploymentConfig
    Definition Classes
    FixedConfigProps
  14. 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
  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  17. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. def getDouble(path: String): Double
    Definition Classes
    ScopedConfigProps
  20. def getDuration(path: String): Finite
    Definition Classes
    ScopedConfigProps
  21. def getInt(path: String): Int
    Definition Classes
    ScopedConfigProps
  22. def getString(path: String): String
    Definition Classes
    ScopedConfigProps
  23. val hasSlowStart: Boolean
    Definition Classes
    FixedConfigProps
  24. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  25. 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
  26. final val initialTuning: TuningConfigProps
  27. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  28. val isSingleProcess: Boolean
    Definition Classes
    FixedConfigProps
  29. 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
  30. 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
  31. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  32. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  33. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  34. val opsPort: Int

    Port for http management of this node's server.

    Port for http management of this node's server.

    Definition Classes
    FixedConfigProps
  35. val parent: Impl
    Definition Classes
    ScopedConfigProps
  36. 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
  37. val reference: ReferenceProps
    Definition Classes
    DerivedConfigFromFixedProps → DerivedConfigProps
  38. val scope: String
    Definition Classes
    ScopedConfigProps
  39. val self: com.typesafe.config.Config
    Definition Classes
    ScopedConfigProps
  40. val serverBindInterface: String

    Interface to bind the server port to.

    Interface to bind the server port to.

    Definition Classes
    FixedConfigProps
  41. val serverPort: Int

    Port serving this cluster's applications.

    Port serving this cluster's applications.

    Definition Classes
    FixedConfigProps
  42. 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
  43. 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
  44. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  45. def toString(): String
    Definition Classes
    DerivedConfigProps → AnyRef → Any
  46. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  47. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  48. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  49. object dynamodb extends ScopedConfigProps
    Definition Classes
    FixedConfigProps

Inherited from DerivedConfigFromFixedProps

Inherited from DerivedConfigProps

Inherited from FixedConfigProps

Inherited from ScopedConfigProps

Inherited from AnyRef

Inherited from Any

Ungrouped