1

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

Arijit
  • 93
  • 3
  • 13

2 Answers2

0

have a look at this Is ReST over websockets possible?
http://www.kimchy.org/rest_and_web_sockets/

Community
  • 1
  • 1
Tanvir Huda
  • 73
  • 1
  • 1
  • 7
0

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/

David Berg
  • 1,958
  • 1
  • 21
  • 37