Hi, guys.
I want to develop a software based on paraview.
I tried to understand mechanism of paraview and read code of paraview. It is so complex that I cannot get the key yet.
I think the key design of paraview is SMProxy/SIProxy mechanism.
I also found a topic about this but it didn’t tell much.
My question:
From class name, I could tell that SMProxy is on client-side while SIProxy is on server-side, is this right?
from the topic, sometimes, SIProxy is both on client and server side, when will this happen? an example is helpful
Both SI-xxx and SM-xxx have property classes, (for example SIStringVectorProperty and SMStringVectorProperty) what is the difference? won’t this cause double usage of memory?
what is the different of ServerClientStreamInterpreter and vtkSMessage ? Is that the first send message (serialized) and the second is the serialized data to be sent?
If there is a c/s paraview, I want to load data, where data file will be put ? client-side or server-side disk ?
Sometimes, data maybe huge, if all data is store in SMProxy, won’t this be a huge cost? for example, a mesh with million triangles?
Could any one give me some hints? or is there a document to explain this?
This is specified in the XML description of the proxy with the “process” attributes, see views_and_representations.xml::ViewBase for an example. This is quite advanced and I do not think you should bother with that.
They are the class taking care of client-server communication.
They do not use a lot of memory anyway.
Yes, more or less
Server side
Data is not stored in SMProy (nor SIProxy) at all. Only server side.
@mwestphal Thank you very much for your helpful reply!
the page you shared to me is about how to write XML configurations, It is helpful ! The XML configuration is complex and I will try to understand it.
I am developing a software for computing, and I have some data-structure that are not vtkDataset. Thus, I have to get some understanding about SM/SI Proxy to implement the data load/store of my data-structures.
I tried to read some code about processing of vtkSphere. But I still cannot understand to mechanism
Doesn’t radius of vtkSphere stored in SMDoubleProperty on client-side?
Then,
if SMVectorProperty objects already contain all parameters (could be changed by user from UI) needed on server-side, what does SIVectorProperty do?
data-file are stored on server-side. Does this means that all data in QWidget on client-side-UI is get by SMProxy::Pull from server-side while loading file?
if data-file is created on server-side, how could user save data into file ? For example, we have 2 objects smA and smB (siA and siB on server-side) to be saved into data file. Does paraview does something like use a SMIdTypeVectorProperty stores global-ids of SMProxy ojbects and then use ClientServerInterpreter to send the message and finally server-side save file ?
How does selection worked? this really confused me. Which classes are the key class that transmit selection query between “client / server”? The key class names will be very helpful.
Of course, but it is not “data” per se, just a property.
It SM/SI duality takes care of the serialization and transmission of the property from client to server.
Not sure what you mean exactly, but all you can see in the QWidget client side is either, created client-side and then sent to the server if needed, or created server side and then pulled by the client.
data-file objects are unrelated to sm/si proxies and properties. proxy and properties are used to control objects located on the server from the client.
I’m not following here.
Selection is quite a complex mechanism. To make it simpler, we can just say that the client create and transmit to the server a vtkSelection object that contains a list of ID corresponding to the selection that should be done.
Could you give more detail description about this with an example ?
For example, when changing the radius of vtkSphere on UI? does SM/SI property components work together?
If SM/SI property donot work together in this case, could you show me another example ?