Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Rewrite #12

Merged
merged 24 commits into from
Jan 27, 2020
Merged

Rewrite #12

merged 24 commits into from
Jan 27, 2020

Conversation

severo
Copy link
Collaborator

@severo severo commented Jan 22, 2020

No description provided.

See https://github.com/gdyrrahitis/pcard

In particular:
- use typescript
- use mocha, chai and nyc for integration and unit tests
- modularize
- also includes two classes to log in the server: in the console (by
default, for production for example), and in a local property (for
tests)
- also allow to only pass 1 parameter to the loggers
It will give the possibility to add new funtionalities to:
- send individual changes (ie. "that user has changed their color")
- track other users interactions, ie. show the point moved by a specific
user in Occupapp, setting the color of the point according to the user's
color
- possibly some direct exchanges between users
and send it to the new connected clients
Note that the state is not propagated to the other clients, after the
state had been succesfully updated.
In effect, the only purpose of the state is to give a new user its
initial state.

Its the duty of every client to send their changes directly to the other
clients (that's the idea of websockets)
also: refactor to remove dead code
and also fix a log message when user is created
Should resolves the problem of "ghosts" users.

In particular, see https://socket.io/docs/client-api/#new-Manager-url-options

> timeout | 20000 | connection timeout before a connect_error and
>         |       | connect_timeout events are emitted

The client should be disconnected after the timeout, and the user should be
removed from the list (not tested - don't know how to simulate this)
The state was not sent to the other clients.
@severo severo marked this pull request as ready for review January 27, 2020 22:39
@severo severo merged commit 45a65c4 into LyonDataViz:master Jan 27, 2020
@severo severo deleted the rewrite branch January 27, 2020 22:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant