[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 19/22] qapi: add QMP put-event command
From: |
Avi Kivity |
Subject: |
Re: [Qemu-devel] [PATCH 19/22] qapi: add QMP put-event command |
Date: |
Thu, 10 Mar 2011 17:30:43 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Thunderbird/3.1.7 |
On 03/10/2011 04:24 PM, Avi Kivity wrote:
What would the wire exchange look like?
> { 'execute': 'get-block-io-error-event' }
< { 'return' : 32 }
...
< { 'event': 'BLOCK_IO_ERROR', 'data': { 'action': 'stop', 'device':
'ide0-hd0', 'operation': 'read' }, 'tag': 32 }
...
> { 'execute': 'put-event', 'arguments': { 'tag': 32 } }
Well, I may be biased, but I prefer my variant.
btw, it's good to decree that a subscription is immediately followed
by an event with the current state (which means events have to provide
state and be idempotent); so the subscribe-and-query pattern is
provided automatically.
btw2, I now nominate subscribe and unsubscribe as replacements for get
and put.
I also think it should be at the protocol layer:
> { execute: some-command, id: foo, arguments: { ... } }
< { result: { ... }, id: foo }
> { subscribe: block-io-error, id: bar, arguments: { ... } }
< { result: { ... } id: bar }
< { event: block-io-error, id: bar, data : { ... } }
> { unsubscribe: block-io-error, id: bar }
< { result: { ... } id: bar }
So events are now protocol-level pieces like commands, and the use of
tags is uniform.
--
error compiling committee.c: too many arguments to function
- [Qemu-devel] [PATCH 17/22] qapi: add QMP quit command, (continued)
- [Qemu-devel] [PATCH 17/22] qapi: add QMP quit command, Anthony Liguori, 2011/03/06
- [Qemu-devel] [PATCH 18/22] qapi: add QMP qmp_capabilities command, Anthony Liguori, 2011/03/06
- [Qemu-devel] [PATCH 19/22] qapi: add QMP put-event command, Anthony Liguori, 2011/03/06
- Re: [Qemu-devel] [PATCH 19/22] qapi: add QMP put-event command, Avi Kivity, 2011/03/09
- Re: [Qemu-devel] [PATCH 19/22] qapi: add QMP put-event command, Anthony Liguori, 2011/03/09
- Re: [Qemu-devel] [PATCH 19/22] qapi: add QMP put-event command, Avi Kivity, 2011/03/09
- Re: [Qemu-devel] [PATCH 19/22] qapi: add QMP put-event command, Anthony Liguori, 2011/03/09
- Re: [Qemu-devel] [PATCH 19/22] qapi: add QMP put-event command, Avi Kivity, 2011/03/10
- Re: [Qemu-devel] [PATCH 19/22] qapi: add QMP put-event command, Anthony Liguori, 2011/03/10
- Re: [Qemu-devel] [PATCH 19/22] qapi: add QMP put-event command, Avi Kivity, 2011/03/10
- Re: [Qemu-devel] [PATCH 19/22] qapi: add QMP put-event command,
Avi Kivity <=
- Re: [Qemu-devel] [PATCH 19/22] qapi: add QMP put-event command, Anthony Liguori, 2011/03/10
- Re: [Qemu-devel] [PATCH 19/22] qapi: add QMP put-event command, Avi Kivity, 2011/03/10
- Re: [Qemu-devel] [PATCH 19/22] qapi: add QMP put-event command, Anthony Liguori, 2011/03/10
- Re: [Qemu-devel] [PATCH 19/22] qapi: add QMP put-event command, Avi Kivity, 2011/03/12
- Re: [Qemu-devel] [PATCH 19/22] qapi: add QMP put-event command, Anthony Liguori, 2011/03/10
- Re: [Qemu-devel] [PATCH 19/22] qapi: add QMP put-event command, Avi Kivity, 2011/03/10
- Re: [Qemu-devel] [PATCH 19/22] qapi: add QMP put-event command, Anthony Liguori, 2011/03/10
- Re: [Qemu-devel] [PATCH 19/22] qapi: add QMP put-event command, Avi Kivity, 2011/03/12
- Re: [Qemu-devel] [PATCH 19/22] qapi: add QMP put-event command, Anthony Liguori, 2011/03/12
[Qemu-devel] [PATCH 21/22] qapi: add test-libqmp, Anthony Liguori, 2011/03/06