Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: tarantool-patches@freelists.org
Cc: kostja@tarantool.org
Subject: [tarantool-patches] Re: [PATCH 2/2] swim: implement and expose transport-level encryption
Date: Wed, 8 May 2019 11:52:01 +0300	[thread overview]
Message-ID: <fb2bdded-1e61-4b5d-fafc-f722e098fccb@tarantool.org> (raw)
In-Reply-To: <5f06694d23bd5fc3e630a42244089193371ce7b3.1556561487.git.v.shpilevoy@tarantool.org>

I rethought the API and decided that it lacks
flexibility - I can't change private key without
passing crypto algorithm again, in swim_set_codec.

There are some solutions:

  - Move algo and key to swim_cfg, and make both of them
    optional. But it pads out swim_cfg(), which at this moment
    is quite compact, atomic, and contains only really
    necessary parameters.

  - Make swim_set_codec arguments optional. Then a one could
    change private key like this: swim_set_codec(-1, new_key).

These solutions are simple and not too intrusive. But probably we
should do something more global - get rid of swim_cfg and split it
into separate

    swim_set_<option>(option_value)

functions. It will look like this:

    swim_listen()
    swim_set_uuid()
    swim_set_ack_timeout()
    swim_set_heartbeat_rate()
    swim_set_gc_mode()
    swim_set_codec()
    swim_set_payload()

Therefore it won't be atomic to update several parameters at once.
On the other hand, it looks more consistent and just like box.cfg.
Now the API looks like this:

    swim_cfg(uri, heartbeat, ack, gc, uuid)
    swim_set_codec()
    swim_set_payload()

Please, tell your opinion.

  reply	other threads:[~2019-05-08  8:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-29 18:13 [tarantool-patches] [PATCH 0/2] swim crypto Vladislav Shpilevoy
2019-04-29 18:13 ` [tarantool-patches] [PATCH 1/2] swim: split send/recv into phases Vladislav Shpilevoy
2019-04-29 18:13 ` [tarantool-patches] [PATCH 2/2] swim: implement and expose transport-level encryption Vladislav Shpilevoy
2019-05-08  8:52   ` Vladislav Shpilevoy [this message]
2019-05-08  9:11     ` [tarantool-patches] " Konstantin Osipov
2019-05-02 15:43 ` [tarantool-patches] Re: [PATCH 0/2] swim crypto Vladislav Shpilevoy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fb2bdded-1e61-4b5d-fafc-f722e098fccb@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH 2/2] swim: implement and expose transport-level encryption' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox