All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pelplinski, Piotr <piotr.pelplinski at intel.com>
To: spdk@lists.01.org
Subject: Re: [SPDK] SPDK Event notifications
Date: Fri, 12 Oct 2018 13:15:32 +0000	[thread overview]
Message-ID: <D3E86B86BB7EA349915438D95D6A9DC95E394E7A@IRSMSX102.ger.corp.intel.com> (raw)
In-Reply-To: 0c9766a9f2e8e31bcc7868440544a6d7268d2ce4.camel@intel.com

[-- Attachment #1: Type: text/plain, Size: 3222 bytes --]



-- 
Best Regards,
Piotr Pelpliński


> -----Original Message-----
> From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Walker, Benjamin
> Sent: Wednesday, October 10, 2018 7:17 PM
> To: spdk(a)lists.01.org
> Subject: Re: [SPDK] SPDK Event notifications
> 
> On Wed, 2018-10-10 at 15:38 +0000, Wodkowski, PawelX wrote:
> > See comments inline.
> >
> > Paweł
> >
> > > From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Pelplinski, Piotr
> > >
> > > Hi,
> > > I started work on SPDK event notifications.  I have few doubts that you
> > > might help me resolve.
> > > This functionality adds ability to register for specific events (i.e. a new
> > > bdev), and be notified asynchronously when those events occur.
> > >
> > > My proposal is three RPC calls based on following workflow:
> > >
> > > 1.      After SPDK application starts, client sends RPCs to SPDK about what
> > > kinds of events it wants to register for.
> > >
> > > 2.      Then, client subscribes to specified events.
> > >
> > > 3.      Then the client periodically asks for new events.
> >
> > Why client need to ask for new event? Why event can't be send just send to all
> > clients ASAP they available?
> > You will have to track what events was send to what clients.
> 
> I think the above statement about tracking which events to send to which client
> outlines the major problem here. Tracking which events each client needs is very
> difficult - for instance, how long do you keep events around? A client could
> check in once a month, for example. Further, how many simultaneous clients do
> we
> need to keep track of? How much memory is that going to take? I'm positive
> that
> we don't want to go down this path.
> 
> Clients already have the ability to simply poll the state of the system by
> periodically issuing RPCs. That's good enough for most cases and is entirely
> stateless (the REST paradigm - we even use JSON!). We could consider an event
> stream API as an optimization only, where clients send an RPC and the response
> contains a file descriptor (maybe a domain socket?) where a stream of JSON
> objects corresponding to events as they happen is published (but not events
> from
> before the connection was established). A client would then begin by sending
> the
> existing RPCs to gather the current state of the world, then subscribe to this
> event API for changes only.
> 

How about returning events in response to RPC Call?

Client discovers events by calling show_events, then connects to RPC server
and asynchronously receives events as long as it is connected.

This way we have true asynchronous API. It doesn’t require caching of events or 
allocating any special resources or memory. 

Disconnected clients (i.e. due to reboot) would not receive those events, but do they
really want to receive them? I think that client after reboot would like to read entire
SPDK state anyway.

I updated trello card as well: 
https://trello.com/c/ZTIHxp3w/28-spdk-event-notifications

> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk

             reply	other threads:[~2018-10-12 13:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-12 13:15 Pelplinski, Piotr [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-10-25 10:31 [SPDK] SPDK Event notifications Sablok, Kunal
2018-10-11 20:57 Walker, Benjamin
2018-10-11 20:13 Andrey Kuzmin
2018-10-11  8:01 Pelplinski, Piotr
2018-10-10 17:16 Walker, Benjamin
2018-10-10 15:38 Wodkowski, PawelX
2018-10-10 14:58 Pelplinski, Piotr

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=D3E86B86BB7EA349915438D95D6A9DC95E394E7A@IRSMSX102.ger.corp.intel.com \
    --to=spdk@lists.01.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.