This video will demonstrate how to
configure PI Buffer Subsystem version 4.3
for SDK buffering. First of all, what is SDK
buffering? SDK buffering means buffering events
that are sent to the PI Data Archive from clients that are using either the
PI SDK or AF SDK. PI SDK
and AF SDK are two data access methods for the PI
Data Archive. So if the client product uses either of
these two SDK methods, then more than likely
SDK buffering can be configured for the
client. Now it maybe confusing to figure
out which data access method a certain product is
using. AF SDK is the current and preferred
data access method, so generally speaking, new
version releases of OSIsoft products will be using
AF SDK while older applications and legacy
applications will probably using the PI SDK.
If you are still confused, there is a table
published on the PI Live Library titled PI Products and Buffering Program.
So this table basically has a
list of many of the OSIsoft products along
with the data access method that it uses for the PI Data
Archive. So for example, we can see that
the PI Asset Framework for 2014 and
later with .NET 4.0 is going to use AF SDK
data access methods to write data to the PI Data Archive
Server. One important note is that
if you have PI Interfaces
that write annotations to the PI Data Archive Server,
you will want to configure PI SDK Buffering
for them along with PI API Buffering. So to configure
PI API Buffering for PI API Interfaces,
please watch the video Configure PI Buffer Subsystem for PI API
Interfaces. In addition to configuring PI SDK
Buffering as we'll be demonstrated in this
video... So for example the table
has the PI Interface for RDBMS and
PI Interface for UFL listed as examples of PI Interfaces
that will use both PI SDK and PI
API because they can write annotations.
Let me just show you what the current configuration of my
current machine looks like. So this is my applications
machine and on this machine, I have the PI
Analysis Service installed for Asset Analytics.
In addition, I have this My Custom AF
SDK app that I want buffered from this machine
as well. So if I open PI System Explorer,
we can see that we have a number of
different analyses configured and running and sending
data to the PI Data Archive Server. So these
analyses are going to be writing back
to AF Attributes. So for example, this
current calculation is writing back to the current output
attribute and that attribute in turn
as a PI Point data reference
which is going back to Gachen Carbon 12 which is a member of
my PI Data Archive collective.
So if I look up this PI Point in PI
SMT, I can see that I'm getting current
values for the primary member of the PI Data Archive
collective. But I'm not getting current
values for the secondary member and this is because
PI Buffer Subsystem is not configured. So the
data is not being replicated to all members.
So if you are configuring SDK
Buffering for the PI Analysis Service,
the service actually will not need to be stopped during the
configuration. So once you have PI Buffer Subsystem
configured, it'll automatically
start buffering the data and replicating them to all
members of the PI Data Archive collective.
However, if you are configuring PI SDK Buffering
for PI Interfaces, keep in mind that it will need
a restart of the interface. So make sure you have
the appropriate downtime scheduled or you have interface
failover configured to mitigate the data downtime.
To follow the steps in this video, please make
sure you are logged in as a local administrator.
Alright, the first thing we'll actually want to do is
change the service account that the PI Buffer
Subsystem Services runs under. So I have the
Services applet open. And if I go to the logon tab, I'm
going to enter the credentials for my custom
domain service account. And this is optional
but this is to follow the
security best practices.
OK, so now we can
see that the PI Buffer Subsystem is set to run under my custom domain
servers account. And notice that the
service is right now set to manual. So don't worry about
this, the new installation wizard is going to
start-up the service and change this for you. So don't
start the service just yet.
OK, so now that that's done, we have to
go configure PI Buffer Subsystem. So the place
to do this is from Buffering Manager which is a
new GUI tool including with PI Buffer Subsystem
version 4.3. So we can access Buffering Manager
from PI System Explorer, Tools, Buffering Manager.
Alternatively if you are
configuring for PI SDK Buffering, you can
access it from the About PI SDK
under Buffering, Buffering Manager.
So this is going to open the same Buffering Manager
regardless of whether you are opening it from the PI SDK Utility or PI System Explorer.
OK,
so I'm going to go and open Buffering Manager
and since this is a new configuration of PI Buffer
Subsystem, it's going to open a
new Installation Wizard. The new Installation Wizard
by default configures AF SDK Buffering
and for PI SDK Buffering, there will be a manual step
necessary that will be shown later in the video.
I'm going to step through the wizard.
The first step is it wants us to confirm the
credentials for the custom domain service account.
And note that it
will be added to the local administrators group
as this is a necessary pre-requisite for the account that the PI
Buffer Subsystem Service runs under.
The next page has us choose the location
for the buffer queue files. The recommendation is to
choose the disk drive that has the most
space but which also does not host the operating
system. So in this case, I'm going to stick with the default option of
D drive because it has the most available disk space and because
my operating system is on C drive. You'll then do a
verification where it starts up the PI Buffer Subsystem
Service and makes sure that it starts up correctly.
So once that's done, we can exit the New
Installation Wizard. This is what Buffering Manager
looks like. So as mentioned previously, Buffering Manager is a new
GUI tool that was introduced with PI Buffer Subsystem version
4.3. It's basically a dashboard that shows all the
health status updates for all the PI Data Archive Servers configured for
buffering in addition to being the central place for
configuring the settings for PI Buffer Subsystem.
So currently we can see basically all of the counters are not
updating and this is because we don't have any
PI Data Archive Servers configured for buffering
yet. So what we can do is go to File, Add Server.
Now this Add Server is going to populate this
list based on what's in the PI SDK Known
Servers table. So if you don't see the PI Data Archive
Server you want to buffer here, you can always
choose Add a new PI Server or Collective.
In this case I want to buffer the data being sent to my PI Data Archive
collective Gachen-Carbon. So I'm going to have that
checked and click next.
So on the next page, what it does is a
verification to make sure that the PI Buffer Subsystem is able to connect and authenticate
to the PI Data Archive Servers.
So we can see that it already picked up my custom
domain service account but I'm getting these
security errors, failed to initialize
buffer sessions. And I know this is because I haven't yet configured
the security configuration necessary on the PI Data Archive Server
side. So what I can do
is
choose the option for creating a PI
mapping and click browse and this will open a list of all of my
PI identities on my PI Data Archive Server. So
I have this identity already created called PI Interfaces Buffers,
and I'm going to click create. So this
will create a mapping based on the custom domain service
account. So now we can see that it's able to
connect and authenticate to the PI Data Archive Server using
the PI identity that I configured for the mapping.
OK, so
what other configurations are necessary
on the PI Data Archive for the security?
Well, if we take a look at
the security,
database security, what we'll want to make sure is that
the identity that PI Buffer Subsystem
is getting authenticated as has read access at the
PI Point database security level. So this is
covered because I have PI world read access
here. Additionally, the identity is going to need
permissions on each and every single
PI point that it's going to write data to. So that
means I want to check the security configuration on all of the points
that PI Buffer Subsystem would write to.
So let me just pull up one of the analytics
tags and we can see that in the
security, we have PI World
for read. So that covers the read access. If PI world
were not here, then we'd have to list the identity, in this
case PI Interfaces Buffers to have read access in
point security. Additionally, the identity needs to have
both read and write permissions and
data security which I have listed here.
OK, so the security configuration looks good. Let's
continue with Add New Server
Wizard. Alright, so now I've successfully
added the server and
we can now see that there are events being
sent to Gachen Carbon. So in
total, I can see that there have been about 5056
total events sent and this is on a
global level. So if I had other PI Data Archive Servers configured
for buffering, this counter would include those events as well.
If I wanted to see the events just for this one collective,
I can click on the Gachen-Carbon collective
and the counter here would reflect the total events sent just for this
PI Data Archive collective. Furthermore, I can
drill down to the individual members and see
how many total events are being sent to each member of the PI Data Archive collective.
OK, so
this is now setup for AF SDK
buffering. But if I wanted to configure
PI SDK Buffering, what I would need to do is go to
settings and from settings,
I go to the global level and
click show advanced global configuration.
So from here, what I would do is change this
PI SDK Buffering option from off to
on and click save.
At this point I would restart my PI SDK
application to take the new configuration setting.
So by default, new installations of PI Buffer
Subsystem are going to have AF SDK Buffering enabled
with this option, Buffer if Possible.
So Buffer if Possible just means that
if the AF SDK method being used to write the
data supports buffering, then it will use
buffering. Otherwise, it will send the data without buffering.
OK, and then if we check the data
in PI SMT,
we can further confirm that we are
getting data on both members of the PI Data Archive
collective. So we can see now
we are getting current values on both members of the
PI Data Archive collective, whereas before it was only showing
up on the primary member. OK, so let's also
verify that I can buffer
events from my custom
application here on the desktop. So I'm going to go
ahead and run that. And it's basically a very simple
application which
basically has me input the PI Data Archive Server
name and then the PI Point
name. So in this case, I'm going to use a
point I just created called Buffer Test and
write a value of 100 to it.
I'll give it a timestamp of
now. So it says it has
successfully written. And if I go to SMT and pull up the current value
for that tag,
I can see that the value was written to both members of my PI Data Archive
collective, meaning that it was buffered and it was replicated
to all members. One last thing
is to make configuration changes
in Buffering Manager, there is actually a local Windows
group called PI Buffering Administrators. And only
users in this group along with the local administrators can
make configuration changes to PI Buffer Subsystem.
So let me just show you where to
access that. So if we go to the
Server Manager and click
Tools, Computer Management. Then
Local Users and Groups. And under Groups
we can see that PI Buffering Administrators Group is
added and is currently empty. So you can add
any users that you want to have access to configuration changes through
PI Buffer Subsystem here.
So this might be useful if you wanted to
add users and have them be able to make changes for
PI Buffer Subsystem, but not necessarily have them in the
local Administrators group.