473,651 Members | 2,716 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Architecture decision - should components communicate via the DB?

I have decided on a basic architechture to quickly refactor two
processing functions of my winforms application until we get the
chance to rewrite it. Basically it will consist of 2 applications:-

1. A service running on the server to take jobs from a queue table in
a SQL database, perform the job (could be 1 minute or up to an hour or
more) and write the results back to the database.

2. A .NET web application to submit the job requests into the queue
table. (Initially a combo box with a button marked "Process".)

One thing we hope to achieve with this is I would like to keep the
door open to have multiple servers all processing simultaneously
should that become necessary (as we hope it will!). Another thing is
decoupling of the components - eg the server crashes and it (or other
servers) will continue to process jobs on restart as they are queued
safely in the database, while clients can continue to submit jobs and
perform other work.

My question is, should I worry about giving feedback to the client
application and if so how? Two alternatives with minimal overheads
might be
1. Email the client to say "Your job has completed".
2. Write progress info to the database for the web app to pickup and
display back to the client

Given the jobs could run a long time and the user may just wish to
close the browser and move on, is it worth writing code (and
processing overhead) to inform him of progress with one of the one
minute type jobs?

Your thoughts on this question or the architecture decisions in
general would be much appreciated.

cheers,
Paul.


Mar 6 '08 #1
3 1327

"Paul" <li****@gmail.c omwrote in message
news:dd******** *************** ***********@e6g 2000prf.googleg roups.com...
>
Given the jobs could run a long time and the user may just wish to
close the browser and move on, is it worth writing code (and
processing overhead) to inform him of progress with one of the one
minute type jobs?
No. I have seen people attempt this, but it ends up with a lot of code that
is largely useless. Once you have it started, you will be working against
sunk costs and attempting to find a way to add the notification to the
user's browser.

Now, if you have a set list of users, a small app that runs in the task tray
and pops up "your job is done" is not a bad idea. I have worked on a team
that succesfully did that. But, an email message is probably fine until you
figure out what the app is going to be when it grows up.

I would not invest time in trying to contact a web client. It is a major
pain that is not worth the effort. Just my two cents.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************** *************** *************** ****
| Think outside the box!
|
*************** *************** *************** ****
Mar 7 '08 #2
Hi Gregory,

Thank you for your reply, it is much appreciated.

In this same scenario, is there a preferred method to "push"
information from the server to the (local) service application or your
suggested tray application on the client?

eg the service running on the server could continuously poll the queue
table in the database but that would generate load on the server when
there is no job in the queue, and there would probably be an
unnecessary delay when there is a job waiting there.

Is this when you use Notification Services?

cheers,
Paul.
Mar 10 '08 #3
This is an old and abandoned application block.
http://msdn2.microsoft.com/en-us/library/ms998466.aspx

but you might want to take a look for ideas.

...............

Several years back, I worked for a company that modified this block.
They had about 4 status.
Submitted
Working
Failed
Completed.

The results were always in a generated html file.

Once you submitted a request (for a long running report)...you were sent to
a screen that showed all your requests.
The one you just added....showed up and usually it was "Working" (maybe
Submitted if the Queue was backlogged)

So once it was "Completed" , you would get a link....to a "double guid" html
file.
example
http://www.mysite.com/reports/D2CE8C...F9C828B30.html
its hard to see, but there are 2 guids..one is a directory, one is a
filename.

We had a clean up script that would delete files (and db entries) for
reports older than 2 weeks.

And we also optionally email you when the report was finished. We put your
email address in a cookie...but it was optional.

It worked pretty good.
It I were doing it today....I might keep the idea of the application block.
But I'd use WCF (IsOneWay) messages.

And I'd write a common interface...and would definately wire up events

public interface ILongRunning
event JobSubmittedHan dler JobSubmittedEve nt; // wire up the delegate as
well
event JobInProgressHa ndler JobInProgressEv ent; // wire up the delegate
as well
event JobFailedHandle r JobFailedEvent; // wire up the delegate as well
event JobCompletedHan dler JobCompletedEve nt; // wire up the delegate as
well

(or something like that)

then you can keep the implementation seperate from the handling of
events,.which would write to a db log and/or email people.

I'm talking free-lance here, so take anything I say with a grain of salt.

...


"Paul" <li****@gmail.c omwrote in message
news:dd******** *************** ***********@e6g 2000prf.googleg roups.com...
>I have decided on a basic architechture to quickly refactor two
processing functions of my winforms application until we get the
chance to rewrite it. Basically it will consist of 2 applications:-

1. A service running on the server to take jobs from a queue table in
a SQL database, perform the job (could be 1 minute or up to an hour or
more) and write the results back to the database.

2. A .NET web application to submit the job requests into the queue
table. (Initially a combo box with a button marked "Process".)

One thing we hope to achieve with this is I would like to keep the
door open to have multiple servers all processing simultaneously
should that become necessary (as we hope it will!). Another thing is
decoupling of the components - eg the server crashes and it (or other
servers) will continue to process jobs on restart as they are queued
safely in the database, while clients can continue to submit jobs and
perform other work.

My question is, should I worry about giving feedback to the client
application and if so how? Two alternatives with minimal overheads
might be
1. Email the client to say "Your job has completed".
2. Write progress info to the database for the web app to pickup and
display back to the client

Given the jobs could run a long time and the user may just wish to
close the browser and move on, is it worth writing code (and
processing overhead) to inform him of progress with one of the one
minute type jobs?

Your thoughts on this question or the architecture decisions in
general would be much appreciated.

cheers,
Paul.


Mar 11 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1890
by: Abdullah Kauchali | last post by:
Hi folks, (Need comments if you have done something like this before. Any response would be greatly appreciated.) We've recently been prototyping the idea of completely avoiding the server building the eventual/final HTML for the browsers. So far we've got this: 1. Create separate ASP pages that talk to the COM business components (say: businessproc.asp);
3
2604
by: Michael Crawford | last post by:
Hi, Where would one start for this type of application: I want to create an vb.net container application that has the gives the end user the ability to install and uninstall plugins or add-in modules. As the user installs the various components, additional functionality to the application is integrated. How would I structure or orchestrate a project plan that makes use of add-in
25
5598
by: David Noble | last post by:
We've been developing a web site using 3-tier architecture for 18 months now. There is a common layer that defines the classes - using XML schemas. The data layer acts as a wrapper to 3 databases - SQL Server, Oracle and AS400. The business layer exposes web services which communicate with the front end, ASP.Net. All 3 tiers are on different boxes. This works well. Now I am leading a team to build a winforms app. I need some advice as
1
1262
by: Ambarish Ganguly | last post by:
Hi, We are planning for a 3 tier architecture with Web server App server containing all business dlls Database server. The web server will communicate using COM interop ( CreateObject sort of things) with app server where the .NET components will be in COM+. Have any of you tried this sort of architecture? Any tips, tricks, suggesstions, advantages, disadvantages, loop holes anything which provides insight would be highly helpful.
0
1354
by: Vin | last post by:
Hi, I've got a VB.Net + ASP.Net message board application which has already been customized. There are two solutions in this application. 1. The front end aspx, aspx.vb files, User controls solution 2. A components solution which has .vb files which have the code to call inserts, updates, deletes to the database (SQL server 2000) Its much like the available general ASP.Net message board. Only a bit customized. Right now a simple...
2
1568
by: Andrew | last post by:
I am starting my first C# project and have a design issue which I would appreciate some advice about. I am wondering whether to use dataset to pass information between components or if I should implement components and collections. I wondered what the advantages and disadvantages of both approaches were in .NET. I am at the start of the project and would like to make the right decision. My last project was VB and MTS and we used recordsets as a...
5
1685
by: Michael Conroy | last post by:
I like the MS Money and InstallShield interfaces (at least, I like the hypertext, Web based appearance.) I would like to provide such a front end to my Windows Form application. However, I'm leary of the IE Web Browser control. I don't even know if this is a prudent design decision owing to the extra overhead of having to parse HTML and ASPX pages. Can anybody provide guidance about hosting and interacting with Web-style content in a...
6
2940
by: Gary James | last post by:
This may not be a direct C# question, but since I'll be using using C# for development, I thought I'd pose the question here. I'll soon be involved in the design of a new software product that will employ a software "Plug-In" architecture. Taking the plug-in route will give us a design that can adapt to, as yet, undefined future requirements (within the scope of the plug-in interface spec of course). In the past I've done this with...
1
1126
by: Jenbo | last post by:
This is a very general question I am asking as I am at the start of a design and analysis phase of a project and I am still thinking of exactly what way to architect the system I am constructing. Basically I will have an engine system centralised on client's server, this will be SQL with a management web app on front of it. This needs to communicate with the client's pcs, however many number of them there are. Based on this communication...
0
8275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8802
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8465
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7297
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6158
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4144
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4283
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2699
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1587
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.