|
vjs2445 wrote: This application will be used by multi-users in multiple locations
vjs2445 wrote: Can somebody with experience can guide me?
People usually work on a snapshot of the data, and databases usually don't notify the app that there has been a change in the dataset. Sql Server has the Notification Services, might help.
You could keep everything in memory, using the INotifyPropertyChanged interface, and broadcast all changes to each client. Sh*t happens when two people simultaneous edit my name.
How much users, in how many locations? I don't like the idea of updating a 5Mb blob and sending the new version over the network to a 1000+ users, it might cripple the network very fast, whilst most users aren't even working/viewing that particular blob.
Bastard Programmer from Hell
|
|
|
|
|
Well before this I need to know what are the different concepts and Technologies and different level I can use to fit in this kind of app model.
|
|
|
|
|
This is not a standard application model, due to aforementioned problems, and doesn't happen out-of-the-box.
It'd be wiser to create a webapplication and have it poll using Ajax to show the user the latest snapshot of the data he or she is using right now, as opposed to sending every change to every user, regardless whether they need it or not.
Bastard Programmer from Hell
|
|
|
|
|
Eddy Vluggen wrote: sending every change to every user
One such app I wrote was for monitoring the activity of a dispatching system I wrote and every user did need to see all the same data. So I had a Windows Service produce an XML file that each client downloaded periodically (every ten to thirty seconds or so, configurable). But there were only around 5000 entries per day.
|
|
|
|
|
Fetching data periodically is a bit different from pushing updates.
..and yes, it's possible to have a console-app that hosts a tcp server, and only send the required updates. That's usually not done for a complete database.
Bastard Programmer from Hell
|
|
|
|
|
Eddy Vluggen wrote: pushing updates
Well pushing is never a good idea. Polling is the only way, whatever the implementation.
Eddy Vluggen wrote: not done for a complete database
Oh, heck no, only the pertinent information.
|
|
|
|
|
PIEBALDconsult wrote: Well pushing is never a good idea. Polling is the only way, whatever the implementation.
Life isn't that black and white; we built a realtime visualization of a plant, and it worked nicely under that architecture. Then again, that too is very different from making a database update it's clients.
I'd guess that games like World of Warcraft work in a similar way
Bastard Programmer from Hell
|
|
|
|
|
Pushing is sometimes exactly what you want. Only in a web app is it not an option to consider, and that's because it's impossible. In general pushing uses less bandwidth because you only push when there is a change, whereas polling makes lots of 'has anything changed? no' requests.
|
|
|
|
|
I expect that push requires a bunch of "are you still there? yes" messages, so I don't see the difference. Pull also makes it easier for different clients to poll at different intervals. And also allows a button to "get updates now".
|
|
|
|
|
TCP handles keep-alive on a very low level and the bandwidth usage is negligible. (Actually as recently discussed in another thread, it doesn't necessarily send any messages at all.)
Why would you need to poll at different intervals if you're receiving the data you're interested in continuously? The volume of updates is the same either way, unless your infrequently updated client actually misses out on some updates, but it is more continuous and therefore less peak-intensive if it is pushed rather than pulled.
You don't need a button to 'get updates now' if you're always up to date. Having such a button is a sign that you should be doing real live updating, i.e. push, unless it's a web app where that's impossible.
|
|
|
|
|
vjs2445 wrote: display around 20 to 30K records in front end application
That's probably a bad idea. I know I would never want to see that much data at one time. What do the users want?
vjs2445 wrote: show Live Data
In the past I've used a timer (System.Timers.Timer) to poll for new data; I made the interval user-settable.
vjs2445 wrote: Multi-Threaded app
The Timer takes care of much of that.
We would need to know more about kind of data and application this is.
|
|
|
|
|
Following is the req:
Trade Portfolios needs to be reconcile and if good then the end users (Say about 20-30users) will use it.
If not good then the differences need to updated in the database and should reflect the modified data to all users(kind of live data) and again the same above process.
There will be addition of new data in the database and that also needs to be displayed as Live data.
Please provide the your expertise on the above requirements:
Right now my concern is to to give a proposal How we can achieve with What different technologies?
I am recommending the
back end data source is : sybase or sql server
Front end will be either Excel or CSharp multithreaded application.
Middle portion: Should I use WFC (Web Services) or some thing else not sure?
Please provide your feedback.
|
|
|
|
|
I would write an app that allows a user to get the next portfolio to reconcile, and shows only that one. Once the portfolio is marked as reconciled, the next portfolio can be retrieved.
Yes, use SQL Server.
Yes, use C# -- but it needn't be multi-threaded.
Yes, use WCF.
|
|
|
|
|
Well thats good cuzz we are narrowed down to choices.
What would you recommend from
Front End: with 20 to 30K records of data: web based front end or desktop based front end. Which one makes more sense?
Middle End: WCF: Do you know any good book or valuable resources from Beginning to Advance level on this WCF?
|
|
|
|
|
vjs2445 wrote: with 20 to 30K records of data
NO NO NO NO NO!!!
vjs2445 wrote: desktop based front end
That's what I do, but that's just me.
vjs2445 wrote: WCF: Do you know any good book or valuable resources
I have a copy if this[^], but you could probably get something newer. And there are articles here too (I haven't written mine yet).
|
|
|
|
|
|
I personally use web based (using Silverlight) now even though I'd prefer to develop desktop with WPF. This opens up the app to Mac users as well. Also there's no installation/deployment issues.
WCF with Silverlight and/or WPF will give you simplified communication development including duplex communication for "pushing" data to clients. Note WCF has nothing to do with data extraction. Everything you need to know with samples can be found in the docs: Windows Communication Foundation[^]
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
It depends (doesn't it always), in this case on user count, criticality of 'live' (i.e. does it have to be right now, or will 30s later? a minute later? etc do?) and volume of data which is changed.
You really, really don't want 20,000 records in the front end at once. That much data is not parsable by a human, and if you throw that at your users they will just press 'Reconcile' without reading it properly.
It sounds like you're backing onto a database already, so stick with that. I'd use a server-side business layer which handled requests and talked to the database, and also managed updates. Whether to do that as a simple web app with AJAX and polling for updates (with the server maintaining some kind of memory of when it last updated a client and what it's looking at) or a standalone server app hosting a TCP server which pushes updates (again, only sending data that is currently active in a client) depends on the questions above, and also whether web/desktop is specified in the requirements.
|
|
|
|
|
Not sure it it the right forum .. anyway forgive me
I was using VS2010 UML Class Diagram
Adding many "operations" to a class, apparently I'm not able to decide the visualization sorting. So if I have a sequence of operations (let's say:
+Operation1()
+Operation2()
+Operation3()
I'm not able to change order, like
+Operation3()
+Operation1()
+Operation2()
I did not find any help on msdn
Thanks for your time
|
|
|
|
|
1) This is not really the right forum.
This is the C# forum.
2) If you are adding methods in a class diagram, you really need not worry about the order (unless there is some specific reason you want to).
The order in which these methods is called is important in the sequence diagrams.
|
|
|
|
|
The reason is that I was doing a .doc with a UML pasted. The sequence of operations have a logic meaning in the .doc. Many software like StarUML allow you to sort +Operation(), I thought VS2010 was able too. No problem.
Thanks a lot
|
|
|
|
|
Greetings Gurus,
The problem:
"The variable name '@Tstamp' has already been declared. Variable names must be unique within a query batch or stored procedure."
Guesstimate cause:
The data in the variable '@Tstamp' is not being released
The code
SqlCommand inst = new SqlCommand("INSERT INTO dbo.DrvInfo(Tstamp)" +
"VALUES (@Tstamp)", DrvInfo);
DriveInfo[] drives = DriveInfo.GetDrives();
foreach (DriveInfo d in drives)
{
Console.WriteLine(d.Name);
Console.WriteLine(d.DriveType);
if (d.IsReady == true)
{
string label = d.VolumeLabel;
if (label.Length == 0)
label = "No Label";
Console.WriteLine(d.VolumeLabel);
Console.WriteLine(d.AvailableFreeSpace / 1024000000);
Console.WriteLine(d.TotalSize / 1024000000);
DrvInfo.Open();
inst.Parameters.Add("@Tstamp", SqlDbType.NVarChar, 50).Value = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss", System.Globalization.CultureInfo.InstalledUICulture);
inst.ExecuteNonQuery();
DrvInfo.Close();
}
else
Console.WriteLine("uh oh");
}
The question:
In iterating through the values of the foreach, how do I dispose of the first set of collected data so that the next set can be written to the table?
Can you help please? Do I need to declare each variable as "Nothing" before restarting the loop?
|
|
|
|
|
You can only ADD the parameter once. So add it before the foreach loop, not inside it (And without the .Value = part)... Then, inside the loop, do something like:
inst.Parameters["@Tstamp"].Value = DateTime.Now.ToString.....
|
|
|
|
|
Hi Ian,
I still trying to figure a lot of this stuff out so thank you, it's working now.
If I may ask, there are quite a lot of parameters to add so is there a more efficient way of writing
inst.Parameters.Add("@Tstamp", SqlDbType.NVarChar, 50);
inst.Parameters.Add("@SysID", SqlDbType.NVarChar, 5);
inst.Parameters.Add("@Drive", SqlDbType.NVarChar, 5); ?
Something along the lines of
inst.Parameters.Add(("@Tstamp", SqlDbType.NVarChar, 50)&("@SysID", SqlDbType.NVarChar, 5)& ("@Drive", SqlDbType.NVarChar, 5);
I know '&' is the wrong operator but I am using it to illustrate an idea.
Thanks again,
|
|
|
|