{"id":3668,"date":"2017-04-28T23:37:40","date_gmt":"2017-04-28T15:37:40","guid":{"rendered":"http:\/\/localhost\/help\/?page_id=3668"},"modified":"2024-06-21T13:34:28","modified_gmt":"2024-06-21T05:34:28","slug":"datasources","status":"publish","type":"page","link":"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/primers\/datasources\/","title":{"rendered":"Datasources and Adaptors"},"content":{"rendered":"\n<p class=\"note\">This article is about datasources and adaptors in IFS OI Server, the associated terminology, and how they work. For details on how to create datasources, see: <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/connecting-your-data\/creating-a-dataset-datasource\/\">Creating a Dataset Datasource<\/a>, <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/connecting-your-data\/creating-a-tag-datasource\/\">Creating a Tag Datasource<\/a>.<\/p>\n<h2 class=\"page-subheading\">What is a datasource?<\/h2>\n<p class=\"intro-text\">A datasource is a connection between IFS OI Server and an external system that contains data that we want to access. These systems are the master storage location of that data, so how do we surface this data through IFS OI Server?<\/p>\n<h2 class=\"page-subheading\">Adaptors are the answer<\/h2>\n<p class=\"intro-text\">An adaptor is a component of IFS OI Server that enables the gathering of data from external sources. \u00a0Each of the adaptors in IFS OI Server are written for a specific type of external system. For example, there is an adaptor for PI historians, an adaptor for PHD historians, and even generic adaptors to connect to SQL Server or Oracle databases.<\/p>\n<p class=\"left-bar\">Related: <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/primers\/data-types\/\">Data Formats and Data Types<\/a>, <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/primers\/server-system-overview\/\">Server System Overview<\/a><\/p>\n<p class=\"intro-text\">It is this adaptor principle that allows IFS OI Server to be so flexible in being able to connect to so many different types of source systems to get data.<\/p>\n<h3>Available Adaptors<\/h3>\n<p class=\"intro-text\">This is a list of the adaptors currently available in IFS OI Server:<\/p>\n<table style=\"border-collapse: collapse; width: 100%;\">\n<tbody class=\"intro-text\">\n<tr>\n<td style=\"width: 50%;\"><strong>Time Series Adaptors<\/strong><\/td>\n<td style=\"width: 50%;\"><strong>Dataset Adaptors<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 50%;\">\n<ul class=\"intro-text\">\n<li><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/primers\/datasources\/ip21-adaptor-features\/\">IP21<\/a><\/li>\n<li><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/primers\/datasources\/opc-adaptor-features\/\">OPC<\/a><\/li>\n<li><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/primers\/datasources\/pi-adaptor\/\">PI<\/a><\/li>\n<li><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/primers\/datasources\/phd-adaptor-features\/\">PHD<\/a><\/li>\n<li><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/primers\/datasources\/relational-adaptor-features\/\">Relational<\/a><\/li>\n<li><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/primers\/datasources\/proficy-adaptor-features\/\">Proficy<\/a><\/li>\n<li><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/primers\/datasources\/cygnet-adaptor-features\/\">CygNet<\/a><\/li>\n<li><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/primers\/datasources\/canary-adaptor\/\">Canary<\/a><\/li>\n<li><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/primers\/datasources\/influxdb-adaptor\/\">InfluxDB<\/a><\/li>\n<\/ul>\n<\/td>\n<td style=\"width: 50%;\">\n<ul class=\"intro-text\">\n<li><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/connecting-your-data\/creating-a-dataset-datasource\/\">SQL Server<\/a><\/li>\n<li><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/connecting-your-data\/creating-a-dataset-datasource\/\">Oracle<\/a><\/li>\n<li><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/connecting-your-data\/creating-a-dataset-datasource\/#Generic_ODBC_Adaptor\">Generic ODBC Dataset Adaptor<\/a><\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 class=\"page-subheading\">How do we connect to an external system in IFS OI Server?<\/h2>\n<p class=\"intro-text\">A datasource must exist in IFS OI Server for every external system that is to be connected. When you configure a datasource, it uses an adaptor to create a connection to the external system.<\/p>\n<p class=\"intro-text\">To communicate successfully with any of these systems, we need to be able to give it some information, things like server names, user names, passwords, etc.\u00a0 In IFS OI Server these pieces of information are called <em>parameters<\/em>, and these can vary from one datasource to the next.<\/p>\n<p class=\"left-bar\">Related: <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/connecting-your-data\/creating-a-dataset-datasource\/\">Creating a Dataset Datasource<\/a>, <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/connecting-your-data\/creating-a-tag-datasource\/\">Creating a Tag Datasource<\/a><\/p>\n<p class=\"intro-text\">Below is an example of the configuration screen in IFS OI Server Management, showing some of the high level configuration and parameters.<\/p>\n<p class=\"intro-text\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/05\/adaptors.png\" rel=\"lightbox-0\"><img loading=\"lazy\" decoding=\"async\" class=\"border-image alignnone wp-image-5765 size-full\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/05\/adaptors.png\" alt=\"adaptors\" width=\"824\" height=\"738\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/05\/adaptors.png 824w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/05\/adaptors-768x688.png 768w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/05\/adaptors-150x134.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/05\/adaptors-24x21.png 24w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/05\/adaptors-36x32.png 36w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/05\/adaptors-48x43.png 48w\" sizes=\"auto, (max-width: 824px) 100vw, 824px\" \/><\/a><\/p>\n<h2 class=\"page-subheading\">Parameters<\/h2>\n<p class=\"intro-text\">Some of the parameters can make a big difference to the performance of the data source when we tune them correctly.<\/p>\n<p class=\"left-bar\">Related: <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/primers\/time-zones\/\">Time Zones<\/a><\/p>\n<p class=\"intro-text\">One of these parameters that is present on all adaptors, is the <strong>Adaptor Pool Size<\/strong> parameter.<\/p>\n<h3>About Adaptor Pools<\/h3>\n<p class=\"intro-text\">The <em>Adaptor Pool Size<\/em> allows you to specify the minimum and maximum number of instances of this type of adaptor that will be available in memory in IFS OI Server. This is related to the number of simultaneous connections available to that data source.\u00a0 It\u2019s important to note that this setting is for <em><strong>this<\/strong><\/em> configuration of the adaptor.\u00a0 If you configure two PI adaptors, there will be 2 adaptor pools, one for each of them.<\/p>\n<p class=\"intro-text\">The <strong>minimum<\/strong> is important because it does take an amount of memory to store each of these adaptor instances.\u00a0 So if the minimum value is high, for all adaptors, then it will consume more RAM on the web server.\u00a0<\/p>\n<p class=\"intro-text\">The <strong>maximum<\/strong> is important because when the load on the server increases, we can load up more instances of the adaptor and run the requests for data in parallel, which gives us more speed.\u00a0 But, at the same time, we don\u2019t want to overload the data source, so we provide this upper limit.<\/p>\n<p class=\"intro-text\">When IFS OI Server detects that the adaptors in the pool are not being used, it reduces the number of adaptors in the pool back down to the minimum to save memory.\u00a0 So, something to consider is that it will take small amount of time when a new instance of the adaptor gets created in memory and added to the pool. If you set your limit too low and you get a lot of simultaneous requests from this one data source, there will be a small lag as each new adaptor gets added to the pool.<\/p>\n<p class=\"intro-text\">So there is a balancing act here between memory use on the web server, performance of gathering data, and not putting too much load on the source system.<\/p>\n<p class=\"intro-text\">\u00a0<\/p>\n<h2 class=\"page-subheading\">Identifying external systems<\/h2>\n<p class=\"intro-text\">One of the more advanced, but very useful, features of a tabular datasource in IFS OI Server is a concept known as a <em>System Identifier<\/em>. \u00a0This enables IFS OI Server to translate an entity name in IFS OI Server, to the equivalent name in each of the source systems. \u00a0<\/p>\n<p class=\"intro-text\">Let's take an example. \u00a0We have an entity in IFS OI Server, called <strong>Well_1<\/strong>. \u00a0This same well may be known as <strong>W1<\/strong> in IFS OI Production and <strong>Well1<\/strong> in Qbyte. \u00a0Now these are different names, so how can we tie these all back together? \u00a0In IFS OI Server we can create a mapping between an entity, and an equivalent name in each datasource (so we can have one mapping for each datasource).<\/p>\n<p class=\"intro-text\">So how does it work? \u00a0When you request data for Well_1, from the IFS OI Production datasource, IFS OI Server will substitute the entity name <strong>Well_1<\/strong> with\u00a0<strong>W1<\/strong> in the SQL statement being executed in the dataset. \u00a0When the data is returned, IFS OI Server automatically adds an extra column to the returned data, with the original entity name included, completing the conversion in both directions.<\/p>\n<p class=\"intro-text\">\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>An Adaptor is a component of IFS OI Server that enables communication with external data systems through a configured datasource. This article describes what adaptors and datasources are and how they are used.<\/p>\n<p class=\"continue-reading-button\"> <a class=\"continue-reading-link\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/primers\/datasources\/\">Read more<i class=\"crycon-right-dir\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":65228,"parent":3648,"menu_order":11,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":"","_members_access_role":[],"_members_access_error":""},"categories":[3],"tags":[98,257,674,330,337],"class_list":["post-3668","page","type-page","status-publish","has-post-thumbnail","hentry","category-primer","tag-adaptors","tag-datasources","tag-datatype","tag-integrating-systems","tag-parameters","Product-srv"],"_links":{"self":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/3668","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/comments?post=3668"}],"version-history":[{"count":10,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/3668\/revisions"}],"predecessor-version":[{"id":67486,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/3668\/revisions\/67486"}],"up":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/3648"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media\/65228"}],"wp:attachment":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media?parent=3668"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/categories?post=3668"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/tags?post=3668"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}