-
Notifications
You must be signed in to change notification settings - Fork 5
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
[feat] initial draft of delegate server #217
[feat] initial draft of delegate server #217
Conversation
MangoIV
commented
Mar 27, 2023
- add Delegate Server and types
- rewrite the Main to work with a proper server
- some changes to handle serialisation
- add Delegate Server and types - rewrite the Main to work with a proper server - some changes to handle serialisation
I think a possible solution for the concurrency issue is having a |
I will implement that tomorrow then |
Inwards it can be a TQueue, I think. Outwards I'll use TChan |
Hey @MangoIV have a look at this pr I have already added a Also - this might have been already discussed - but I don't think we should pass a tick here. Ideally we can listen for websocket connections and spawn a thread thread to handle each incoming request. |
- two channels, an incoming and an outgoing one - incoming channel receives from all clients and gets flushed by the consumer - outgoing channel is a broadcast channel that gets cloned by each client and then sends all events back to the frontend
- factor out Tracing in a separate module - remove tagless final style where sensible - haddock
1e49810
to
788f0d6
Compare
- fixes that Gregory requested - nicer logging - some fork off handler
788f0d6
to
3cdeb11
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still think mbQueueAuctionPhases
is not best way to separate function.
subscribes to the broadcast channel and sends to | ||
the incoming channel of the delegate runner | ||
-} | ||
delegateServerApp :: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not understand naming of this function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a ServerApp and specifically the serverApp that is run by the delegate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is app in it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well it's a ServerApp, which is a function from PendingConnection -> IO ()
https://hackage.haskell.org/package/websockets-0.12.7.3/docs/Network-WebSockets.html#t:ServerApp
…ent-real-network-interface-to-be-used-by-frontend-for-delegate-server
…ent-real-network-interface-to-be-used-by-frontend-for-delegate-server
- derivive pretty via show instead of using viaShow directly - more documentation - more where clauses where possible - separation of the startWorker function - factor out some part of the serverlog
f46bd78
to
4d12653
Compare
Looks like all conversations are resolved here. LGTM |