Enhancement #458
Remove ServerRequestId in Request Event?
Status: | Resolved | Start date: | 07/30/2011 | |
---|---|---|---|---|
Priority: | Low | Due date: | ||
Assignee: | J. Moringen | % Done: | 100% | |
Category: | Specification | |||
Target version: | 0.4 |
Description
See RequestReply for an explanation of the current scheme.
I think, we could implement this more efficiently as follows:- The request event does not have a
ServerRequestId
meta-data item - The requesting
RemoteServer
uses the event id (let's call itREQUEST_EVENT_ID
here) to identify the method call - The providing
Server
adds a meta-data itemin-reply-to: REQUEST_EVENT_ID
to its reply event - The requesting
RemoteServer
associates replies to requests using thein-reply-to
meta-data items
- Implement in Java ✓ (nothing to do since the functionality is not implemented)
- Implement in C++ ✓
- Implement in Python ✓
- Implement in Common Lisp ✓
- Update Specification ✓
Associated revisions
Do not send additional id in method calls in rsb/patterns/__init__.py
refs #458
refs #458
- rsb/patterns/__init__.py: do not add user-item ServerRequestId and
send the request before storing the call in RemoteMethod.__call__;
use user-item rsb:reply in RemoteMethod._handleReply; use rsb:reply
and rsb:error? in LocalMethod._handleRequest
Do not send additional id in method calls in src/rsb/patterns/*Server*
refs #458
refs #458
- src/rsb/patterns/RemoteServer.{h,cpp}: added typedefs for mutex and
lock types in WaitingEventHandler; changed mutex to recursive_mutex
in WaitingEventHandler; use rsb:reply in
WaitingEventHandler::handle; do not send ServerRequestId user-item
in RemoteServer::callMethod; use rsb:error? user-item; send event
before storing the method call - src/rsb/patterns/Server.cpp: use event id instead of user-item
ServerRequestId to identify method calls in RequestHandler::handle;
changed user-item isException -> rsb:error?
Fixed incorrect variable reference in rsb/patterns/__init__.py
refs #458
refs #458
- rsb/patterns/__init__.py: fixed incorrect variable reference in
LocalMethod._handleRequest
Removed leftover debugging stuff in src/rsb/patterns/RemoteServer.cpp
refs #458
refs #458
- src/rsb/patterns/RemoteServer.cpp: removed leftover debug output in
WaitingEventHandler::handle
Adapted client/server implementation to changed spec in src/patterns/
refs #458
refs #458
- src/patterns/variables.lisp: new file
(local-call): new special variable; used to detect direct method
calls within a single thread - src/patterns/remote-server.lisp
(setf %method-listener :after t remote-method): exploit
`*local-call*' if possible
(call t remote-method event): do generate a UUID for the call, but
let the remote server use the event id in its reply; bind
local-call; store the call after sending the event; change
user-item key isException -> rsb:error? - src/patterns/local-server.lisp (call :around t local-method event):
removed; method calls do not use the checked user-item anymore
(call t local-method event): use event id to identify request
instead of dedicated user-item ServerRequestId; exploit
local-call, if possible - cl-rsb.asd (system cl-rsb): added file src/patterns/variables.lisp;
added dependencies of src/patterns/{local,remote}-server.lisp on
src/patterns/variables.lisp
Fixed certain keywords in src/transport/spread/conversion.lisp
refs #458
refs #458
- src/transport/spread/conversion.lisp (keyword-readtable): new
variable; contains a readtable for converting between keywords and
strings
(keyword->bytes): use keyword-readtable; use symbol names
containing ':' unmodified instead of printing them with the special
readtable
(bytes->keywords): use keyword-readtable; don't choke on strings
containing ':'
History
#1 Updated by J. Moringen over 12 years ago
- Description updated (diff)
- Status changed from Feedback to In Progress
#2 Updated by J. Moringen over 12 years ago
- Description updated (diff)
- % Done changed from 0 to 10
#3 Updated by J. Moringen over 12 years ago
- Description updated (diff)
- % Done changed from 10 to 80
#4 Updated by J. Moringen over 12 years ago
- Description updated (diff)
- Status changed from In Progress to Resolved
- % Done changed from 80 to 100