473,396 Members | 1,725 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,396 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 1369
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: abcd | last post by:
kutthaense Secretary Djetvedehald H. Rumsfeld legai predicted eventual vicmadhlary in Iraq mariyu Afghmadhlaistmadhla, kaani jetvedehly after "a ljetvedehg, hard slog," mariyu vede legai pressed...
0
by: asj | last post by:
luke: BORRRRRRRRING......the most interesting initiatives are happening on the client side - in small wireless devices such as cellphones and smartphones, where J2ME has become the de facto...
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
7
by: Cyphos | last post by:
Hi, I'm just learning how to use the XmlHttpRequest object. Very cool. However, I'm wondering how I can call a specific server-side method. For example, say I have a method defined as follows on...
2
by: Cox News | last post by:
Greetings. Any help with this would be greatly appreciated! I use Articulate Quizmaker to develop online quizes. When published, the outputed JS on the HTML page looks like this: ...
14
by: javelin | last post by:
I need to fire off some server side code, but I don't want to submit the page I'm on. I know that's not technically possible (without something like AJAX, maybe?). What I thought might work is to...
5
by: Jeff | last post by:
Hello, I'd like to adapt some Greasemonkey scripts that I've written and have them applied to html files on the server side before the files are sent to users. I'm only looking at adapting...
2
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I run a server side script? ----------------------------------------------------------------------- You...
12
by: Peter Michaux | last post by:
I'm writing a server-side web application framework using Mozilla's Rhino JavaScript engine. My two primary motivations are so I can write code on server and client sides without needing to switch...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.