Help with "Concurrent Network Server" Design
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > Help with "Concurrent Network Server" Design




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Help with "Concurrent Network Server" Design  
animesh@neolinuxsolutions.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-25-05 12:47 PM

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






[ Post a follow-up to this message ]



    Re: Help with "Concurrent Network Server" Design  
Markus Elfring


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-25-05 10:50 PM

> 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.

Would you like to minimize your globals to improve your software architectur
e?
Are there any chances that they can be packaged into separate structures?


> 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.

Do you get useful ideas from the following information sources?
- http://en.wikipedia.org/wiki/CORBA
- http://en.wikipedia.org/wiki/Thread...uter_science%29
- http://en.wikipedia.org/wiki/SPlint
- http://www.swig.org/compare.html

Regards,
Markus







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 02:54 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register