bitmaelum-suite
bitmaelum-suite copied to clipboard
Multi-recipients
Implement the multi-recipient setup (see wiki https://github.com/bitmaelum/bitmaelum-suite/wiki/Multiple-recipients-(CC-and-BCC) and https://github.com/bitmaelum/bitmaelum-suite/wiki/Proposal-multi-recipients).
- [ ] delivery pool configurable pool of workers that will deliver a block either remotely or locally.
- [ ] proof-of-work pool this pool will either create a proof-of-work ticket, or returns quickly with a "in-progress" status. it should cache tickets so we can later fetch the ticket for uploading other blocks as well.
- [ ] setup receiving side that will push blocks to the queue
- [ ] update ticket system on client and server side to add extra info (header, blocks etc)
func createPool() {
for i:=0; i!=25; i++ {
go poolWorker()
}
}
func poolWorker() {
for {
data <- queueChannel
ticket := ticketPool.getTicket(data.Header)
if ticket == nil {
// requeue data for later when the ticket is finished
queueChannel <- data
continue
}
deliver(data.Header, data.Block) // or catalog, or attachment)
}