Ajax call is getting multiple times - spring

I have shifted spring application from ibm to aws where i am using EC2 and k8 services . On k8 container ,whenever i perform any operation using ajax call ,automatically multiple ajax call is getting at controller . But same application is working fine on IBM .
Is this any feature of K8 or AWS ,if any http request(ajax call) doesn't complete within specific time ,it sends it again without aborting previous one?

Related

Can an endpoint in AWS Lambda function call other endpoints in the same function?

I have a controller in a jar which has 2 endpoints. I call one of the endpoints and it calls the other one. This is working perfectly in my local environment. However, the first endpoint gets called but it is unable to trigger the second endpoint in the AWS Lambda function. There is no error in the CloudWatch logs. What am I missing? Thanks!

NiFi getHTTP or invokeHTTP which processor to use?

I have following two scenario and for each one I need recommendation as to which NiFi processor to use:
I have Restful web services running outside NiFi. NiFi would like to get/post/delete/update some data by calling specific restful API. Once the Restful API receives request from NiFi it sends back the response to NiFi. Which NiFi processor to use here?
In 2nd scenario, I have an application running outside NiFi. This application has its own GUI. The user need some information so he want to send request to NiFi. In NiFi, is there any processor which accepts request from application, process the request, and sends response back?
I actually read all the question with getHTTP and invokeHTTP.
I have initially tried with invokeHTTP processor. I tried both get and post call using invokeHTTP. But I don't see any response from Restful API running outside NiFi.
I did not try getHTTP.
I am using NiFi. NiFi do not have code.
I expect NiFi should be able to call Restful API running outside. I expect NiFi should accept request coming from application running outside and process that request.
Yep, NiFi comes bundled with processors that satisfy both of your requirements.
For scenario #1, you can use either a combination of GetHTTP/PostHTTP which as their name implies are HTTP clients that make GET and POST calls respectively. However, later the community came up with InvokeHTTP that offers more features like support for NiFi Expression Language, support for incoming flowfiles, etc.,
For scenario #2, you can either use ListenHTTP or the combination of HandleHttpRequest/HandleHttpResponse. The later literally offers you have a more robust web-service implementation while the former is a simple web-hook kind. I haven't worked much with ListenHTTP so probably can't comment more on that.
Having said that, for your second scenario, if your objective is to consume NiFi statistics, you can directly hit NiFi's rest api, rather than having a separate NiFi flow with web service capability.
Useful Links
https://pierrevillard.com/2016/03/13/get-data-from-dropbox-using-apache-nifi/
https://dzone.com/articles/using-websockets-with-apache-nifi
https://ddewaele.github.io/http-communication-with-apache-nifi/

Is there a way to access OpenWhisk logs from the API?

I want to programatically dump logs from OpenWhisk in to an external service. I can do this by capturing log output and then posting it at the end of every action but this adds overhead to my function.
Is there a way to get this data from the OpenWhisk API similar to wsk activation logs ACTIVATION_ID?
Action logs are available through the platform API. Console output from actions (stdout or stderr) is stored in the activation records.
Activation records can be accessed by sending a HTTP request to the following endpoint:
/namespaces/{namespace}/activations/{activationid}/logs
Client libraries for accessing the API are available for multiple languages.

multiple workflow instances of Workflows with Windows Workflow Foundation

I'm new to WF. what I'm trying to do is to create a simple Workflow Service and Call them in various clients. So what i have done, I have created a Workflow service. It has a xamlx file and that has a sequence with Receive and Send Reply activity. I also have Correlations. So the first ReceiveandSendReply activity has CanCreateInstance True. In addition to this I
wrote some of my own code activities.
Now I have hosted this service is IIS and trying to call this service using a console app. I have added the web Reference and created a service client and passed the values to the service. It gives me expected results.
But when I'm trying to run another client at the same time it gives me Instance error. I think the Workflow is not initiating a new Instance for the second client.
So I did a search and found multiple instancing can be achieved by using workflowservicehost. But could not find a way to do it.
I think the way Im calling the service is not correct. I'm just creating a new object from the service reference and calling the operation.
Can anyone help me with this?
Please have a look at correlation rules you've set up for your workflow. If several clients passes parameters which correlate with the same instance - a new instance won't be created.
So, if you need a new instance you either need to set different correlation rules, so that different client's calls would correlate with different workflow instances.

IBM Mobile first 7.1 - Please suggest how load test can be performed for push notification

Can any one suggest me how load test can be performed for push notification on worklight server. Is there any tool which can be used. We expect to send approximately 10K messages every day and in future approximately 50K. As per our architecture the backend server will be making rest calls and Send Bulk Messages Check this documentation we following for REST API
Before we go live we want to perform a load test simulating this architecture.
Any suggestion will be appreciated.
You can perform tests using standard open source tool such as JMeter by writing a script that will invoke the sendMessage requests.

Resources