472,096 Members | 2,285 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Help with server side best practices

Hi:

I am trying to develop a server application that listens for incoming
network request and processes these requests. Processing request involves
analyzing the packet, applying business rules, updating database and
generating a response packet.

What is the best way to go about this?

I've downloaded code from the net that creates an asynchronous socket server
but I have some concerns about what I'm doing. Threads are created for each
incoming socket and when data is received on a particular socket, the
delegate is called. the problem is that if a second socket/thread receives
data while the first socket/thread is in the delegate, the second thread
waits for the first thread to exit the delegate. It might be a while before
the first thread finishes.

Is it wise to make async calls from my delegate to the objects that will be
processing the request?

Forgive me if I sound confused.

Regards

Winston
Nov 16 '05 #1
2 1275
Winston Nimchan wrote:
Hi:

I am trying to develop a server application that listens for incoming
network request and processes these requests. Processing request
involves analyzing the packet, applying business rules, updating
database and generating a response packet.

What is the best way to go about this?

I've downloaded code from the net that creates an asynchronous socket
server but I have some concerns about what I'm doing. Threads are
created for each incoming socket and when data is received on a
particular socket, the delegate is called. the problem is that if a
second socket/thread receives data while the first socket/thread is
in the delegate, the second thread waits for the first thread to exit
the delegate. It might be a while before the first thread finishes.

Is it wise to make async calls from my delegate to the objects that
will be processing the request?

Forgive me if I sound confused.


Is it necessary to write your own application server? If this is a business
application, you could be using IIS and ASP.NET web apps or web services.

Cheers,

--
Joerg Jooss
jo*********@gmx.net
Nov 16 '05 #2
Thankx for your suggestion

Basically this is what I want to achieve...
A POS terminal captures data and formats according to ISO8583 protocol
Connects to my host via tcpip and sends the request
My host decodes the request, processes it and generates a response to the
terminal

What do you think is the best, quickest way to achieve this

Winston

"Joerg Jooss" <jo*********@gmx.net> wrote in message
news:Ot**************@TK2MSFTNGP10.phx.gbl...
Winston Nimchan wrote:
Hi:

I am trying to develop a server application that listens for incoming
network request and processes these requests. Processing request
involves analyzing the packet, applying business rules, updating
database and generating a response packet.

What is the best way to go about this?

I've downloaded code from the net that creates an asynchronous socket
server but I have some concerns about what I'm doing. Threads are
created for each incoming socket and when data is received on a
particular socket, the delegate is called. the problem is that if a
second socket/thread receives data while the first socket/thread is
in the delegate, the second thread waits for the first thread to exit
the delegate. It might be a while before the first thread finishes.

Is it wise to make async calls from my delegate to the objects that
will be processing the request?

Forgive me if I sound confused.
Is it necessary to write your own application server? If this is a

business application, you could be using IIS and ASP.NET web apps or web services.

Cheers,

--
Joerg Jooss
jo*********@gmx.net

Nov 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by abcd | last post: by
136 posts views Thread by Matt Kruse | last post: by
7 posts views Thread by Cyphos | last post: by
2 posts views Thread by Cox News | last post: by
5 posts views Thread by Jeff | last post: by
2 posts views Thread by FAQ server | last post: by
12 posts views Thread by Peter Michaux | last post: by
reply views Thread by leo001 | last post: by

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.