tags:

views:

192

answers:

4

I am designing a Windows application in C# which when run for the first time creates a local database (SQLite) and the data (around 200 MB or even more) to this is feed as a data stream from a remote server based on the criteria specified by the user.

Currently I have planned to access the database server directly from the application.

Questions:

  1. Is it a good idea to use the database server directly from the application as the server manages connections automatically and I save time in developing a TCP/IP interface.
  2. What can be the second option? Providing a TCP/IP server or interface (Isn't it time consuming to write it?).
  3. As the data is large should I use compression?
+1  A: 

Without going into large detail I can say you can use ASP.NET C# (You can choose any .NET language) and you can send and receive data using POST.

Why would you need compression? You are only sending results? If it is big you can use an existing library. I have used sevenzipsharp in the past without much issue.

Edit: There may be an option on the server to gzip output data so you may not need to use anything.

An employee
Its a streaming data and 99% receiving.
Vishal
A: 

It is usually best to use ADO.NET or LINQ to SQL (Entity Framework) to connect to your Database directly unless the User is going to be disconnected while using the application.

If you are going to have the user disconnect then continue using SQLite or you can use ADO.NET which can save an XML file of the data and access it like a Table from the users machine without the additional dependence of SQLite.

I would not use compression because C# does not have a built-in library for it and would require an additional dependency.

Try to just use the .NET Framework without additional DLL's and you will have a more flexible application that is easier to install and maintain.

ADO/Entity Framework - http://msdn.microsoft.com/en-us/library/h43ks021.aspx

Todd Moses
FYI, .Net has built in support for GZip - http://msdn.microsoft.com/en-us/library/system.io.compression.aspx
JonoW
But only J# has the library to create a ZIP File. GZip does not create a .zip file.
Todd Moses
+3  A: 

With WCF you can avoid the cost of writing TCP/IP code and have a standalone server or a web service hosted on IIS. Moreover, compression can be added without code change.

You have to try with and without compression. The compression rate highly depends on the data and compression time can also be an issue.

Guillaume
A: 

Assuming that your intention is to pull down a subset of the data on the server dependent on client queries for local storage then for reasons of security and control you probably ought to be looking at using web services rather than exposing your database directly to the internet.

There are a large number of options for creating services - WCF being the principal method for new .NET applications and straightforward to implement at both server and client ends - in this case I'd also probably take a look at ADO.NET Data Services as providing a shortcut to a rich set of services.

Murph