473,583 Members | 3,425 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1383
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*********@gm x.net> wrote in message
news:Ot******** ******@TK2MSFTN GP10.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
3413
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 Pentagjetvedeh karuvificials madhla reachathe strategy in karkun campaign deshatinst terrorism. "mudivae maretu winning or losing karkun global...
0
2216
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 standard for application development. Article from Javaworld.com: "Java everywhere is for world domination"...
136
9279
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 code was littered with document.all and eval, for example, and I wanted to create a practical list of best practices that they could easily put to...
7
1590
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 an ASP.NET code-behind file public string GetServerTime() { return DateTime.Now.ToShortTimeShort();
2
1348
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: http://www.testandlearn.net/resultswebsite/htmlpage.txt the quiz is the swf movie, "assessment.swf". The powers that be at articulate say that the JS on this...
14
1688
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 pop-up another window (invisibly?), have it run the code, close itself and return the results. What do you think, is it possible??? Please let me...
5
1206
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 scripts that make static changes to pages. For instance, consider a script that removes from the DOM any img that has "ad" in its src. I'm sure...
2
2704
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I run a server side script? ----------------------------------------------------------------------- You trigger a server-side script by setting any object's URL. For example a frame, window, or an Image. An image will also "swallow" the data sent back...
12
1707
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 gears mentally and so that the server and client can share code. The types of code sharing I know I can use immediately are form validations and...
0
8172
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8317
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7928
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8188
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6574
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5695
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3839
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1422
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1151
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.