I followed this link to setup a feathers service class to serve a websocket service by primus (https://docs.feathersjs.com/api/services.html). And clients are using feathers-client to use these methods. However, there are some cases to cancel a request from the client side. Is there a way to cancel it?
Related
I am trying to develop a personal website, currently my hurdle is form submission and contact page management. How do I do a form submit on a personal site hosted on cloudflare pages to a serverless function on cloudflare workers with integration to slack or a webhook. It just doesn't seem to make sense, Do you have anything in mind???:)
Using a Cloudflare worker for form submission won't be too different from any other server side language.
The general idea is, you have an HTML form, and your target will be a URL. For Cloudflare workers, you'll probably want to set a route so you can use your own domain (e.g. mysite.com/form-submit).
Inside the worker's code, you'll be able to examine the incoming request, and execute whatever code you'd like. In your case, making an additional HTTP call to a slack webhook. This example may help with that -
https://developers.cloudflare.com/workers/examples/post-json
I am trying to find a way to connect SQS with a website.
My general understanding of the project is that when a user clicks a button on the website it will send a message to the queue, and then I will have an Arduino receiving the message, which will then trigger a function that will move a robot. I have played around with Temboo and have managed to receive messages on the Arudino board, but I have no idea if it is even possible to send messages through a HTML button press. Is this even doable?
One way to send messages to SQS from a web browser is to use the AWS JavaScript SDK in the browser. You will need to supply credentials to the browser client so that it can make SDK calls, so ideally your client authenticates to your back-end and your back-end can send temporary (STS) credentials down to the client to use with the SDK.
Or you can use Amplify Pub/Sub, which is a higher-level framework than the AWS SDK.
Another way would be to create a small Lambda function, fronted with API Gateway, and then your browser client can POST to an HTTPS endpoint that will trigger your Lambda function to send the message to SQS.
How can i use server sent events with WCF?
To be specific:
how to make wcf broadcast and send data continuously to client.
How to consume those information in HTML5 page.
No you cannot.
What you are asking for is not possible.
You can send data to WCF clients via callbacks over duplex bindings, but this is not receivable from javascript, only WCF clients.
Or you can send data to client side javascript code using SignalR, which is an implementation of server sent events.
I am developing a HTMl5 based application using ExtJS. The server is pushing messages whenever updates comes. In this app, I have to implement push notification (instead set timer to get updated messages from server periodically).
Is there way to implement push notification using ExtJS or using any JavaScript framework?
--Sridhar
Yes, you can use WebSocket technology for this purpose which allows a server and an ExtJS client communicate over a full-duplex TCP connection. Here is an ExtJS WebSocket component: https://github.com/wilk/ExtJS-WebSocket
It also provides event-driven communication and message broadcasting to multiple peers which exactly fits the requirements of implementing push notiication.
Is there any way to make a websocket as a REST service and host it in IIS..IIS8 only supports websocket with NetHttpBinding. and access from a client who has a proxy implemented for the service...But I want to have Websocket with REST..so that I can access that service from my android App and my HTML5 Client. Is that possible..???
I have a rest service in my project which serves data as per requirement.
1.RegisterTag(TagName);
2.value GetValue();
Now I have to have a callback from the service. First I have to call the RegisterTag(MyTagName). and then I should get notification from the server side.It is implemented with the Server sent events. But now I need to convert this REST service to websocket.
So, is it possible to add REST feature in WebSocket ?? I am planning to add NetHttpBinding in my new implementation.
Thanks
Arijit
have a look at this
Is ReST over websockets possible?
http://www.kimchy.org/rest_and_web_sockets/
REST does not require any specific protocol so it is possible to use websockets if you like.
"One thing that confuses people, is that REST and HTTP seem to be hand-in-hand. After all, the world-wide-web itself runs on HTTP, and it makes sense, a RESTful API does the same. However, there is nothing in the REST constraints that makes the usage of HTTP as a transfer protocol mandatory. It's perfectly possible to use other transfer protocols like SNMP, SMTP and others to use, and your API could still very well be a RESTful API"
http://restcookbook.com/Miscellaneous/rest-and-http/