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

Bit of refactoring in progress #497

Open
badgerwithagun opened this issue Sep 21, 2019 · 1 comment
Open

Bit of refactoring in progress #497

badgerwithagun opened this issue Sep 21, 2019 · 1 comment
Assignees
Labels
refactor Technical task urgent

Comments

@badgerwithagun
Copy link
Member

I've been trying to clean up the front end code (I've learned a lot about front end architecture since started writing Orko) to improve and localise state management, reduce dependency on Redux and incorporate React Hooks. I'm also working towards more sensible JS bundles, specifically targeting having the login code in a specific bundle which is the only one visible when not logged in.

What has become clear is that a clean React application (with unidirectional messaging) and two-way websockets (bidirectional messaging) are not good bedfellows. The only reason we have two-way messaging is to reduce the message volume to only those messages related to the coin currently focused, but to be hones, that could easily be achieved by disconnecting, reconnecting and subscribing on handshake and it would simplify the architecture all the way down.

I'm looking at removing the concept of stateful websockets from the backend, replacing them with a gateway such as Pushpin. This would open an easy route to minimising the stateful part of the back end (fetching, aggregating and caching all the data from the various exchanges) to a dedicated service and splitting apart the APIs to separate, stateless services.

This should all make everything a lot simpler to follow and in the process eliminate weird bugs like #394. It should then be much easier to implement features like #369 which I've been slow to implement.

@badgerwithagun badgerwithagun self-assigned this Sep 21, 2019
@badgerwithagun
Copy link
Member Author

badgerwithagun commented Oct 12, 2019

First tranche of changes - #501 - merged.

More to come - plenty of TODOs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Technical task urgent
Projects
None yet
Development

No branches or pull requests

1 participant