class
Memo::ArcanaListener
- Memo::ArcanaListener
- Reference
- Object
Overview
Serves ArcanaService's API on an Arcana::Client.
Requests run concurrently, up to max_concurrency at a time. The client calls on_message from its WebSocket read loop, so handling a request there would hold up every other request, and the replies that memo's own bus calls (the bus/* embedding formats) are waiting for.
Up to max_waiting more requests wait for a turn. Beyond that, memo answers "busy" at once instead of queueing without limit; the read loop can't simply block for backpressure, since memo's own bus calls need it.
Included Modules
Defined in:
arcana/listener.crConstant Summary
-
ADDRESS =
"memo:rag"
Constructors
Instance Method Summary
-
#handle(envelope : Arcana::Envelope) : Nil
Answer one request envelope.
-
#listen : Nil
Answer requests arriving on the client
-
#save_periodically(interval : Time::Span) : Nil
Every
interval, save the indexes of open namespaces that are due.
Instance methods inherited from module Memo::BusLog
log(msg : String)
log,
redact_db_url(url : String) : String
redact_db_url,
sensitive?(key : String) : Bool
sensitive?,
summarize(data : JSON::Any) : String
summarize,
truncate(s : String, max : Int32 = 50) : String
truncate
Class methods inherited from module Memo::BusLog
output : IO
output,
output=(output : IO)
output=
Constructor Detail
Instance Method Detail
Every interval, save the indexes of open namespaces that are due.
Memo saves on its own after writes; this catches changes that have
gone unsaved too long without further writes.