Is there any way to configure the traffic load distribution based on percentage value - load-balancing

We have two micro services Say Service MS-AA & MS-BB and we have configured the load as 10% for MS-AA & 90% for MS-BB from a third microservice-XYZ
Does Netflix Ribbon can solve my problem? If yes how to configure two services based on TPS percentage. Or there is any other library available to solve this requirement.
For details please refer the data flow diagram attached in this question link
Note :- Form TDM there is a RPC call not the end point call.
Data Flow Diagram of Requirement
enter image description here

Related

push telemetry to thingsboard asset

I've trying to setup ThingsBoard for a few days and up to now it's going well. I'm stuck on how to push attributes (sometimes in an aggregate mode - avg, sum, etc) and telemetry data from a Device to its related asset.
Any simple way to do it? I didn't find any API for such.
Thanks
The following is the API for pushing telemetry data for asset, but you also need to be atleast a customer user to use the api i.e need to set authorization token in header as x-authoization: Bearer {JWTtoken}
API: /api/plugins/telemetry/ASSET/{assetId}/timeseries/SERVER_SCOPE/
method : POST
request(example):
{
"ts": 1563456910227,
"values": {
"longitude": "78.381984",
"latitude": "17.448645",
"fuel": "30",
"speed": "42",
"vehicleType": "bus",
"status": "On route"
}
}
Thingsboard supports MQTT, CoAP and HTTP. See https://thingsboard.io/docs/user-guide/telemetry/#device-telemetry-upload-api for details.
I had a similar problem and was able to fix it by:
(1) in GUI adding a relation from the DEVICE to an associated ENTITY (in my case it was CUSTOMER entity Type)
N.B. here is a related question with a possible solution for creating the relation in code.
then
(2) updating the root rule chain in thingsboard (also via the GUI). Step by step instructions and a picture of my working rule chain canvas can be found in here.
After taking these steps I was not only able to see latest device telemetry show up on latest telemetry for the related customer in the GUI, but also was able to get back the device id in api response to my request for latest telemetry from all devices belonging to a customer.
In rule chain you can do it easily,
first filter the message to make sure you are selecting the right one, then use " Enrichment node" called (duplicate to related) then use save telemetry like attached.
enter image description here
Push Data from Device to Asset - Basic Example
You can leverage Rule Engine to do that in real time.
First of all you have to establish a relation between a device and an asset which can be done via the Web UI or REST APIs. Below a screenshot for asset Building A that contains the device Thermostat A:
To push Thermostat A data to the related asset Building A, use a Rule Chain where key steps are changing the message originator from device to related asset, and then saving timeseries (or attributes) for the asset. You can decide whether to perform a double saving (first on device and then on asset, as I've done in the rule chain below) or to store data only at asset level. I consider good practice to store raw data as soon as they're uploaded, and to do additional persistence after further computations if needed.
Push data from Device to Asset - Advanced Example
An advanced version of the above example is described here and it shows the calculation of delta temperature between outdoor and indoor thermostats (the devices) installed into a warehouse (the asset).
Professional Edition Rule Nodes
There are some rule nodes suitable for your purposes, such as Duplicate To Related or Aggregate Stream, but they are available only on the Thingsboard PE edition.

How to configure OCI catalog for ME51N?

We have a requirement to connect to an external catalog from ME51N tcode (Purchase Requisition). This integration must be done entirely from ECC side and shouldn't be linked with SRM.
I have tried configuring the OCI on two different places. Let me explain the results and doubts for each. I don't need the two solutions, just one that gives me what I require.
Path: SPRO-> IMG-> Materials Management-> Purchasing-> Environment Data-> Web Services: ID and Description
Here I was able to configure the connection to the Catalog, and after defining it as default I get the button on ME51N's toolbar to get to the catalog. I'm able to select the data and return it to the purchase requisition. However some data that the client is sending is not the same as we have configured in our materials management, e.g. if they send a material group that we don't have the received material group is deleted and I can't see what the catalog returned for that field.
I've searched for a way to map these fields, and possibly insert some Z code to map those values and fill them like we need to, but I havent found anything that is usefull, most documentation is made for SRM, not for ECC.
So, how can I map/configure these values returned from the catalog? I'm currently looking at BADI ME_PROCESS_REQ_CUST to makes changes based on what the Catalog returned, but this is too late, as not configured values have already been deleted by then.
Since I couldn't configure this, I tried another way, using this other path, that does give me the option of mapping the fields from the catalog to SAP's standard fields, and even the possibility to set exits to add personal logic.
Path: SPRO-> IMG-> Plant Maintenance and Customer Service-> Maintenance and Service Processing-> Maintenance and Service Orders-> Interface for Procurement Using Catalogs (OCI)-> Define Catalogs.
However I haven't been able to display a link to these catalogs in ME51N.
Can these Catalogs be linked to ME51N?
Thanks
Well, I have no catalog by my hands now, but the procedure for connecting catalog to ERP via OCI seems to be the following:
You should make proper customization in the path
SPRO-> IMG-> Plant Maintenance and Customer Service-> Maintenance and Service Processing-> Maintenance and Service Orders-> Interface for Procurement Using External Catalogs
To adjust automatic Purchase Requisition creation you should set item category to N (non-stock item).
And also you should activate method COMPONENT_VIA_CATALOG_GET in BAdI PLM_CATALOG_IF.
See additional details here.

Single Softlayer API to collect information from different services

SoftLayer's API has different "services" for the different objects represented in the API. Virtual Guests, Bare Metal Servers, VLANs, IP addresses, etc are all different types of services. There are also links between these services, so I want to use a single API query to get information about multiple services. The Object Mask is one way of joining the different services.
Can anyone please tell me how to achieve it using object mask.
Here you can see information about object mask:
http://sldn.softlayer.com/article/object-Masks
Now all the services are attached to your account, so you need to take a look to the service:
http://sldn.softlayer.com/reference/datatypes/SoftLayer_Account
http://sldn.softlayer.com/reference/services/SoftLayer_Account
The service provides several methods to get differents services such as virtual guest:
http://sldn.softlayer.com/reference/services/SoftLayer_Account/getVirtualGuests
or get all the bare metal servers in your account:
http://sldn.softlayer.com/reference/services/SoftLayer_Account/getHardware
Using Object mask you just need to call the getObject method and add the properties that you want for example see this RESTFul to get the virtual guest, bare metal servers and VLans:
GET https://$USERNAME:$APIKEY#api.softlayer.com/rest/v3.1/SoftLayer_Account/getObject?objectMask=mask[virtualGuests,hardware,networkVlans]
So you can get all the information that you need in a single request however, when your response contains a big amount of data your request will throw an exception, in order to handle that you need to use result limits in your request you can see more information about how to add it to your request here:
https://sldn.softlayer.com/article/REST
Regards

Commission Junction API for Local (Daily) Deals

Has anyone used Commission Junction's Product Catalog Search API for searching/fetching local deals? (BuyWithMe and KGBDeals post their deals to CJ)
There is a Yipit clone out there which uses this API. This clone was unable to categorize deals properly based on location. I was supposed to fix this issue. The problem I saw is: API's response does not contain location/city info. Therefore, deals cannot be categorized based on cities. This basically kills the purpose of local deals.
I am looking for advice from anyone who has done similar work using CJ API. May be I am missing something.
OneBigPlanet has an All-In-One API filled with all affiliate networks and daily deal providers for U.S & Canada
If you are going to use a deal aggregator API for your site/blog, you may want to take a look at this one as well.
SideBuy has recently released its version 1 API which lets the user (like yourself) connect to its comprehensive set of daily deals using several parameters to fully customize the listings. I suggest you check it out and get in touch in SideBuy's site if you need further assistance.
Disclaimer: I work for sidebuy.com.

Bloomberg API: How to get the list of Pricing Sources?

It's possible to get current pricing source for a security (PRICING_SOURCE field). Is there any field that returns the list of all available pricing sources for defined security?
Thank you.
No - it's not currently possible.
Any fields (i.e. visible in FLDS in the terminal) are accessible via the API - such as the PRICING_SOURCE field in the question.
However, there is currently no functionality like the terminal commands PCS or ALLQ in the API at the moment. There is a request for this functionality with the Bloomberg programmers, and you can contact the Bbg helpdesk to have yourself added to the request to be informed when it becomes available.
Look up your pcs enablements, find the one you want to use /then lock down the eid # from the respective ctrb page. You can request eid specific prices via api.