]> Entropealabs - wampex.git/commitdiff
link to session.json
authorChristopher <chris@entropealabs.com>
Fri, 21 Feb 2020 05:49:36 +0000 (23:49 -0600)
committerChristopher <chris@entropealabs.com>
Fri, 21 Feb 2020 05:49:36 +0000 (23:49 -0600)
README.md

index 7ea633e065e7113c0707bead5465ef5a8420c9fe..be53c9a47942a73d543d7544862d952c3c48bbe0 100644 (file)
--- a/README.md
+++ b/README.md
@@ -150,107 +150,9 @@ WAMPex currently maps each session to a seperate transport connection. This mean
 
 Internally WAMPex uses [Registry](https://hexdocs.pm/elixir/Registry.html#module-using-as-a-pubsub) for local PubSub. Subscriptions and Callees are registered with separate Registry instances, partitioned over the available system CPU cores.
 
-The Session management is handled by a state machine, written using [StatesLanguage](https://github.com/citybaseinc/states_language). The JSON looks like this.
-
-```json
-{
-  "Comment": "Session State Machine",
-  "StartAt": "WaitForTransport",
-  "States": {
-    "WaitForTransport": {
-      "Type": "Task",
-      "Resource": "InitTransport",
-      "TransitionEvent": "{:connected, true}",
-      "Next": "Init",
-      "Catch": [
-        {
-          "ErrorEquals": ["{:connected, false}"],
-          "Next": "Abort"
-        }
-      ]
-    },
-    "Init": {
-      "Type": "Task",
-      "Resource": "Hello",
-      "TransitionEvent": ":hello_sent",
-      "Next": "Established",
-      "Catch": [
-        {
-          "ErrorEquals": [":abort"],
-          "Next": "Abort"
-        }
-
-      ]
-    },
-    "Established": {
-      "Type": "Choice",
-      "Resource": "Established",
-      "Choices": [
-        {
-          "StringEquals": ":message_received",
-          "Next": "HandleMessage"
-        },
-        {
-          "StringEquals": ":goodbye",
-          "Next": "GoodBye"
-        },
-        {
-          "StringEquals": ":abort",
-          "Next": "Abort"
-        }
-      ]
-    },
-    "HandleMessage": {
-      "Type": "Choice",
-      "Resource": "HandleMessage",
-      "Choices": [
-        {
-          "StringEquals": ":noop",
-          "Next": "Established"
-        },
-        {
-          "StringEquals": ":event",
-          "Next": "Event"
-        },
-        {
-          "StringEquals": ":invocation",
-          "Next": "Invocation"
-        },
-        {
-          "StringEquals": ":abort",
-          "Next": "Abort"
-        },
-        {
-          "StringEquals": ":goodbye",
-          "Next": "GoodBye"
-        }
-      ]
-    },
-    "Event": {
-      "Type": "Task",
-      "Resource": "HandleEvent",
-      "Next": "Established"
-    },
-    "Invocation": {
-      "Type": "Task",
-      "Resource": "HandleInvocation",
-      "Next": "Established"
-    },
-    "GoodBye": {
-      "Type": "Task",
-      "Resource": "GoodBye",
-      "End": true
-    },
-    "Abort": {
-      "Type": "Task",
-      "Resource": "Abort",
-      "End": true
-    }
-  }
-}
-```
+The Session management is handled by a state machine, written using [StatesLanguage](https://github.com/citybaseinc/states_language). You can view the specification in [priv/session.json](priv/session.json).
 
-You can copy and paste this snippet into the JSON input at https://citybaseinc.github.io/states-language-editor/ to edit and visualize the state machine.
+You can copy and paste the JSON into the JSON input at https://citybaseinc.github.io/states-language-editor/ to edit and visualize the state machine.
 
 ## Local Development