SmartConnector Forum
Schneider Electric support forum about SmartConnector applications for integration of other building management systems (BMS) into EcoStruxure Building Operation.
Link copied. Please paste this link to share this article on your social media post.
Dear:
Is there any times limitation or frequency limitation for an EWS Client connecting to EWS server?
In some case, we need create a user-customized API, which will be used to poll data from SBO and then convert to other data format such as XML string.
If I have to create connection between Ews client and Server for every data polling procedure, then the create connection action will be very frequent.
I am just afraid there may be any limitation of SBO to allow client connecting with it. please help clarify.
-Austen Yin
Link copied. Please paste this link to share this article on your social media post.
The short answer is “No”. If you are using SmartConnector’s EwsClient library there are no client side restrictions. Those types of restrictions typically reside on the “server side” (SBO, PME, etc). One tip though. If you are using EwsClient to communicate with SBO, you should be careful how often you instantiate the client class. Each time you instantiate the class it authenticates to SBO with the credentials you provided and since SBO has only a finite number of client connections available you could consume all connections in SBO pretty quickly if you’re not careful. So if you need to make numerous calls, you should reuse your client instance. You will additionally gain the benefit of SBO’s support for an auth cookie so each call won’t need to be authenticated (that would actually happen for you automatically anyway with the client but I figured I’d mention it anyway). And as always, remember to call Dispose on EwsClient since it is IDisposable.
As Adam stated in his reply, SmartConnector 2.2 will include RESTful services for any EWS server – be it the internal SmartConnector EWS Server or an external one based on the SOAP EWS protocol (SBO for example). This API will also include authentication (OAuth) and throttling to ensure that the underlying server is not overwhelmed. If you’re interested in demoing this, we can make a Beta version available to you. Release is currently expected towards the end of Q3 next month.
Link copied. Please paste this link to share this article on your social media post.
Hi Austen Yin,
For me this is not a straight forward answer, there are lots of potential complications with creating services which poll an SBO EWS Server.
Before you begin coding, I'd recommend you take a look at the EcoStruxure Web Services Serve Performance Integration Guide produced by the Buildings StruxureLab, this will help understand the flow of EWS data and delays in which you should expect depending on the destination of the data you want to retrieve. Consider if your connector will talk to an Enterprise Server, is the value in the Enterprise Server or are you then going to talk to an Automation Server, which may have to talk to a field bus to retrieve a live value?
There is also a Big Data TVDA which discusses using Trend Logs and an Automation Server as an aggregator for big data applications.
https://community.se.com/servlet/JiveServlet/previewBody/14687-102-1-11526/EWS%20Serve%20Perform…
Those are important to understand more about how EWS will perform, from that, specifically to SmartConnector development, a couple of things I'd note is;
1) Make sure you find a way to cache and re-use your client object where possible if you plan on making many calls. EWS Servers use a cookie for client connections and I once wrote a Connector which created a new client each time, eventually after significant polling the EWS Server crashed as it could not issue more sessions!
2) Consider if your connector could be configured to distribute communication to Automation Servers rather than placing load on the ES if you don't follow the principle of mirroring values to the ES.
If you're looking to provide some kind of API over the top of EWS, you may want to consider waiting for the next release of SmartConnector. The team are working on deploying RESTful API services over the top of EWS servers and I understand you'll then also be able to leverage the framework over the top of any EWS server you create too. That would save you a lot of effort and if what it does out of the box doesn't work, maybe you could extend it to give you the functionality you need. Some time ago I already created a connector which did this (although not as well as what you'll get in the core of SmartConnector very soon). I have a processor which allows you to get JSON and XML results from EWS Servers in a restful manner. If you wanted to take a look at that I'd be happy to share the manual and processor with you. I can create a license for you valid for 30 days so you can see what it does. - Let me know if this will help you.
I'm sure the rest of the community might have some experience to share too
Adam
Link copied. Please paste this link to share this article on your social media post.
The short answer is “No”. If you are using SmartConnector’s EwsClient library there are no client side restrictions. Those types of restrictions typically reside on the “server side” (SBO, PME, etc). One tip though. If you are using EwsClient to communicate with SBO, you should be careful how often you instantiate the client class. Each time you instantiate the class it authenticates to SBO with the credentials you provided and since SBO has only a finite number of client connections available you could consume all connections in SBO pretty quickly if you’re not careful. So if you need to make numerous calls, you should reuse your client instance. You will additionally gain the benefit of SBO’s support for an auth cookie so each call won’t need to be authenticated (that would actually happen for you automatically anyway with the client but I figured I’d mention it anyway). And as always, remember to call Dispose on EwsClient since it is IDisposable.
As Adam stated in his reply, SmartConnector 2.2 will include RESTful services for any EWS server – be it the internal SmartConnector EWS Server or an external one based on the SOAP EWS protocol (SBO for example). This API will also include authentication (OAuth) and throttling to ensure that the underlying server is not overwhelmed. If you’re interested in demoing this, we can make a Beta version available to you. Release is currently expected towards the end of Q3 next month.
Link copied. Please paste this link to share this article on your social media post.
Thanks Adam:
I am still not clear to used the session to keep the connection status for a EwsClient, it would be possible under below two situation
1. By using the SmartConnector framework, I may just never try the session, is it the version 2.0.11 supported since I am still use this one? Is there any sample to show how to use session?
2. To meet some simple requirement, I may only need use some of the library files of Mongoose to create my own API(just a dll file) for others to integrate with SBO, then I even not install the smartConnector at all, how could I create session in this way?
Cheers
Austen Yin
Link copied. Please paste this link to share this article on your social media post.
Austen,
-Jeff
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.