machinekit / machinetalk-protobuf

Protobuf declarations for machinekit messages
MIT License
10 stars 11 forks source link

Simplify PUB-SUB base types #40

Open machinekoder opened 8 years ago

machinekoder commented 8 years ago

Currently we use one type per PUB-SUB socket. Meaning the launcher service uses for example the MT_LAUNCHER_FULL_UPDATE message and the halrcomp service uses the MT_HALRCOMP_FULL_UPDATE message. That means every service needs to add new types to Container message. That would make sense if all message would be piped on the same stream. However, the service topics are already used to distinguish between different sources.

Defining generic MT_FULL_UPDATE and MT_INCREMENTAL_UPDATE messages would drastically simplify the implementation of generic language bindings.

mhaberler commented 8 years ago

yes, that was overspecified. The message topic and content is good enough to differentiate.

machinekoder commented 8 years ago

If the "sync pattern" is restructured to use PUB-SUB in both directions and the client also used MT_INCREMENTAL_UPDATE to update values then synchronizing without a master is possible.

Use case: decentralized storage, two haltalk instances talking to each other (on different machines)

mhaberler commented 8 years ago

hm, interesting

any chance of describing the protocol as a flow, like in https://github.com/mhaberler/asciidoc-sandbox/wiki/Remote-HAL-Components#halrcomp-protocol-overview ?

btw I use http://www.mcternan.me.uk/mscgen/ for doing the sequence dias

machinekoder commented 8 years ago

Yes, there are some design problems with the current protocol that should be addressed:

To solve these problem I propose a new state sync protocol.