Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Help with "Concurrent Network Server" Design

Reply
Thread Tools

Help with "Concurrent Network Server" Design

 
 
Animesh
Guest
Posts: n/a
 
      12-23-2005
Hi All,

I have a lexical analyzer in flex/bison associated with a lot of custom
C function calls linking to external programs which uses quite a lot of
global variables and data structures. The program is quite complex and
does a lot of Natural Language Processing. The program needs to
initialize a few databases from files every time it launches and needs
to load them in the memory.

I am currently thinking of a design where I could run the program as a
"Concurrent Network Server" and connect to it each time I want to
process some text input. There are the following problems:
1. Since I use global variables (which cannot be avoided) I need to
make sure that for each new connection, I need to initialize all these
global variables and data structures.
2. Due to the above reason I probably need a new process Image for
every new connection. I have tried using fork but sometimes the global
variables are not properly initialized. Another problem I believe is
that I would very soon finish the fork limit for the OS, since there
are hundreds of subsequent connections.

I need to know the perfect "Concurrent Network Server" design for the
above problem. I am currenlty using Debian GNU/Linux with Kernel 2.4.18
as my primary development machine (I know this is ancient, but there
are other programs which run only with GCC 2.95). I have also ported
the program and not the experimental Network code to FreeBSD
6.0-RELEASE.

I am not much of a OS and Network Programming Guy, but am quite
comfortable with C Porgramming and Data Structures. I would really
appreciate if anybody could help me out.

Thanks in Advance,
Animesh

 
Reply With Quote
 
 
 
 
Flash Gordon
Guest
Posts: n/a
 
      12-23-2005
Animesh wrote:

<snip>

> I need to know the perfect "Concurrent Network Server" design for the
> above problem.


1) The C programming language knows nothing about networks so this is
off topic here.
2) The C programming language has no support for concurrency, so this is
off topic here.
3) There is no such thing as a perfect design, so the answer is, "it
does not exist."

> I am currenlty using Debian GNU/Linux with Kernel 2.4.18


<snip>

Then I suggest you try asking on a Linux group, there are plenty of them
available. We only deal with standard C here, not the specifics of every
system and every extension library.
--
Flash Gordon
Living in interesting times.
Although my email address says spam, it is real and I read it.
 
Reply With Quote
 
 
 
 
Christopher Benson-Manica
Guest
Posts: n/a
 
      12-23-2005
Animesh <(E-Mail Removed)> wrote:

> I need to know the perfect "Concurrent Network Server" design for the
> above problem.


(You're looking more for comp.programming, where they may very well
recommend "Design Patterns" by the Gang of Four. GIYF.)

Your post is off-topic for comp.lang.c. Please visit

http://www.ungerhu.com/jxh/clc.welcome.txt
http://www.eskimo.com/~scs/C-faq/top.html
http://benpfaff.org/writings/clc/off-topic.html

for posting guidelines and frequently asked questions. Thank you.

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
 
Reply With Quote
 
Animesh
Guest
Posts: n/a
 
      12-24-2005

Flash Gordon wrote:
>
> Then I suggest you try asking on a Linux group, there are plenty of them
> available. We only deal with standard C here, not the specifics of every
> system and every extension library.
> --


Thanks Flash & Christopher,

I will head to comp.unix.programmer.

Regards,
Animesh

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with campus network design 1 main site, 7 remote over fiber GigE Ned Cisco 1 02-20-2005 03:18 PM
Campus Network Design Help myhrer@stjosephs-marshfield.org Cisco 3 02-09-2005 11:19 PM
Network design help Jon Lawrence Cisco 6 10-29-2004 06:24 AM
Network Design Help for Cisco newbie Link Cisco 4 08-12-2004 09:56 AM
Looking for help/resources on Writing a nice detailed design / tech design for vb.net code SpamProof Java 3 12-01-2003 06:06 AM



Advertisments