Hi Sun Wei,
I would say that the main benefit of a PI Collective is that the some of these details that you are working with a PI Collective or a standalone PI Server is abstracted away and in most situations you do not have to be concern about that. When you have a piece of code that reads data from a PI Server, that can be used directly to read data from a PI Collective. The exception to this is if your application would need to know which collective member the data is coming from for your requirement.
As for the writing data aspect. With the introduction of SDK Buffering, you can configure buffer on the client to buffer and replicate data that is sent to one member of the collective to all other collective members as well. Again, this allows you to simply utilize the code that you have written for a standalone PI Server against the a PI Collective.
If your application really have to include some special handling for PI Collective, you can take a look at the IPICollective and the related secondary interfaces that will allow your application to recognize the connected PI Server as a Collective and allowing you do perform controls like connecting to a specific collective member etc. You can find the reference of these classes in PI SDK Programming Reference. Another example that you can find is a blog post by Sam about writing data to a collective here: http://vcampus.osisoft.com/bloggers_place/b/sampride/archive/2009/06/29/ha-manual.aspx
This blog post does illustrate some of the operations specific to a PI Collective that you can perform like checking if the server is really a collective and accessing the collective member. However this is written a while back when SDK buffering was not available to replicate data write to a PI Collective automatically. It is no longer necessary follow the content in the blog post to perform special handling when writing to a Collective.
Hello Sun Wei,
I would suggest developing your interface with our most modern technology which is PI AF SDK. In the current version 2.5, you are able to handle PI Collective objects in a similar way of using PI SDK. However, PI AF SDK has a better performance than PI SDK as it is developed purely in .NET.
Although version 2.5 does not provide buffering, you can connect to one member of the collective, send data, connect to the other member of the collective and send the same data, as a workaround. The future release of PI AF SDK version 2.6, will solve this issue, as it will support buffering. According to our PI System roadmap, the release data of this product is targeted for the Q1 – 2014.
Please refer to the PI AF SDK Reference Manual, available after installing PI AF Developer Tools 2012, which could be downloaded on the vCampus Download Center under Extras Category.
Hope this helps!
I have tried to duplicate data to collective members by PI SDK buffering.If there is a chance i will do it with PI AF SDK.