Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup Websocket consumers #62

Open
Tracked by #58
tomtitherington opened this issue Feb 23, 2024 · 0 comments
Open
Tracked by #58

Setup Websocket consumers #62

tomtitherington opened this issue Feb 23, 2024 · 0 comments
Labels
scope: backend Work involving the backend / Django REST project. scope: tests Work relating to tests. size: hours This should take less than a day. type: setup Something that needs setting up.

Comments

@tomtitherington
Copy link
Contributor

tomtitherington commented Feb 23, 2024

Background & Context*

Set up a Websocket consumer that upon a successful connection via a client, exposes a "person session".

Goal*

  • A client can connect via an "identify" request using their project API key, the person's email and any properties of that person.
  • If the connection is successful/accepted then the Websocket server will reply with the "person session" which contains details of their currently active flows.

Implementation Details*

I'm thinking that the "person session" payload should look something like this:

{
  "person_uuid": "string",
  "person_email": "string",
  "active_flows": [
    {
      "flow_instance_uuid": "string",
      "flow_schema_identifier": "string"
    }
  ]
}

Other details can be returned by passing different payloads/parameters within requests to the Websocket. They are not included as part of this piece of work.

Should we be using the Django Channels REST Framework? Will this save us time or make the implementation cleaner?

Acceptance Criteria*

  • A client should be able to connect to the endpoint via ws://.
  • A client needs to provide their API key and person email for connection to be accepted.
  • Upon successful connection, the server should reply with a JSON payload that contains the "person session" (see Implementation Details above).
  • A client needs to be able to terminate the session.

Additional Information

  • This is just setup work related to the initial connection request and should not include retrieving details about a step, calling a transition for a person .. etc. They will be covered via other issues.

*required field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: backend Work involving the backend / Django REST project. scope: tests Work relating to tests. size: hours This should take less than a day. type: setup Something that needs setting up.
Projects
Status: 🔖 Planned
Development

No branches or pull requests

1 participant