Is there a framework that supports publishing (pushing) messages from a WCF service (REST or SOAP) to various clients like IPhone, Android and WP7? I'm thinking I can use the WSDualHttpBinding to do dual communication between WCF and WP7. However, I'm assuming WSDualHttpBinding is not supported in the other two platforms since is not a WS-* standard and there's a lot of stuff that WCF does to establish a receiving channel on the client side. Is there any other way to accomplish this? How would I about rolling my own?
I'm thinking about exposing my WCF service as a restful endpoint and implement a COMET style pub/sub and calling it good.
I'm stuck. Any help would be greatly appreciated.
Since you already have a solution for WP7, you could probably use urbanairship.com to handle the pushes for iPhone and Android. I've used them on a prior project with good results. (I don't work for them.)
I found this "Cloud to Device Messaging", C2DM, yesterday and thought it may serve your question:
http://www.makeurownrules.com/archives/category/android
Have you considered using SignalR? It'll fallback gracefully from WebSockets & Server-Side Events through to long polling. There's a mono implementation of the client-side library.
We're successfully using it in a large-scale realtime application and it works a treat. A bit further down this page it details how to communicate with clients from outside the SignalR infrastructure which may be useful if you want to talk to clients from your WCF service.
Cheers,
Dean
Related
Ok. Here is my situation:
I am developing an embedded device, which provide a service. It will provide some web based services to a client (a smart phone).
Currently we are planning to implement a REST server in the device so that web applications can easily access and use the services provided by the device.
In the future, we plan to add a display and a better processor to our embedded device so that we can run the web applications on the device itself.
We want to maintain application compatibility - i.e all the current web applications should work on the device without any modifications.
Is there a better way to implement this than using REST and HTTP? I am worried about performance running both the server and the client on the device.
If you take care to separate the REST Api code from the actual service code, your newer device can interface (direct call) directly with the service instead of wrapping everything into HTTP and REST.
This being said, you can always try an implementation using you REST api and validate if performance is adequate. If it is, you do not even need to add the indirection.
I am keen to get some apps built that can communicate with other devices/ web etc. i have played around with FTP and can get so far. But what is the best way to do this? We don't have any Servers with databases etc, but do have a site that we are currently uploading and downloading files to.
can anyone suggest a good/ better way to get the device to send/ receive files?
thanks
sam
If it's HTTP communication you're wanting to do, the simplest and most powerful tool is ASIHTTPRequest.
HTTP is the protocol your web browser uses to talk to web servers. If you have a site you're storing and downloading files at, it's almost certainly HTTP you're talking to it.
For iOS device to device communication one can use Bump API.
EDIT: I don't know of a generic framework for device <-> server communications, but having built applications that use web services of other providers like Yelp, Yahoo, Google Maps, I would say the way to go for this is to have REST based web services which exchange data in JSON format.
I want to make an iPhone app and an application (server) which runs on a PC with Windows. Is there any easy way to do this on the client side (the iPhone), like a library or something?
Looking on Google I found cocoaasyncsocket and xmppframework, but the last commits were done some time ago and before I start my project I want to know if there are other (better) possibilities out there
One option would be to run a web server on the PC, with a set of REST-based services. This approach gives you lots of options for implementation on the server-side, and you'll have lots of possible frameworks to choose from on the client-side as well. One framework you could use on the iPhone is ASIHTTPRequest.
There are lots of advantages to using a web-based approach. There are HTTP frameworks built for almost every device and platform, so if you ever want to interact with the server from the web, an Android device, etc., there will be many tools to help you do that. There are also lots of great tools out there for debugging HTTP interactions.
You could also use a SOAP-based API, but in my opinion SOAP tends to be more complicated than its worth.
Aplogies for the ignorant question, I have no experience with app development on any mobile platform. Basically what I want to know is what communication protocols do apps typically use for accessing/querying centralised services? E.g if I port a webapp/service to iPhone/Android, typically how would I access/query this web service in my app? E.g is it over HTTP, or are there other protocols?
Also, presumably the GUI of an app is constructed with Apple/Android GUI libraries (in java? cocoa?). Can an app GUI be defined with HTML/javascript like a webpage?
Sorry again for the pure noob questions.
Thanks
Your question is pretty broad as you can really implement it however you want, but in my own experience the majority of "centralized" services are accessed directly over HTTP using an HTTP networking library or NSURLConnection. Most of the web services I work with are RESTful. Some people might implement with straight sockets, but that's just pain and would be best avoided if possible.
The GUI side is done using Cocoa Touch on the iPhone. I'm not sure about Android. You can certainly implement a web based app targeted specifically for iPhone. In fact there's been a lot in the news lately about developing HTML5 apps for the iPhone and iPad.
Do most of the popular iPhone apps that communicate with a back end Internet server communicate via web services? I was assuming this was the case.
Some apps I'm thinking about would be: Facebook, Bloomberg, NY Times, ESPN, etc.
Well a web service is just an API - Application Programming Interface
The apps you mentioned would probably all implement their own API for exchanging data between the client and the server so yeah, I would say the answer is yes. You can implement your own API via XML, JSON etc. You just need to define the protocol. You can implement existing concepts in your own apps. Have a look at the following:
REST
SOAP
JSON
Most of the Apps that I've written use web services of some sort, I prefer being RESTful, but I have been forced to use SOAP.