Application Specialist needs a point in the right direction...

brotj7

Senior member
Mar 3, 2005
206
0
71
We have a new system at work, and my group has a server that will be receiving inbound print jobs after an outside firm does some processing. When the jobs come in we typically only see the name blip in a folder as the job comes back in then it prints. Unless of course, the user selects wrong type of end device. We have no control over the source selection, so we will need to clear out any stuck jobs as part of our on call duties.

I would like to prototype a web front end that we can provide to our help desk/semi automate so we can limit the 3am calls to real issues. Our sister team has a test web server I can develope on.

Workflow:
If the job comes in and sits on the server for longer than 5 min, create a folder with today's date and take the long job and put it in the folder. At 7 am, email my team with any job failures taken care of by the auto process for followup. At the same time poll every 10 seconds and update a webpage the helpdesk can watch. If a call comes in from user the helpdesk should see the stuck job, and can select it for deletion from this webpage. Will need controls to do so, on the back end create a folder with today's date labeled helpdesk deletions we can moniter. My team should be the only ones who can permanantly delete a job.

I spoke with a coworker, since we are a MS house, I would need C# for the server back end, and I could use JavaScript for the webpage controls. Good idea? This will be given to our security and webteams for review before it ever touched real data. I just want a side project and thought this would be a great resume builder.
Typing from my phone. Please excuse typos...
 
Last edited:

KB

Diamond Member
Nov 8, 1999
5,398
386
126
You could actually write this using C# and ASP.net without having to write any javascript at all. ASP.net has server side controls to do all the input and output. Using javascript is a good learning experience and would make the site more user-friendly and responsive but isn't necessary for what you are doing.
 

brotj7

Senior member
Mar 3, 2005
206
0
71
Thank you, I will look at ASP.net too.

I will be working on this on my own time this weekend. In the meantime I do have a basic question.

There might be long periods without printing, so instead of the application polling the file every few seconds, what do I need to do to push the jobs text name to the web front end?

In school, we had used Java event listeners for state changes, windows open/close/resize, button events, keyboard commands, etc. So I imagine something similar could trigger there is a print job in the file which needs to be pushed to C# to handle the processing. But I don't know if it would be an event from windows, or something I need to register within my application that would trigger an event. Does this make sense? Yes, I am looking in MDSN but I don't really know where to look....
 

KB

Diamond Member
Nov 8, 1999
5,398
386
126
The easiest thing to do would be to poll every few seconds as you mentioned, either by having the website refresh itself periodically or have some javascript/ajax make a request for the latest jobs and display them. Since the helpdesk is likely to get a call when this problem occurs, I think it would be safe to ask the helpdesk to manually refresh the page to see the latest jobs instead of having the site refreshing itself constantly with no problems to report.

If you want to do push instead of pollng as you suggested, you definately just added to the complexity of the app. To do push notifications through a web app you will need to use HTML5 web sockets, something which each browser supports differently or not=at-all. You could instead implement a thick client app to listen on a port for notifications via WCF or raw sockets. To send the notifications to the client app, you would create a windows service that uses a class like the FileSystemWatcher to listen for directory change events within the windows operating system, When this event is fired it would then send a notification to client app.


http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx