Userflows
Userflows shows how Grainite can be used to analyze user session (cookie) data in real-time and provide the latest state of the user sessions to applications that end-users interact with so that users get a seamless experience even when switching between devices.
If you haven't already, follow the environment setup guide to setup the gx CLI, get the sample apps, and compile them. After doing so, you will be able to access Userflows under samples/userflows
.
Deploy Userflows onto Grainite
gx
reads the application YAML file to parse what tables and topics are needed, and where the app jar is located. This information is then sent to the Grainite server to deploy the application.
By default, gx will look for a YAML configuration file in the current directory. If one is not found or is not valid, gx will throw an exception for most commands. To specify a particular YAML configuration file, you can use gx <sub command(s)> -c <path to config file>
.
Run Userflows
Run a script to send 1000 events at a rate of 100 events/second to the Grainite server.
Observing Userflows
To see what happened, you can look at a couple of things:
App log
Events in a Topic
Grains in a Table
1. App Log
The following command will print the application logs.
2. Events in a Topic
Run the below command. gx
will then ask you to select a topic in the application and will print the events in that topic.
3. Grains in a Table
Run the below command. gx
will then ask you to select a table in the application and will print the grains in that table.
Last updated