473,324 Members | 2,193 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Using an object pool within a web service

I'm looking for some advice on how to proceed.

Here's the scenario:

I've got to develop a high availability VB.Net web service that basically
acts as a middle man between the web service clients and a third party data
provider. The third party data provider is accessed over a well defined TCP
interface. The third party data server can accept about 25 concurrent TCP
connections from the same client.

The web service will accept client requests, translate the requests into a
format suitable for the third party service, forward the request to the third
party service, wait for the replies from the third party service, translate
the replies into a format suitable for the web service client and return the
response to the web service client. This web service will need to handle
many simultaneous client requests.

Establishing a connection to the third party data service is a rather
lenghty process and I'm thinking the web service needs to maintain a number
of TCP connections in some kind of object pool. Also, the connections made
to the third party service need to be asynchronous, able to handle
unsolicited messages from the data server, maintain a heart beat requests,
identify broken or out of sync connections, and destroy itself and create a
new connection if a problem is identified.

A prototype version of the web service uses a public variable defined in a
VB module to hold the array of objects that maintain the connections to the
third party web service. After reviewing how ASP.Net manages the application
domain and its associated threading behavior, I'm concerned that it's
possible that ASP.Net may create multiple instances of the application and in
turn attempt to create even more new connections to the third party data
server exceeding the maximum allowable connections and causing all sorts of
problems.

If I create my own object pool using a singleton model, I have similar
concerns regarding ASP.Net's threading behavior.

If I use component services for object pooling, I'm concerned that I can't
properly manage object creation and destruction if there are problems
identified with the underlying TCP connection.

I'd really like some advice here on how to manage a pool of connections to
the third party data provider and how to manage the use of these objects
through a web service. Thanks
Nov 23 '05 #1
1 3649
Here is an idea for you which is a little out in "left field".

Our client had a third party VB DLL which produced a customized "widget".
They wanted to call this DLL from a web page to produce these widgets on
demand for subsequent download. They are in license compliance but here is
the kicker. The DLL required that it be part of a Windows form project. If
there was no form, nasty error messages were emitted from the DLL.

To get around this little dilemma, we created a Windows service project that
had a form which talked to the DLL. The DLL was happy. This project also
acted as a multi-threaded socket server listening for inbound requests from
other processes on the same machine.

From the ASP.NET page, we connected to the socket server, sent a request to
create a widget and waited for the response. Once the response came back, we
disconnected from the socket server and returned the widget to the outside
caller.

In your case, your Windows service could talk to your third part data
provider. Your ASP.Net page connects to your socket server. This way, you
can keep the ASP.NET threading behavior separate from your service.

Nov 23 '05 #2

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

Similar topics

11
by: Bob | last post by:
In our new .NET web applications, we try to limit the use of SqlConnection to just one instance per page, even if there are multiple accesses to various queries. The thinking behind is that this...
3
by: =?Utf-8?B?RGFuZGFuIFpoYW5n?= | last post by:
Now I have a web application, a web service and a SQL Server database. The Web application will invoke the web service, the web service invokes the SQL Server stored procedure. I let the web...
0
by: jordo | last post by:
I have an asp.Net app that connects to the WSS 2.0 list web service. I'm having issues with IIS and .Net configurations and hope that someone can help me. My ideal configuration is: asp.net:...
2
by: =?Utf-8?B?Umljaw==?= | last post by:
I am trying to set up a WCF service using VS2005 on Vista using IIS 7.0. I created a website, selecting a WCF Service template and http://localhost/ServiceName. Even the most simple project when...
5
markrawlingson
by: markrawlingson | last post by:
Hey guys, Having a bit of a complicated issue here so please bare with me while I explain. I'm also not a system admin and don't know a whole lot about IIS, so i apologize in advance. I...
7
by: Marc Gravell | last post by:
The weird thing Evidenced by? You didn't say why you think this... And over what time interval are you seeing tihs? Are you sure you aren't getting different ProcessAgent instances from a...
4
by: Oriane | last post by:
Hi there, I need to use an ActiveX inside a Web service. My problem is that I need an handle on this Com component, so I add a reference to my .Net project, and I create an instance of class of...
0
by: jb489 | last post by:
Hi all, Hope I am posting this in the right forum. I seem to be having a problem when using serialization and web services. <b>Scenario:</b> I have built a web service which includes a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.