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

Multi-recipients #176

Open
4 tasks
jaytaph opened this issue Feb 8, 2021 · 0 comments
Open
4 tasks

Multi-recipients #176

jaytaph opened this issue Feb 8, 2021 · 0 comments
Assignees

Comments

@jaytaph
Copy link
Member

jaytaph commented Feb 8, 2021

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)
}
@jaytaph jaytaph self-assigned this Feb 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant