DJDNS / go-deje

Golang library for DEJE Next, a protocol/technology for decentralized document hosting and concurrent editing.
GNU Lesser General Public License v2.1
8 stars 0 forks source link

Rework the way the TimestampService works #3

Closed MaddieM4 closed 10 years ago

MaddieM4 commented 10 years ago

Instead of a services module, we can just have a timestampers module, and a TimestampService interface of:

type TimestampService interface {
    // Get an ordered list of timestamp IDs
    GetTimestamps(topic string) []string
}

If we just treat timestamps as strings, rather than objects, it makes implementations of TimestampService a lot more flexible, and completely obviates the need for TimestampManagers. It also allows us to abstract all the high-level validation and traversal logic into an external system, so that none of the Document or DocState internals need to care about it.

MaddieM4 commented 10 years ago

Creating the TimestampTracker in another ticket.