Add support for more flexible backend streams
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- haskell
- Ambito
- networking
Direzione di ricerca
Start by reviewing HaskellNet's IMAP stream handling and the BSStreamM approach in the linked monadio branch. Compare that with the proposed conduit-based connection model and determine which direction has consensus. Done means a scoped, agreed design for flexible backend streams rather than an unresolved choice between alternatives.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I wanted to use IMAP with TLS and this turned out to be quite complex. (Relates to #7.) So far, I found these solutions:
-
Use threads - one for wrapping a connection into TLS and another for the actual IMAP handling. This is awful.
-
Use
MonadIOinstead ofIOeverywhere. I already tried this variant in this branch for IMAP. It seems to work well and I was able to fuse such patched IMAP with network-conduit. The main part looks like this:main = runTCPClient (clientSettings 143 (BS.pack "imap.centrum.cz")) capabilities capabilities :: Application IO capabilities ad = appSource ad $= f $$ appSink ad where f :: Conduit BS.ByteString IO ByteString f = do c <- connectStream conduitBSStream capability c >>= liftIO . print logout c type BSPipe m = ConduitM ByteString ByteString m conduitBSStream :: (Monad m) => BSStreamM (BSPipe m) -- implementation ...Here
BSStreamMis a (backward compatible) modification that takes an arbitraryMonadIOinstead ofIO. This allows us to run the whole code inConduitinstead ofIOand so the actions inBSStreamMcan be operations constructed usingConduitprimitives. (Full example code here).This modification adds generality and the only loss is slightly more complex type signatures.
-
Modify HaskellNet so that it's based on conduit instead of
IO. I don't have a clear picture yet. The general idea is that connection wouldn't hold aBSStreambut aSinkfor network output and aResumableSourcefor network input. This would allow to plug in any conduit, even a pure one (for testing, for example).
I'm willing to participate on those changes, if we reach some consensus.
- Lingua principale
- Haskell
- Stelle
- 92
- Fork
- 57
- 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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di qnikst/HaskellNet
-
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 65/100
qnikst/HaskellNet#125 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
qnikst/HaskellNet#107 · 1 commento ·
-
feature
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
qnikst/HaskellNet#84 ·
-
feature
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
qnikst/HaskellNet#80 ·
-
feature help needed
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
qnikst/HaskellNet#77 ·
Tutte le issue di qnikst/HaskellNet
Issue simili
-
needs triage type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
haskell/cabal#12525 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
validateXmirOptions error message is missing the word 'option'Forse già presa @opusstudiohq-max l’ha presa 1 giorno fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
objectionary/phino#2256 ·
I maintainer di solito rispondono entro 1 giorno
-
30-minutes algorithm any-language codewars dart easy elixir hackerrank hacktoberfest haskell help wanted interview-prep julia leetcode lua open-source r scala students zig
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Huerte/algo-solutions-python#163 ·
I maintainer di solito rispondono entro 1 giorno
-
subsystem: saw-core type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
GaloisInc/saw-script#3516 ·
I maintainer di solito rispondono entro 1 giorno
-
linear
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
MercuryTechnologies/ghciwatch#466 ·