queuing ideas

C

cj

I currently have a program that maintains a connection to a business
partner. Communication to our business partner is done via a web
service but it's not just wide open. We initiate a session with them by
sending an xml login string via this web service and we get back a
session id. Subsequent xml submissions to them are done with the same
service but the xml strings contain transactions (an element in this xlm
transmission is the id we received).

What I'm saying is anytime I talk to them I do so in code with
respstring = proxy.process(xmlstring)

The first time I talk to them xmlstring = an xml string with our login
info and we receive an xml string with a session id number.

Subsequent contacts to do business with them are also done in code by
saying respstring = proxy.process(xmlstring) but xmlstring = an xml
string with transaction info and our session id number. They will only
allow us to have 1 session open with them at a time.

Currently my program starts a session with them when it's loads then it
constantly queries a sql database via stored procedure and if it gets
data it sends the request via the web service to get a response which it
places into another table. So the sql tables become a queue for this
process allowing my clients to pound me with requests which I take first
come first serve and pass to our business partner.

I'd like to offer an additional way for my clients to pass requests to
me--hopefully to replace the sql tables. I would like to offer a web
service of my own for incoming requests but somehow I'd have to queue
them up as I can only have 1 connection to our business partner. How
would you handle this?
 
G

Guest

cj said:
I'd like to offer an additional way for my clients to pass requests to
me--hopefully to replace the sql tables. I would like to offer a web
service of my own for incoming requests but somehow I'd have to queue
them up as I can only have 1 connection to our business partner. How
would you handle this?

SQL Server Broker Services allow you to trigger event based queue. Or you
can look at MSMQ. Both will probably give you better performance in general
than polling a table?
 
T

Tom Shelton

SQL Server Broker Services allow you to trigger event based queue. Or you
can look at MSMQ. Both will probably give you better performance in general
than polling a table?

I haven't used broker services before, but I have used MSMQ before with
great success. I second that recommendation :)
 
S

Steven Cheng[MSFT]

Based on CJ's scenario description, I also agree that MSMQ based solution
sounds suitable here. Also, .net framework class library has provided
encasulated classes for MSMQ programming.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
 
C

cj

I'd never head of it. I've done some googling and understand it is
software provided by MS that my program can send info to and get info
from thereby queuing it. I haven't found a VB example yet. How would
this differ from setting up an array class that info could be put in and
removed from?

Based on CJ's scenario description, I also agree that MSMQ based solution
sounds suitable here. Also, .net framework class library has provided
encasulated classes for MSMQ programming.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
 
G

Guest

cj said:
I'd never head of it. I've done some googling and understand it is
software provided by MS that my program can send info to and get info
from thereby queuing it. I haven't found a VB example yet. How would
this differ from setting up an array class that info could be put in and
removed from?

If you write your own queuing mechanism you'll have to deal with
concurrency, memory issues, performance, etc.

MSMQ does all this and more - such as providing transactional messages,
network access, security, etc.

If you want a high performance solution, look into using MSMQ - it's a
great alternative to writing your own queuing mechanism.
 
S

Steven Cheng[MSFT]

Hi Cj,

As others mentioned, MSMQ is a well provided components which add more
features than just a simple message queue. For example, reliable messages
in MSMQ can let client send messages to queue while server application is
not available but get all those cached messages whenever it startup again.

Here are some introducing articles:

#MSMQ for .NET Developers (Part 1)
http://www.devx.com/dotnet/Article/27560

#Leveraging MSMQ in ASP.NET Applications
http://www.15seconds.com/issue/031202.htm

For detailed programming reference, you may check the documenet about
System.Messaging namespace.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
Date: Fri, 25 Jan 2008 15:27:30 -0500
From: cj <[email protected]>
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
MIME-Version: 1.0
Subject: Re: queuing ideas
I'd never head of it. I've done some googling and understand it is
software provided by MS that my program can send info to and get info
from thereby queuing it. I haven't found a VB example yet. How would
this differ from setting up an array class that info could be put in and
removed from?

Based on CJ's scenario description, I also agree that MSMQ based solution
sounds suitable here. Also, .net framework class library has provided
encasulated classes for MSMQ programming.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top