none
How to make a SERVER-CLIENT application? RRS feed

  • Question

  • Dear All,

    I made a application which can do simulation calculations, a simple offline type developed by VB.NET. I want to divide the app into 2 parts, the calculation core works in server and input and output of calculation will be set in client computers. What is the best way,easy to modify on my current code, to realize it? BTW the input data is not too much like 2k, but the output data is over 100M, both of input and output data are in .csv type.

    Thanks!

    Friday, December 21, 2018 1:23 AM

Answers

  • Hello,

    Working with a text file (.csv) the performance will be the same for local or server side but if the data was in say a SQL-Server database (which may not be feasible) all operations are done server side, otherwise there is no real gain in general as the data is not indexed which in a database when setup right will be very fast. 


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    • Marked as answer by goldenview Friday, December 21, 2018 2:31 AM
    Friday, December 21, 2018 1:54 AM
    Moderator

All replies

  • Hello,

    Working with a text file (.csv) the performance will be the same for local or server side but if the data was in say a SQL-Server database (which may not be feasible) all operations are done server side, otherwise there is no real gain in general as the data is not indexed which in a database when setup right will be very fast. 


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    • Marked as answer by goldenview Friday, December 21, 2018 2:31 AM
    Friday, December 21, 2018 1:54 AM
    Moderator
  • Hi Karen, thank you for your reply, is there any quick tutorial of SQL by VB.NET?

    Friday, December 21, 2018 2:31 AM
  • To get a start with SQL, the basics go to the following page where on the left there are plenty of topics to go over.

    Next up, although you can write SQL in Visual Studio I recommend downloading SSMS (SQL-Server Management Studio) for SQL-Server which is free. Write the SQL in SSMS, they will transfer fine to Visual Studio to use with VB.NET.

    Next up, note that SQL for SQL-Server uses generic SQL (as per the first sentence in this reply) and what is known as T-SQL. So let's say you want to do a specific task in SQL-Server e.g. insert a CSV file into a database the search on Google could be tsql bulk insert csv, in the first two pages are a) using BULK INSERT documentation and the second an example. Don't let the documentation get you concerned as there is a great deal of it and that is because of so many options.

    I recommend writing your data operations (read/edit/write/remove) in a class project, the following I wrote recently, it only has read operations but you will get the idea and be forewarned depending on your skill level may seem like a lot but it's a pattern to follow. Another example I have with is fairly generic.

    Lastly, many databases permit one query at a time, SQL-Server allows two to execute one after the other if needed and VB.NET can handle this.

    In closing, take your time, think through the design of the database and table(s) along with indexing which is a very broad topic if you are just starting out with SQL but in the end there are plenty of rewards. 

    EDIT: In some of my examples I use Entity Framework, for what you are doing EF is not needed.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites


    Friday, December 21, 2018 3:18 AM
    Moderator
  • Maybe, you should give it some thought.

    https://www.infoworld.com/article/2905918/microsoft-net/choosing-the-right-technology-for-building-your-service-layer-in-net.html

    Friday, December 21, 2018 1:39 PM