John Walker
John Walker

Reputation: 1121

mssql remote application VS web based application

I have a client request for develop Point of sales system(POS). but most of the POS system are using desktop based application.
client request all the branches do not need database installation, and branches directly connected to HQ server.
this kind of requirement are suitable for web based application,
but if i m using desktop based application, VB.NET to develop, and remote access MS SQL database.
any problem i will face? is it stable?

dont bother the server down business,
i just want to know when retrieve huge data for web based and desktop based(remote access DB) the speed of retrieve data any differentiate ?

server bandwidth : DEDICATED 100MB UPLOAD AND DOWNLOAD

Upvotes: 3

Views: 780

Answers (3)

MAC
MAC

Reputation: 686

Mostly... if you use remote application, there are a lot of configurations to do and troubles can occur when it comes to the types of OS a certain user would use, like for instance MAC PC or any apple product.

Visit these sites: site1 and site2 for more info. Web-based application is more convenient than desktop based but if you are trying to make a desktop based and only have problems with the database, you can use VB.Net and POSTGRESQL as the database which is not directly connected to your VB instead have a web-based database. I don't know exactly how to call this but try having a web application that renders json format for your data and call it from your VB code. The exact process is using GET and POST method.

you can use this code... under your module:

Public globalLink As String = "https://samplesite.com/"
Public Sub Save(ByVal link As String, ByVal data As String)
    request = WebRequest.Create(link)
    request.Credentials = CredentialCache.DefaultCredentials


    request.Method = "POST"
    request.ContentType = "application/x-www-form-urlencoded"
    postData = String.Format(data)
    request.ContentLength = postData.Length
    byteArray = Encoding.ASCII.GetBytes(postData)
    request.ContentLength = byteArray.Length
    dataStream = request.GetRequestStream()
    dataStream.Write(byteArray, 0, byteArray.Length)
    dataStream.Close()

    response = request.GetResponse()
    dataStream = response.GetResponseStream()
    reader = New StreamReader(dataStream)
    webRep = (CType(response, HttpWebResponse).StatusDescription)


    dataStream = response.GetResponseStream()
    reader = New StreamReader(dataStream)

    reader.Close()
    response.Close()
End Sub

the link is literally the link and the data is the parameters sent. Parameters will look like this upon saving...

www.samplesite.com/POSdata?id=01&field1=sampledata&field2=sampledata2

When I was doing this kind of process, I used Ruby on Rails deployed to Heroku and call from VB which works well.

The only problem when using this method is when you have slow internet connection which has definitely no problem for you.

Upvotes: 1

Muhammad Nagy
Muhammad Nagy

Reputation: 226

For the performance purpose, Web application can give you the same performance like the desktop application if you use highly optimized service like Web API with optimized front-end. The main issue in implementing POS as a web application is that the clients must work online all the time which is not guaranteed. So, I think the best way is to create WCF/Web API Service that encapsulate all business logic and consume this service from Desktop application. Feature of this architecture are as follows:

  1. You will have all business logic in the service so, if you make future changes to the service you will not re-install application on all clients.
  2. Your business logic and database structure will not distribute with client application.
  3. You can use Sync Framework to store data locally in case the connection to the server is down
  4. You will have more control on application than on the web throw many windows events that makes the application more usable and better performance.

Note: Accessing DB remotely will work perfectly for you in term of performance. But you will need to deploy the desktop application on all clients every minor change. And from security point of view it is not recommended to add database schema and connection info in all clients.

Upvotes: 0

Justin Ryan
Justin Ryan

Reputation: 1404

i just want to know when retrieve huge data for web based and desktop based(remote access DB) the speed of retrieve data any differentiate ?

If by this you mean, "is there any difference in speed between a desktop application and a web application when accessing large amounts of data from a database," the short answer is likely to be, no. Your database design and code efficiency is far more likely to have an impact on the performance of your transactions than the (probably) negligible difference in architecture between accessing through different platforms.

Assuming that all of your PoS clients will be running on the same platform (either web OR desktop) you will only be designing one method of entry into your database. Therefore, instead of having to design a complex system to support various clients, you are able to focus support on a single access scheme. You can spend that saved time and effort on making your database and code as efficient and reliable as possible.

There does exist some evidence to support that web based access will be slower in general, and you should certainly take that into consideration. Have a look at this question, for example, where Wim ten Brink suggests that, "connecting through a web service will always be a bit slower," and other users have suggested 'desktop' strategies. Consider, though, that this is very empirical evidence, and these answers don't necessarily apply to remote access to a database, simply different schemes.

However, you must also weigh the other costs/benefits between methods against a purely performance view. As mentioned in the above question, for example, web based applications benefit in other ways, such as a far more rapid client side update process, and far greater (inherent) security. Which of the countless priorities is important, and how important they are to your project, is entirely up to you (and for the most part, your client as well), but I'd suggest that making a decision based on a single performance metric alone (especially since you can't accurately gauge the impact without testing each in your specific scenario) may be a bit narrow sighted.

Finally, I'll just take a moment to reemphasize the point I was trying to make in my comment earlier: speed is an absolutely moot point if you lose connectivity (and therefore functionality), without a backup solution. Your client may think they don't want a backup database, but I guarantee they'll change their mind when the smallest error causes them to lose sales.

Additional Resources

  • This question has a couple of good answers on why a web app might work better for you, since your database must be hosted remotely (importantly, that the web app is hosted locally to the database).
  • Here is a question with some really solid answers arguing web vs. desktop, although not specifically about database access.

Upvotes: 0

Related Questions