hivejs / hive

:rocket: A real-time collaboration platform :zap:
http://hivejs.org
Other
50 stars 6 forks source link

broadcast API + database abstraction: Send redux actions over the wire? Use actions + reducers/actors to abstract database? #35

Open marcelklehr opened 8 years ago

marcelklehr commented 8 years ago

This would simplify plugins, make them more dry. However, sending messages would still need to be handled by custom redux middleware. Also, action creation would move to the server instead of on the client, which is no big win. However, if it were convention that plugins register action handlers, They would act on an incoming action and might send one back or send one to everyone else.

Nice about using actions to manipulate the database is that middleware can check authorization.

See also https://github.com/rackt/redux/issues/313 and https://gist.github.com/wmertens/a408e15a08301081ebad

marcelklehr commented 8 years ago

see http://scala-phase.org/talks/duncan-devore-cqrs