Refactor streaming transports and channels

Aperta
#7 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python, redis

Direzione di ricerca

Inizia leggendo i moduli esistenti callosum.lower.dispatch_redis, callosum.lower.rpc_redis e callosum.pubsub.message/channel, quindi confronta i relativi pattern di trasporto con callosum.lower.zeromq. Il lavoro è completato quando i trasporti Redis e i canali stream sono separati come descritto, l’API stream supporta i pattern broadcast e shared-queue, ZeroMQ può fornire trasporti compatibili e i moduli lower espongono factory di trasporto consigliate.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement help wanted

Now channels and transports are coupled together.

Currently we have the following modules:

  • callosum.lower.dispatch_redis
    • RedisStreamAddress
    • DispatchRedis{Connection,Connector,Binder,Transport}
  • callosum.lower.rpc_redis
    • RedisStreamAddress
    • RPCRedis{Connection,Connector,Binder,Transport}
  • callosum.pubsub.{message,channel}
    • StreamMesasge
    • Publisher
    • Consumer

One of the problem is that Redis' STREAM APIs are too complicated for our use cases.
We just need two communication patterns as in Backend.AI v19.09's event bus: fan-out broadcast & shared pipeline queue (without grouping and acks, and topic-based subscription routing can be simply done in Python instead of Redis).
Let's make the detailed grouped message streaming as a future work.
Also, the current proposal does not take "ack" into account, but later we could do it with the Redis STREAM API.

This should be refactored into:

  • callosum.lower.redis
    • Redis{Pipeline,PubSub}Address
    • RedisBaseTransport
    • RedisPipeline{Connection,Connector,Binder,Transport}
    • RedisPubSub{Connection,Connector,Binder,Transport}
    • RedisRPC{Connection,Connector,Binder,Transport}
  • callosum.stream.{message,channel}
    • StreamMesage which contains the topic, the timestamp, and the body.
    • Publisher, Subscriber (fan-out broadcasting)
    • Producer, Consumer (shared queue aka pipeline)

And the stream module should be compatible with:

  • callosum.lower.zeromq
    • ZeroMQ's pub/sub connection, connector, binder, and transport
    • ZeroMQ's push/pull connection, connector, binder, and transport

We also need to let "lower" modules to provide a factory function that returns recommended combination of transports for different types of channels.

Lingua principale
Python
Stelle
22
Fork
3
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di lablup/callosum

Tutte le issue di lablup/callosum

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.