-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deprecate pvCopy.h? #51
Comments
The goals for pvData/pvAccess going back to 2006 (javaIOC) include:
pvRequest is a facility that makes it easy for clients to implement 3). At the present time the following providers are implemented: a) The local provider in pvDatabase. It implements 2), 3), and 4). b) ca provider (in pvAccess). This implements 2) and 3). It should be changed to also support 4). c) qsrv (in pva2pva). This implements 2). It should be changed to support 3) and 4). I want to see how ca provider can implement 4). I think that pvCopy may help. mdavidsaver said I've never been clear on what problem(s) this code is trying to solve. I have the impression that it involves a situation which I avoided in QSRV by giving every client the exact same Structure. Note that this means that 3) is not satisfied. |
I will agree with your 4) however I see no benefit, and at least one drawback, to your 3). I've opened epics-base/pva2pva#11 as a reminder to add masking of monitor updates via pvRequest (4). wrt. 3) I want to avoid a proliferation of types (Field) as this burdens the caching in PVA. Mainly though, I find it confusing that different users can see different structures. |
It does, though I still find the API confusing. However, I'll refrain from deprecating it until I've closed epics-base/pva2pva#11. If I don't find a place for pvCopy in doing this, then I'll probably deprecate it. |
The following is not what a client expects when accessing a DBRecord mrk> pvget -m -r "value,alarm,timeStamp" DBRdouble00 DBRdouble00 |
Note that using provider ca produces: DBRdouble00 |
@mrkraimer 's goal number 3 is needed to support clients like alarm handlers, which have no interest in a PV's value at all, and may also be essential when talking to PVs that have large arrays in some of their fields, especially when the client or IOC is bandwidth-limited and the client doesn't want to see the array data. I commented in epics-base/pva2pva#11 that the current pva2pva behavior is a regression from pvaSrv. |
I fell I'm obligated to point out that to my knowledge, no actual users are specifying pvRequest. There is certainly no "alarm handler". |
Sorry Michael, but you are not omniscient. We have been advertising the "fetch only a subset of the fields" feature to our scientists here at APS, which works on Siniša's latest tool for serving data from an SDDS file over PVA. That tool is based on top of pvDatabaseCPP which implements it using pvCopy. |
Does this mean that APS has actual user composed pvRequest strings? Something other than 'field()' or 'field(value)'? Can you share some examples? |
https://github.com/caqtdm/caqtdm/blob/Development/caQtDM_Lib/caQtDM_Plugins/epics4/epics4_plugin.cpp Has the statements: void PVAInterface::createMonitor() |
I can't show you any embedded in our code, but the pvRequest string is an optional argument to both pvget and eget and as such it's a very public and documented API. |
Siniša has this on one of the slides he was showing on Tuesday:
That PV |
I have been working on ca provider so that for gets and monitors the client can find out which fields have changed value. I realized that PVCopy needs a new public method "updateMasterSetBitSet". |
This field name makes me cringe, but your point is made. |
Hi everyone,
Right. I was also thinking about use cases where the pvStructure had a large payload field but the user only was interested in a low payload field. Eg NTNDArray, a client may only want the codec, not the image.
But my opinion on this was reversed after a conversation with Michael. He pointed out to me that a bespoke client can simply choose not to code the introspection interface of fields it’s not interested in. So that leaves standard clients like eget. It’s true, in his proposal they’d see 0s (the defaults) in fields the client didn’t express interest in.
Though not brilliant, that certainly seems acceptable to me. If end users really want that they don’t see fields they are not interested, then maybe we can give some awk examples to show how to filter only what they do want.
Greg
… On Feb 8, 2018, at 1:01 PM, Andrew Johnson ***@***.***> wrote:
Siniša has this on one of the slides he was showing on Tuesday:
ctlsdaqdev1> pvget -r 'field(S35DCCT_currentCC)' fft_bm
fft_bm
structure
double S35DCCT_currentCC 99.2111
That PV fft_bm was served from an SDDS file that was taken by our DAQ system, which evidently adds secondary information such as the storage-ring current as SDDS attributes (which become scalar fields) alongside the (large) data arrays in the file.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
wrt. eget. I don't intend this to apply to the rpc operation (though it could). My goal is that, for the sake of user sanity, that get, put, and monitor should work with exactly the structure returned by Channel::getField(). As only one Structure is involved, the BitSet masked overload of |
related epics-base/pvAccessCPP#41 |
The goals for pvData/pvAccess going back to 2006 (javaIOC) include:
Since qsrv returns the same Structure to all clients, this goal is not satisfied. |
Sure. Here's how I see it: A server application (QSRV on top of an IOC Database) has an internal structure that it wants to expose. To do that over pvAccess, it registers as a channel provider. |
On Feb 15, 2018, at 4:50 AM, Ralph Lange ***@***.***> wrote:
Sure.
But since this is a goal for pvData/pvAccess, shouldn't pvData/pvAccess take care of that?
Here's how I see it: A server application (QSRV on top of an IOC Database) has an internal structure that it wants to expose. To do that over pvAccess, it registers as a channel provider.
Why is a promise that the pvAccess server makes to its clients (that they can request a subset of the complete structure) in the scope of QSRV? Shouldn't that be the job of pvAccess?
Well, that’s a very good point.
… —
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Ralph asks: "Shouldn't that be the job of pvAccess?" But pvAccess is just the name of a set of software that can be used to implement pvAccess provides the following:
Two server side providers are currently implemented
A provider must implement classes Provider and Channel. The code in pvCopy can be used by a channel provider to provide access to a subset of the fields in a top level PVStructure associated with a channel. |
The original "subset of fields" goal still needs be implemented somewhere; where and how is something we could change if we really wanted to, although it seems rather late to be making what appears to be an architectural change after the building is already occupied and in daily use. Currently pvget and eget allow the user to give a list of the fields they want in the pvRequest specification, and only the data in those fields will be transported and displayed. Both pvaSrv and pvDatabase implement this behavior, and all PVA client interfaces let the user provide a pvRequest specification. Marty is currently adding support for this to the caProvider, and we have published documentation that explains how to use all these interfaces. Marty just described how different layers of the current design are responsible for different functionality, and how the server really just implements a remoting capability for the individual providers. Moving the field subset functionality out of the individual providers into the server layer would presumably also remove the ability to request a field subset from a local provider, which would appear to be a problem with this change. If we did agree to change how a user can fetch a subset of the available fields, I want to see that change discussed properly and any new design agreed to first, not just implemented by fiat. If the result can use less code and potentially run faster that's great, but network connections between old and new implementations have to work seamlessly (both new client → old server and old client → new server) as IIRC we said we wouldn't break network interoperability after 7.0. Thus the design of any change is probably rather harder than it first seems, and I think it unlikely that we could reduce the amount of code needed once that interoperability is accounted for as well. I understand that a bespoke client could be coded to only include those fields it wants to see in the pvStructure that it passes to be got/monitored, but what about the generic clients? Repeating my earlier example, the PV
BTW the V4 website contains many versions of the network protocol document, the latest of which is dated 16th October 2015; is this being kept up to date? I regard the importance of maintaining this document (or a replacement for it) as pretty high. |
When epics-base/pva2pva#11 is accomplished, only the requested field values will be moved over the wire. When further combined with changes to pvget, only changed fields will be printed. As far as I am concerned, the combination satisfies any practical definition of "subset of fields". |
Yes. Hell yes! If Marty's pvRequest goals are ever to be universal, then they must been built into the PVA server. The provider interfaces are just too damned complicated. No one seems to be able to avoid violating the myriad locking and ownership rules (which I've tried to document), let alone the semi-documented functional "goals". Before anyone rushes to start adding this Structure mangling into the PVA server I must offer a word of caution. I've spent the past 9 months chasing bugs out of this part of the code base. This has already resulted in my introducing regressions! For such a major change to be accepted, especially given my dislike of the present pvCopy API, the burden of code quality and testing will be high (there will be good unit test coverage). |
Marty is of course free to spend his time as he sees fit. And you (Andrew) as maintainer of caProvider may accept what you will. I can only wish that the lock order design flaw (epics-base/pvAccessCPP#77) were prioritized over this imo. minor point. |
fyi. I recently added PVStructure::const_shared_pointer value(...), // some Structure with .value
pvRequest(createRequest("field(value)"));
BitSet fieldMask(extractRequestMask(value, pvRequest->getSubField<PVStructure>("field"));
assert(fieldMask == BitSet().set(value->getSubFieldT("value")->getFieldOffset()); I'm already making use of this in the SharedPV implementation (cf. "pva/sharedstate.h") for Get and Monitor. When I next have time I'll be changing QSRV to use SharedPV. |
After the addition of |
Released with Base 7.0.2 |
I'm considering deprecating it in pvDataCPP for removal after 8.0.0. As usage of pvCopy.h seems to be limited to pvDatabaseCPP, perhaps this code should be migrated into pvDatabaseCPP? I have no immediately pressing reason to do so. This is more about reducing public API size in the longer term.
I've never been clear on what problem(s) this code is trying to solve. I have the impression that it involves a situation which I avoided in QSRV by giving every client the exact same Structure.
@mrkraimer Would you like to make a case for keeping this code in pvDataCPP?
The text was updated successfully, but these errors were encountered: