[Tarantool-patches] [PATCH 3/6] iproto: Add negotiation phase
Konstantin Osipov
kostja.osipov at gmail.com
Wed Mar 25 11:42:05 MSK 2020
* lvasiliev <lvasiliev at tarantool.org> [20/03/25 10:36]:
> > Why not make it a key in IPROTO_AUTH, and require a separate
> > round-trip?
> Hi. Because it's not a part of AAA.
1. Auth packet is a session control packet. Authentication
is only one thing you may want to do with the session, you may
want to simply switch between already authenticated users.
2. Adding an extra package adds an extra round-trip and slows down each
handshake by at least 1 millisecond.
3. Auth package is synchronous by default. Any other package is
not, it's executed in async mode. Meaning the semantics of the
new package is broken, it is unclear what responses it affects
- those that happen to be not sent yet when this package is
handled, but not necessarily those that started processing
after this package arrived.
> > Why have it at all and not look at server version, which is part
> > of the greeting already?
> >
> The cause is backward compatibility.
> For example: a client application may expect an error as a string (IPROTO_OK
> case) and instead of which it will receive an error as an “object”. A
> greeting is sent only from the server side to the client, but the server
> must know what format should be used to send errors (what format does the
> client expect).
A much simpler way to do it is to have a server switch to enable
new features.
It is less flexible, of course, because you can't have old and new
clients, but do you really want to have old and new clients?
--
Konstantin Osipov, Moscow, Russia
More information about the Tarantool-patches
mailing list