22 Replies Latest reply on Dec 7, 2010 8:02 PM by Ahmad Fattahi

    PI Times Series

    farooquf

      Hi,

       

      I am calling PI web service from SAP middleware (SAP Process Integration). As of now I am using operation GetPIArchiveData.

       

      In tag name, I am passing server name from configuration. So I have to specify a servername in PI box. And only that server name ( diff in dev, qua, prod) can be pass to tag name.

       

      In yesterday's presenation I heard something about PI collective. Will PI service support PI collective by passing only one server name in the tag name?

       

      Regards,

       

      Farooq

        • Re: PI Times Series
          andreas

          You should pass the collective name instead of the server name. With HA the collective name becomes your point of contact to PI.

            • Re: PI Times Series
              farooquf

              Thank you for your reply.

               

              HA stands for?

               

              As of now I am passing tag name as pi\xyz\tagname...

               

              where xyz is the server name in the tag...

               

              when we consider PI collective....will my tag names look like this way...

               

              pi\abc_server\tagname...

               

              where abc_server is PI collective server name?

               

              Regards

               

              Farooq

               

               

                • Re: PI Times Series

                  Farooq - what's the business context in which you are using PI web services? And how often do you need to make the PI call in what you are trying to do?

                  • Re: PI Times Series
                    Ahmad Fattahi

                    Here is a sample path from PI Web Services user manual:

                     

                    pi:\\myserver\mytag

                     

                    You can use your PI Collective name instead of the PI Server name. (HA = High Availability; referring to a PI Collective)

                      • Re: PI Times Series
                        farooquf

                        Thank you for your reply.

                         

                        If I have 3-4 PI collective servers, how I can pass require/correct PI collective server name in the tag?

                         

                        For instance we have 4 PI collective server.

                         

                        PIC1

                         

                        PIC2

                         

                        PIC3

                         

                        PIC4

                         

                         

                         

                        and my tag name looks lik pi\collectiveservername\tagname...

                         

                        How can I pass right PI collective server name in the tag? Is there any workaround for this?

                         

                        Regards,

                         

                        Farooq

                          • Re: PI Times Series
                            Ahmad Fattahi

                            If your collective name is PIC1 and your tag name is mytag then the path would be:

                             

                            pi:\\PIC1\mytag

                              • Re: PI Times Series
                                farooquf

                                Hi Ahmad,

                                 

                                Thank you for your quick reply.

                                 

                                You are right. The path name should look like pi:\\PIC1\mytag. But at run time how consuming system (in path )identify the server name?

                                 

                                If we have 3-4 PI collective server, and we have to pass one PI collective server name at runtime. How I can achieve it? Becuse tag name can be in PIC1, PIC2, PIC3 etc.

                                 

                                Regards,

                                 

                                Farooq

                                  • Re: PI Times Series
                                    andreas

                                    I think we are running here in circles. Let us start with clarifing the question:

                                     

                                    You have ONE collective with 3 nodes, let's call it PICOL, and this collective has the members PIC1, PIC2, PIC3. Is this correct?

                                     

                                    You want to connect to the collective? Then PICOL is the "servername".

                                     

                                    You want to connect to PIC1? Please explain why you want to connect to a specific member of your collective.

                                     

                                    regards,

                                      • Re: PI Times Series
                                        farooquf

                                        I have I have THREE PI collectives ( each with few nodes).

                                         

                                        PICOL1 (PIC11,PIC12,PIC13 etc...)

                                         

                                        PICOL2 (PIC21,PIC22,PIC23 etc...)

                                         

                                        PICOL3 (PIC31,PIC32,PIC33 etc...)

                                         

                                         I have to pass PI collective server name in the path? I dont know in which PI collective server my tag sits. How I pass right PICOL* server name in the request path?

                                         

                                        Regards,

                                         

                                        Farooq

                                          • Re: PI Times Series
                                            Ahmad Fattahi

                                            In your PI System, if I give you a tag name how can you tell which collective it belongs to? Do you maintain a look-up table somewhere?

                                              • Re: PI Times Series

                                                I'm with Ahmad on this, it sounds like what you describe should be part of the logic of your application - or you want a PI Collective of Collectives object.  Maybe you should create your own method that will parse each collective in turn until you find the desired collective.

                                                 

                                                Can you explain the segmentation of your 3 collectives?

                                                • Re: PI Times Series
                                                  farooquf

                                                  As of now we're in process of consuming this service.

                                                   

                                                  Yes, in SAP PI we can perform a lookup to identify a PI collective server name if we know how lookup table look like. It can be an alternative solution if we know what will come in lookup table.

                                                   

                                                  Regards,

                                                   

                                                  Farooq

                                                    • Re: PI Times Series

                                                      If I understand correctly, you would like OSIsoft's software suite to provide that "look-up table" you are referring to (i.e. federation of PI Systems, a "Collective of PI Collectives") - correct?

                                                       

                                                      If that's the case, then no such thing exists just yet - as Rhys pointed out, knowing which environment you are in and connecting to the appropriate Collective (or Server) is something that must take place in your application's logic.

                                                       

                                                      Speaking of which, what context are you trying to run this in? As my colleague Gopal, I am very interested what it is you are trying to do with PI Web Services and SAP Process Integration...

                                                        • Re: PI Times Series
                                                          farooquf

                                                          Hi Steve,

                                                           

                                                          As per current requirement, I have to call PI time series service to read meter values. Here is the message flow.

                                                           

                                                          Sender Application ---- SAP PI Middleware ------PI Web Server --- (PI col1 or PI col2 or PI col3....it can be any PI collective at run time).

                                                           

                                                          Message flow is as following:

                                                           

                                                          1. Sender application pass the start date, end date, hits, and tag name values/parameters.

                                                           

                                                          2. SAP PI do the tranformation and map all require values such as Start, End, path, PIArchMannar, etc. to GetPIArchieveRequest

                                                           

                                                           -----in Mapping we are creating tag name. So we need server name before passing request to the OSISOft PI web server. If there is one PI collective then I can pass one server name in each environement. But if there are many PI collective server and I don't know in which server my tag exist...is still question mark......

                                                           

                                                          3. OSISoft PI webserver receive request and tag values from PI server.

                                                           

                                                          4. SAP PI receive the response from the PI webserver/PI webservice.

                                                           

                                                          5. Finally, SAP PI map the PI GetPIArchieve Response to Sender Application response.

                                                           

                                                          Now in our case, tag names can be in any PI collective server ( by seeing the future of the project). For instance we have 4m tags. 1million can be in PI col1, 1 million can be in PI col 2, and remaining can be in PI col3. So I am wondering how to pass correct server name at runtime so that request go to right PI collective server. Challenge is I dont know which tag sits in which PI collective server.

                                                           

                                                          Regards,

                                                           

                                                          Farooq

                                                           

                                                           

                                                           

                                                           

                                                           

                                                           

                                                           

                                                           

                                                            • Re: PI Times Series
                                                              farooquf

                                                              I am working on two prestigious products and co incidently both products are know by key word "PI" :) One is SAP PI server and other is OSISoft PI server.

                                                                • Re: PI Times Series
                                                                  skwan

                                                                  Farooq:

                                                                   

                                                                  So you're saying that you would like to be able to "lookup" or search for a PI tag among all your collectives at run time.  I would say this _can_ be an excessive performance hit.  Using your 4M tags as an example, if you have to do a search for a tag with every transaction, that can be very expensive.  Have you thougt about logically grouping your tags into each collective by tag names so you know ahead of time the location of your tag or possibly using AF as your "directory"?

                                                                    • Re: PI Times Series
                                                                      farooquf

                                                                      Hi Steve,

                                                                       

                                                                      Thank you for your reply. I agree with you that lookup will be a overheaded performance issue.

                                                                       

                                                                      What you said "Have you thougt about logically grouping your tags into each collective by tag names so you know ahead of time the location of your tag or possibly using AF as your "directory"?" sounds an laternative solution. I will enquire more on this from the internal team.

                                                                       

                                                                      In the meantime, could you please explore this solution? How it works and how it is different from non-grouping of tags?

                                                                       

                                                                      Regards,

                                                                       

                                                                      Farooq

                                                                        • Re: PI Times Series

                                                                          Farooq, you might be able to resolve some of your issues by asking yourself (or your team) why you have 3 collectives.  If it is because you have so many tags and you just share the load, then you need some form of lookup.  

                                                                           

                                                                          If it turns out there is a logical reason for 3 collectives, e.g. geography, then likely that you have a PI tag naming convention that is relevant to the reason - e.g. geographical location of the data within the collectives.  For example, PICol1 = Americas, PICol2 = Europe, PICol3 = Asia-Pac where part of your PI tag naming convention includes a location code (e.g. 001 for UK, 002 for Germany etc).  Merge such logic in to your mapping step.

                                                                           

                                                                          There has to be some structure within your data.

                                                                            • Re: PI Times Series
                                                                              farooquf

                                                                              The main reason for having multiple collective is millions of tags. We are still exploring the best solution or approach because our consuming application is a "middleware" - SAP PI.

                                                                               

                                                                               

                                                                               

                                                                               

                                                                                • Re: PI Times Series

                                                                                  [digs heels in]

                                                                                   

                                                                                  Apologies to labour the point, but when you need to create new PI tags what is the decision process for which PI Collective you create the tags on?  I can appreciate that once you start to hit millions of PI tags that you may need to span your data store across multiple PI Collectives, but unless there is some thought to how you will structure the millions of PI tags across collectives and logically group them then you will soon have an unmanageable (maybe I should say unstructured) data store - as you are finding out by not knowing which collective your PI tag belongs to.

                                                                                   

                                                                                  [/digs heels in]

                                                                                   

                                                                                  Maybe the issue lies with your sender application passing just a tag name: is this a PI tag name or some tagging convention for assets?  If it is an asset tag and not necessarily a PI tag (depends on your naming convention), then I completely agree with Steve's comment above about using AF as a directory.

                                                                                   

                                                                                  Steve, Whilst I am busy hijacking Farooq's post...what is the scalability of a single AF directory in this situation?  Let's say Farooq wanted to create a directory for all 4 million tags.

                                                                                   

                                                                                   

                                                                                    • Re: PI Times Series
                                                                                      skwan

                                                                                      Farooq:

                                                                                       

                                                                                      My comment on logical separation of your tags among the 3 collectives based on tagnames is exactly what Rhys is trying to convey above.  If you segregate your collectives based on some characteristics of your information, then it would be easy to know ahead of time where your tag is located.

                                                                                       

                                                                                      Rhys:

                                                                                       

                                                                                      AF 2010 was tested to 10 million elements each with some attributes so 4M tags would not be a problem.  However, having said that, an AF system of this size is sensitive to the way the AF hierarchy is structured.  There are pros and cons to an overly flat AF tree or an extremely deep AF tree.  In terms of searching the AF hierarchy, it's always faster to search from the root node (maybe counter-intuiative :-)).

                                                                                        • Re: PI Times Series
                                                                                          Ahmad Fattahi

                                                                                          The pros of having the tag names structured by name was told: more manageability, way more efficient code. However, let's not forget that once the logic is hard-coded, it is here to stay; should the logic changes it would need change in the code.