I developed an application in blackberry consuming .asmx web service, response from the web service is slow when internet connection is slow. Do you think using WCF web service instead of .asmx web service can make the difference in communication? Can i make the data transfer fast?
If it's simply when the "internet connection is slow" then there isn't anything you can do about that other than reducing the footprint of the data being transferred. Depending on the type of data you could look at gzipping the content between the client and server.
Obviously you'll need to do your own benchmarking to ensure you're not causing more delays due to the additional CPU processing.
Related
I'm a little confused at the memory use of my WCF service. Brief overview, my wcf service is an odata providor that allows my ipad application to talk to our sql server database.
The problem is that when a client (ipad device using objective c odata library) calls for a simple set of data (say get all customers from the database) the memory of the w3wp process goes up by a few mb's, and never really comes back down. Being the fact that all the client wants to do is one off calls (retrieve a data set, update a data set, delete a data set) than once it has finished its call the memory it used to do the action should be relinquished. This is not the case at all? I gather there is some caching happening or maybe the calling instance is not being disposed.
Can anybody steer me in the right direction so the w3wp is lean and blows the memory away after the call has completed.
Thanks in advance
does you database reside on the same machine as your web server? if your indexes are not properly applied you will end up consuming much resources. if you are using MS SQL Server check the minimum memory setting for the server. once reached the minimum memory limit MS SQL Server will probably not free it up until restarted. you should also take a look at you binding configuration. if you use a state full (session) binding and not closing the session the service instance is gonna stay in memory for 10 mins (default) waiting for new client requests from the same proxy object.
I'm building a system with some remote desktop capabilities. The client is considered every computer which is sharing its desktop, the server is considered a central server with a database which receives the images of all the multiple desktops. On the client side, I would like to build two projects: A windows service application and a VCL forms application. Each client app would presumably be running under a different user account on the computer, so there might be multiple client apps running at once, and they all send their image into this client service, which relays them to the central server.
The service will be responsible for connecting to the server, sending the image, and receiving mouse/keyboard events. The application, which is running in the background, will connect to this service some how and transmit the screenshots into the service. The goal is that one service is running while multiple "clients" are able to connect to it and send their desktop image. This service will be connected to the "central server" which receives all these different screenshots from different "clients". The images will then be either saved and logged or re-directed to any "dashboard" which might be viewing that "client".
The question is through what method should I use to connect the client applications to the client service to send images? They will be running on the same computer. I will need both the abilities to send simple command packets as well as stream a chunk of an image. I was about to use the Indy components (TIdTCPServer etc.) but I'm sure there must be an easier and cleaner way to do it. I'm using the Indy components elsewhere in the projects too.
Here's a diagram of the overall system I'm aiming for - I'm just worried about the parts on the far right and far left - where the apps connect to the service within the same computer. As you can see, since there are many layers, I need to make sure whatever method(s) I use are powerful enough to accommodate for streaming massive amounts of image data.
Communicates among processes, you can use Pipe/Mailslots/Socket, I also think while sending a stream file Shared Memory maybe the most efficient way
I've done this a few times now, in a number of different configurations. The key to making it easy for me was using the RemObjects SDK which took care of the communications part. With a thread that controls its state, I can have a connection to a server or service that is reliable, and can transfer anything from a status byte through to transferring many megabytes of data (it is recommended that you use small chunks for large data so that you have more fine grained control over errors and flow). I now have a set of high reliability templates that I can deploy to make a new variation quite easily, and it can be updated with new function calls without much hassle (first thing I do is negotiate versions between the client and server so they know what they can support). Because it all works at a high level, my code is just making "function calls" and never worrying about what the format on the wire is. Likewise I can switch from their binary format to standard SOAP or other without changing the core logic. Finally, the connections can be local, to the same machine (I use this for end user apps talking to a background service) or to a machine on the LAN or internet. All in the same code.
I have an embedded device that runs WinCE with wireless capabilites.
I'm looking for advice on technologies I can successfully use that will allow me to easily create a web service on the WinCE device and be able to serve content to my iOS device.
I'd prefer that the web service running on the WinCE device support REST as opposed to SOAP.
A REST Web Service can really be created with anything that can listen and respond to HTTP requests, so a simple socket listener could effectively fulfill your requirements.
Service over wireless and the fact that the client is iOS is actually irrelevant, as the service simply has to know how to respond to HTTP requests, probably (though not certainly) on port 80. If a PC can consume the service, so can iOS, Linux, Andoid, OD/2 or anything else. That's the whole point of a web service.
I assume, however, that you're after something a bit more feature-rich than just rolling your own socket listener. Windows CE has an optional HTTP server that can serve up basic HTML as well as a subset of classic (i.e. 3.0) ASP and some ISAPI. They all tend to be painful to use and debug, but they are included in your OS license and therefore essentially free.
There is also at least one commercial solution that I'm aware of, and that's the Padarn web server. It uses a subset of the IIS object model, so you can easily create IHttpHandlers for URIs and handle requests with compact framework assemblies. As full disclosure, I'm the creator and purveyor of Padarn, so I'm obviously biased toward it.
Is it possible to check the number of existing available connections a wcf service has? programmatically?
I want to see if connections to the web service were closed properly in the ASP.NET code.
thanks
You could check out something like Windows Server AppFabric for that purpose.
In WCF, most of the time, the "connections" are only open very briefly anyway - for as long as a service call lasts. So you can't really go check if there are any connections around - they'll be gone when the call terminates.
You can also check into the WCF performance counters that are available on the server side to keep an eye on the number of concurrent sessions. You can definitely query performance counters from .NET code. The Service Performance Counters offer e.g. a number of instances (of your service class) that are in memory at any given time - that's the number of requests being handled at any given time (which is probably what you could call a "connection" to a WCF service).
if a mobile application needs to get data from multiple servers, is it better to call each server from the mobile device, or call one server which then talks to all the other servers?
"should synchronization be initiated by the server or the mobile client?" to what degree does client do the book keeping.
Say if the application is mobile email or voicemail client in both cases.
Some of the main issues with mobile synchronization of personal information are the battery life of the handset and the temporary loss of connectivity.
That's why the usual way of doing what you describe is to have a server handle most of the complicated logic and multiple data sources to create the set of data to be synchronized and then have a proprietary protocol between the server and the client to mirror just that set of data.
In effect, connection to the server will always be initiated by the client, no matter how much people talk about "push" e-mail. Your client application can have a user option to make the phone stay online as much as the network conditions allow. The server can react to a connection being established by automatically sending the latest data it needs synchronized with the client.
Very vague question, but I would say both could be necessary. Your servers should coordinate as much as they need to make sure the data stored between them stays consistent. A buggy or malicious client should not be able to cause corruption or inconsistencies in the data stored on the server. The client should do whatever synchronization it needs to make sure that the local copy of the data is consistent and that it is not uploading garbage to the servers.