Architecture :: Handling Asynchronous Server To Server Interface?

Mar 11, 2010

So this interface allows one server to request data from another server. The catch is that all xml for the interface is transmitted entirely over http posts followed by an empty status code 200 response. No data is sent in a response. So if my application wants to requests data, we send an http post with the xml request and receive a blank 200. Then, shortly after our request, we'll receive an http post to a predetermined URL with the xml data which we then send a blank 200. This data will then be stored in a SQL database. This interface cannot be altered.

The reason this is problematic is because our server is handling requests from clients that need that data in the response. If a user requests for data that isn't available in our database, it needs to be requested from the interface and then returned in the response. I'm just not sure how to get this to work out. I've thought about polling the database, but I'm worried about thread pool issues. I've also looked into using ManualResetEvent.WaitOne to halt the processing of the client request and then calling Set when the interface sends the data (as a request). I've read that wait threads are shared, but just don't know if this will scale well. Does anyone have any insight or I'm pretty much stumped on this one...

View 4 Replies


Similar Messages:

Architecture :: Asynchronous Page Processing In 3 Tier Architecture?

Jul 30, 2010

I am working on 3 tier architecture: UI, BL, DAL. In my UI i have following code for Asynchronous page processing:

[Code]....

But I want a database fetch operation to be performed in this asyncronous method. And due to 3 tier arch. i am unable to do this in UI Layer. Can anyone guide me that how can I implement Asynchronous processing in 3 tier architecture? Note: If you are going to place EndAsyncWork1 in DAL then show that how can I return a value back to UI layer from this function.

[Code]....

View 1 Replies

Server Interface With A Hardware Device?

Dec 14, 2010

I've currently developing a web application in asp.net and a smsgateway moderm connected to my server (currently my laptop). is there a way for the asp.net to interface with the moderm that is connected to the server? so i'll be able to send/receive message in a web interface

View 1 Replies

Architecture :: Use A C# Class Or A Interface?

Feb 3, 2011

I have a block of SQL statements that I like to use as a sort of function.

I was thinking that I could make a class and inherit all of the master function, then add the parts that I need for other sections of the program in a sub class.

The problem is, up to this point I've been programming ASP .Net through visual studio, and it's kind of just programming behind controls. I'm not sure where to put the class/function/method/interface, or whatever we call it.

Of course you probably know that visual studio creates a bunch of partial classes when you do an ASP. Net application... so.. to get access to a function like object, across classes.. use an Interface?

View 7 Replies

Architecture :: Interface, Abstract Or Inheritance?

Oct 7, 2010

I have a table which houses two entities. StaticProgram and DynamicProgram. There is one column in that table called ProgramType which determines if a program is of Type static or Dynamic. Though these two entities are stored in one table (I am guessing because the primitive fields for Static and Dynamic programs are exactly the same) but from a business point of view these are two VERY different entities.

So, I created two Classes StaticProgram and DynamicProgram. However, I donot want to create two seperate Data Access Classes because it is going to be the exact same code replicated twice. I tried creating a "Program" class as base class and inherited StaticProgram and DynamicProgram classes but down casting is not supported so I can't return a "Program" object from the data access class and cast it to "StaticProgram" class.So, what are my options? Can I create an IProgram interface and have StaticProgram and DynamicProgram implement that interface and have my Data Access class return IProgram?

View 1 Replies

DataSource Controls :: Asynchronous Datapersistence Into SQL Server?

Mar 12, 2010

I got a requirement where i need to persist 1,000,000 records/min into database Asynchronously...i Binged some wat on this topic...and i got an idea like.. do the persistence in a method which will be called like "Fire and Forget"...In that method have a queue which will takes all the record....and persist the record one by one from the queue.. I dont know whether Im right or Wrong...

I want some more inputs and references to read more about the Asynchronous DB persistence or retrieval..

View 1 Replies

C# - Ajax Server Process With Live Interface Progress Status?

Oct 24, 2010

I have a process that retrieves html from a remote site and parses it. I pass several URL's into the method, so I would like to ajaxify the process and give a screen notification each time a URL completes parsing. For example, this is what I am trying to do:

List<string> urls = ...//load up with arbitary # of urls
foreach (var url in urls)
{
string html = GetContent(url);
//DO SOMETHING
//COMPLETED.. SEND NOTIFICATION TO SCREEN (HOW DO I DO THIS)
}
public static string GetContent(string url)
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "GET"
using (var stream = request.GetResponse().GetResponseStream())
{
using (var reader = new StreamReader(stream, Encoding.UTF8))
{
return reader.ReadToEnd();
}
}
}

In each iteration in the loop, I want to show the URL was completed and moving on to the next one. How can I accomplish this?

View 1 Replies

Architecture :: What's The Advantages / Disadvantages Of Explicit Interface Implementation

Jul 19, 2010

I am searching for the advantages and disadvantages of the explicit interface implementation

View 1 Replies

Architecture :: Creating Each Class Library Project For Interface?

Jan 11, 2010

weather to create each class libaray project for Interface, Service, Model, DTO, Repository ?

View 1 Replies

Using JQuery And JSON To Consume Server-Side Asynchronous Web Methods?

Jan 27, 2011

I defined two webservices calls in ASP.NET:

1.BeginLengthyProcedure and EndLengthyProcedure (Asynchronous web method)
2.LengthProcedureSync

namespace ServiceDemo
{
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
[System.Web.Script.Services.ScriptService]
public class AsyncWebService : System.Web.Services.WebService
{
public delegate string LengthyProcedureAsyncStub(int milliseconds);......

View 1 Replies

Architecture :: Extract Large Data From SQL To CSV Using Asynchronous Function

Oct 16, 2010

I have a table growth 100000row per day, I'm facing many problems to export data from this table using ASP.net page.

I don't know how to apply this scenario:

Senerio 1:

1- run Asynchronous function to export data from SQL for specified period to CSV file (without locking the table)

2- Refresh page every 5 sec in order to track the status of extracting data

3- compress the file

4- Stop refreshing and showing the download link in order to download the compressed file

or

Senerio 2:

1- run Asynchronous function to export data from SQL for specified period to CSV file (without locking the table)

3- compress the file

4- send the compressed file by Email

View 3 Replies

C# - Can Retrieve Data From Server To Client During An Asynchronous Post - Back Using Ajax Library

Apr 9, 2010

ASP.NET Ajax Library provides some client-side events. For instance:

Sys.Application.add_load(
function(args) {
// handle the end of any asynchronous post-back. Every-time there's
// a server round-trip, this method will be called.
}
);

During the asynchronous post-back I want to retrieve information to the client. This information must be available in some event like the discribed above.

Does the UpdatePanel or the ScriptManager have any server-side way to retrieve data back to client during an asynchronous post-back?

View 1 Replies

Exception Handling In Server.transfer

Feb 26, 2011

A first chance exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll An exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll but was not handled in user code

After banging my head because i could find where the exception came for and global.asax didn't get hit i found that it's from server.transfer and is a known bug. The alternative i read about is server.execute.However if i do this then the next page fires multiple javascript exceptions and a gridview i have is breaking of and the rows appear half at the left page corner and half inside the gridview!!

For now i just put a try catch on the server.transfer although the exception will not affect the application even if i don't use try catch. I also see that the exception is happening again even if i put try catch but with different dll: A first chance exception of type 'System.Threading.ThreadAbortException' occurred in App_Web_benglxq1.dll An exception of type 'System.Threading.ThreadAbortException' occurred in App_Web_benglxq1.dll but was not handled in user code Now what on earth is benglxq1.dll i don't know. What i know is that i'm leaving an exception to run and i don't like that. This is the js error when i use server.transfer btw: Microsoft JScript runtime error: Sys.ArgumentTypeException: Object of type 'Sys._Application' cannot be converted to type 'Sys._Application'.

View 8 Replies

Architecture :: Exception Handling In MVP?

May 28, 2010

I'm wondering what's the preferred way to manage exceptions in an MVP implemented with a Passive View.

There's a discussion in my company about putting try/catch blocks in the presenter or only in the view.

In my opinion the logical top level caller is the presenter (even if the actual one is the view).

Moreover I can test the presenter and not the view. This is the reason why I prefer to define a method in the view interface:

[Code]....

View 2 Replies

AJAX :: Handling PageRequestManagerTimeoutException At Server Side?

Mar 17, 2011

I want to handle asynchronous post back timeout error (Sys.WebForms.PageRequestManagerTimeoutException) on server side.

I use AsyncPostBackError event of ScriptManager class for other errors (exceptions) during asynchronous post back and it works fine. There is a response redirect to generic error page in this event handler.

Unfortunately for PageRequestManagerTimeoutException this event is not fired.

So how can I handle this error on server side?

scriptMgr.AsyncPostBackTimeout = 180;scriptMgr.AsyncPostBackError += new EventHandler<AsyncPostBackErrorEventArgs>(scriptMgr_AsyncPostBackError);...private void scriptMgr_AsyncPostBackError(object sender, AsyncPostBackErrorEventArgs e){Response.Redirect("~/System/GenericError.aspx");}

View 1 Replies

Handling HTML Server Control Events / How To Wire Up HTML Server Controls Events

Oct 16, 2010

How to wire up HTML server controls events?

I added a Input (Text) control in my web form and turned it into an HTML server control so its an instance of HtmlInputText class.

If I double click on the control It only adds a OnClick event handler method inside the script tags in the HTML doc of the web form but how to I get to handle its Serverchange event exactly? does VS.net 2008 has no ability to auto wire up the event to the control, do I have to manually wire up the event handler?

View 3 Replies

Architecture :: Best Practice For Handling Exception?

Jun 3, 2010

I devide my website on 3 layers :

DAL(Data Access) - simple extract data from DB using LINQ
BLL(Business Logic) -

cache data and in try/catch block call function from DAL and throw it to UI :
try
{
}
catch (Exception ex)
{
//Log error
throw ex
}

UI (User Interface) - simple working without handling any exception,

So if error occured in BLL i will be redirected to Error.aspx page with message that something wrong.

how and where handle exceptions, or may be exists common patter where handle and how to inform user about errors ? Can anybody share bes practice.

View 1 Replies

Architecture :: Handling Data From Two Tables?

Jul 17, 2010

I will try to explain my doubt and keep the code out, maybe for a second post. The greatest problem i am facing here is the logic :P.

At this point i have two tables: Empregado (Worker) and Cargo (Post). One post have many workers and one worker has only one post. In the database i think i am fine, a simple relationship one - many.

I've mapped the tables into classes with the same fields. As well i've created collections using generic lists. Each collection has a method that acess the bank and recover the data.

My worker class agregates one instance of post. I mainly use this to show the data i need. Basicaly i do a select, join the tables and fill the properties of the worker and the post.

The doubt: Is this a good pattern? Up to this moment i am not worried with blinding light performance, but in how to act in an good OOP pattern.

View 2 Replies

Web Forms :: Event Handling With HTML And Server Control

Apr 3, 2010

one is anchor tag and other asp linkbutton tag

we want to call user defined function on onclick of anchor tag and as well as linkbutton

is it possible?

View 5 Replies

Web Forms :: Event Handling For Custom Server Control?

Jun 24, 2010

I am creating a webform in which I am having two radio buttons (Yes/No), one textbox, and two lables.

I want to enable and disable the textbox on radio button click Yes and No respectively.

I want to use custom server control for this whole process as we have to use this DLL in other application also.

Being as beginner I got just confused about event handling methods for server controls.

View 3 Replies

MVC :: Handling Large Number Of Images Downloaded From Server?

Feb 17, 2011

Handling large number of images downloaded from server

View 4 Replies

Tradeoffs With Client Vs Server Side Postback Handling

Aug 26, 2010

I have a ListView that contains a large collection of rows with textboxes that users can optionally fill out. These textboxes are not databound. When the user clicks "next" i need to iterate over the rows and determine which fields the user has filled out, and then update a sort of "cart" with the data and move to a confirmation page ("you have selected a, g, v, zz, is this correct?" sort of thing).

I can think of two ways to deal with this. The first is, server side, to walk the items in the listview, get the control ID's, save this data to a list, then save it to a database cart table for the next screen to read.I can use jquery to collect all the values client side, then pass it back to the form in a hidden field and use something like Newton.Json to get the data into a similar list.What are the tradoffs of these two approaches?

View 1 Replies

SQL Server :: Handling Return Values Of Stored Procedure

Feb 16, 2011

While using an insert query for a certain table, can I used a select statement to know whether there's an already existing value in the stored procedure using a return value where insert occurs? Or do I need to separate a procedure?

View 9 Replies

AJAX :: ModalPopupExtender Server Side Event Handling?

Feb 10, 2010

I'm using a ModalPopupExtender in my website, to show "accept/cancel" messages, and catch the user selection at the server side. I put two buttons (ok/cancel) at the panel that will be shown as a modal popup, add them a server side event handler, but it does not fire.

[Code]....

View 1 Replies

SWFUpload Multiple Files Server-side Handling?

Mar 18, 2010

I need the user to be able to upload multiple files to my server, thus I am using the SWFUpload utility. SWFUpload sends the files one by one, and I need to store them all in the same temporary directory. My ASP.NET handler recieves the files one by one and I can store the file appropriately.

My problem is: How do I know which files belong to the same upload? Rephrased, how do I connect the files in my handler?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved