WCF RIA send Server notification - wcf-ria-services

Is it possible to notify all clients from the server using WCF RIA ?
We have a requirement in which when we save a data from our Silverlight 5 client,all clients should be notified. we use WCF RIA on the backend,
Would appreicate if someone can point me to the right direction !
Thanks !

I Agree with Leo about SignalR and it shouldn't be hard to do, however has to be said that Silverlight supports FullDuplex, so you can make your client to call your server in order to estabilish the connection and get the callback. Here's a sample http://msdn.microsoft.com/en-us/library/cc645027(v=vs.95).aspx. Keep in mind that in order to use fullduplex you silverlight client have to open ports (4502-4534).
Ther's finally the idea to use a Comet pattern, for which I drive you to this question: Silverlight: Enterprise-grade push notifications however I've encountered some problems with FF/Chrome and long polling
HTH

Related

REST turn based game server in WebAPI

I try to implement web server for simple turn based game in WebAPI 2.0 using REST architecture. Although the gameplay itselfs (as it's purely turn based) seems to be a good candidate for web-api based server communication I have some concerns about "game-search" functionallity. When user want to start game, the GET request to "/api/gamesearch" would be made (and wait for next player) - but HTTP is stateless protocole so is it even possible to do that?
Another important thing (corellated with previous question) - I guess it's not possible to implement "game-over" functionallity when player (whose ture is atm) doesn't send any request (do not move) in some time period after HTTP response was send by server (which assigned ture to player) ?
I have seen there is a possibility to send Protocole exchange request for switching to WebSocket but that raises another question - do WebSockets need special web-server privileges (is pure mvc hosting enough?) - I have to keep costs low as much it is possible (that's personal project - I suspect I won't even earn penny on that).
You will probably need to communicate with your server throughout the game sessions as well. If your game is browser-based, something like SignalR should be great for your scenario. Usins SignalR you will be able to have constant communication with your server and your sever will be able to push data to your clients.
There shouldn't be a problem to use WebApi. Here you can find a discussion about WebApi and SignalR.

XMPP Bosh vs SignalR

Does XMPP has more advantaces agains SignalR? They both using http long polling mechanism and I can not decide shall I use XMPP for my chat aplication or shall I use SignalR and keep everything ion my IIS server?
SignalR uses several transports see the explanation here How SignalR works internally?. Advantages of XMPP are the fact that greater number of other clients that just work out of the box (gchat, pidgin etc). But you could use both for your application if you wanted.
SignalR has a pile of ways for real time communication. WebSocket!! have you not heared about it? SignalR only use long pooling when nothing else is availabe on your old computer.

Where should I look for a Scala framework that supports bidirectional asynchronous communication?

I have a single server which can have multiple clients. Each client sends an asynchronous message to the server which immediately routes the message to a third party provider. At some point in the future, the server receives a response from the third party provider which should immediately be routed back to the sending client. I have had a look at Akka but had trouble figuring out how to route messages from the server back to clients at arbitrary points in the future. If I can be given some pointers even to the right parts of documentation I'm happy to take it from there. At the moment I am bewildered by the array of frameworks and options available.
"I have had a look at Akka but had trouble figuring out how to route messages from the server back to clients at arbitrary points in the future."
When a message comes in from a client, store away the reference of the sender, so you can send to it later.
Perhaps if you elaborate on the problem you experienced we can assist?
Cheers,
√
BlueEyes is designed for this kind of workflow.
You could also use atmosphere.
If your clients are browsers, you can use Lift and its comet support. This post gives you one example of doing async work using Lift

Sync the sqlite data of iphone application to server

I am trying to make the sync data application in which user have some value into the data base .And he have to send this data on to the server .With help http request how can i do that .
I need the
I am not using the php web server .
I am using the Normal HTTP web page .
ANd i have the some data in my iphone application and i want to Synchronization that data to server .
I it must check the Internet is available or not .If the Internet is ON than only he will Synchronization the data .that's my question .
Nothing else .You got my point or not .
I thing people will reply me soon please
Thanks
You have got to have some kind of server backend for synchronization of the local database. You can't do that using just the static HTML pages.
Your application and server have to have a way to talk to each other using a web service protocol, like SOAP or JSON/REST. Then your application has to translate the data from the database into such web service data objects.
Both your local database and the server (in case of more than one client) will have keep the records of at least the times of last synchronizations so both know what should be sent over the air in order to become in sync.
Also, in the usual case of more than one client, you have to solve the problem of conflicts resolution.
Web service versioning is important as well, as there will be very likely a need to improve the communication channel, maybe there will be changes in the database model to be synchronized.
As you can see, the idea of synchronizing local database to a server is not that simple, and if you think you can do it in a simple way, in time you'll realise that you're gradually reimplementing the aforementioned ideas.
Do a research on web service technologies, writing web services-aware apps, on synchronization with web services and on Reachability, for starters.
To check internet availability, check out the Reachability class from Apple. See this article.
To send data to a simple HTTP form via POST use NSURLConnection like in this article.
Cheers,
S

Ajax Push Engine

I'm researching methods to find ways for an event driven web application where a server can push data to the web page. Can I use APE ?? If so how can I use it and some resources please??
Thank You!!
People have been writing event driven servers since the dawn of the network. A simple google search will find your way.
However, since the client is a browser, your server must re-act upon keeping an HTTP connection open instead of simply doing socket work.
This is basically the only small difference than say an IRC server or a simple chat server.