BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

design question

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Internet Socket)
View previous topic :: View next topic  
Author Message
Jonathan Benedicto
Guest





PostPosted: Thu Apr 14, 2005 8:35 pm    Post subject: design question Reply with quote



I'm trying to build a server application, that uses my own custom
protocol. Many clients +100 possibly will have connect to this server,
and stay connected for hours at a time.

Due to the fact that the server will run on a Celeron processor
server, what design do you think I should take ? I had thought that I
should use a non-blocking single TServerSocket because +100 threads
seemed too much for a Celeron. But what design would you suggest ?

--

Jonathan



Back to top
JJ
Guest





PostPosted: Fri Apr 15, 2005 10:19 pm    Post subject: Re: design question Reply with quote



If you are writing under Windows 2000+ OS you might want to read further on
"Overlapped IO using Completion Port IO (CPIO) and thread pooling". With
CPIO I've been able to handle over 100,000 connections simultaneously with
no problem.

Good luck
Jeff www.ruamkwamkid.com



"Jonathan Benedicto" <incorrect (AT) no (DOT) server> wrote

Quote:
I'm trying to build a server application, that uses my own custom
protocol. Many clients +100 possibly will have connect to this server, and
stay connected for hours at a time.

Due to the fact that the server will run on a Celeron processor server,
what design do you think I should take ? I had thought that I should use a
non-blocking single TServerSocket because +100 threads seemed too much for
a Celeron. But what design would you suggest ?

--

Jonathan






Back to top
Jonathan Benedicto
Guest





PostPosted: Fri Apr 15, 2005 10:26 pm    Post subject: Re: design question Reply with quote



"JJ" <mangpoh_007 (AT) hotmail (DOT) com> wrote

Quote:
If you are writing under Windows 2000+ OS you might want to read
further on "Overlapped IO using Completion Port IO (CPIO) and thread
pooling". With CPIO I've been able to handle over 100,000
connections simultaneously with no problem.

Thank you for this info. The server will be running Windows Server
2003. Where can I read up about CPIO ? MSDN ?

Jonathan



Back to top
JJ
Guest





PostPosted: Fri Apr 15, 2005 11:05 pm    Post subject: Re: design question Reply with quote

MSDN and Google using "Overlapped IO using Completion Port IO"

Good reading!


"Jonathan Benedicto" <incorrect (AT) no (DOT) server> wrote

Quote:
"JJ" <mangpoh_007 (AT) hotmail (DOT) com> wrote in message
news:42603dee (AT) newsgroups (DOT) borland.com...
If you are writing under Windows 2000+ OS you might want to read further
on "Overlapped IO using Completion Port IO (CPIO) and thread pooling".
With CPIO I've been able to handle over 100,000 connections
simultaneously with no problem.

Thank you for this info. The server will be running Windows Server 2003.
Where can I read up about CPIO ? MSDN ?

Jonathan




Back to top
Jonathan Benedicto
Guest





PostPosted: Fri Apr 15, 2005 11:32 pm    Post subject: Re: design question Reply with quote

"JJ" <mangpoh_007 (AT) hotmail (DOT) com> wrote

Quote:
MSDN and Google using "Overlapped IO using Completion Port IO"

Thank you for this info. It seems fairly complex.

Could you give me some help on how to do this ?

Jonathan



Back to top
Matt Jacobs
Guest





PostPosted: Sat Apr 16, 2005 4:31 am    Post subject: Re: design question Reply with quote

"Jonathan Benedicto" <incorrect (AT) no (DOT) server> wrote:

Quote:
I'm trying to build a server application, that uses my own custom
protocol. Many clients +100 possibly will have connect to this server,
and stay connected for hours at a time.

Due to the fact that the server will run on a Celeron processor
server, what design do you think I should take ? I had thought that I
should use a non-blocking single TServerSocket because +100 threads
seemed too much for a Celeron. But what design would you suggest ?

That's not an excessive number of connections. In that situation, I
would probably use Indy. If you find you are having performance
issues, you might want to look at IOCP. But even before that, I would
try to use XML over HTTP via ISAPI/IIS. Why write your own server if
you don't have to?

Back to top
Jonathan Benedicto
Guest





PostPosted: Sat Apr 16, 2005 4:44 am    Post subject: Re: design question Reply with quote

"Matt Jacobs" <noyb (AT) noyb (DOT) com> wrote

Quote:
That's not an excessive number of connections. In that situation, I
would probably use Indy. If you find you are having performance
issues, you might want to look at IOCP. But even before that, I
would
try to use XML over HTTP via ISAPI/IIS. Why write your own server if
you don't have to?

I guess I could use ISAPI via HTTP, it is just that building my own
server is much easier. I also don't have BCB Enterprise, so making
ISAPI won't be too easy.

But I'll definitely think it over. Thank you for the suggestion.

Because of the nature of my system, the number of connections at any
one time might be from 10 - 1000+, so that it why I wanted to avoid
Indy.

Jonathan



Back to top
Matt Jacobs
Guest





PostPosted: Sat Apr 16, 2005 5:17 pm    Post subject: Re: design question Reply with quote

"Jonathan Benedicto" <incorrect (AT) no (DOT) server> wrote:

Quote:
Because of the nature of my system, the number of connections at any
one time might be from 10 - 1000+, so that it why I wanted to avoid
Indy.

If that's the situation, then you really want to use IOCP, which IIS
gives you for free.

Back to top
Jonathan Benedicto
Guest





PostPosted: Sat Apr 16, 2005 5:31 pm    Post subject: Re: design question Reply with quote

"Matt Jacobs" <noyb (AT) noyb (DOT) com> wrote

Quote:
If that's the situation, then you really want to use IOCP, which IIS
gives you for free.

Thank you, I'll definitely look into it.

Jonathan



Back to top
Jonathan Benedicto
Guest





PostPosted: Sat Apr 16, 2005 6:30 pm    Post subject: Re: design question Reply with quote

"Matt Jacobs" <noyb (AT) noyb (DOT) com> wrote

Quote:
If that's the situation, then you really want to use IOCP, which IIS
gives you for free.

How would you suggest I go about using IIS ? ASP.NET ?



Back to top
Chad Z. Hower aka Kudzu
Guest





PostPosted: Sat Apr 16, 2005 7:03 pm    Post subject: Re: design question Reply with quote

Matt Jacobs <noyb (AT) noyb (DOT) com> wrote in news:g2i261hgqgclognd1hq6jh46hss7aricfu@
4ax.com:
Quote:
If that's the situation, then you really want to use IOCP, which IIS
gives you for free.

Not quite! IIS uses IOCP to serve files, but to serve dynamic content it
switches off to worker threads with a default of max 10 per app. Unless you
impelement a special IOCP like API in your handlers, you've "lost" the IOCP.




--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Want to keep up to date with Indy?

Join Indy News - it free!

http://www.atozed.com/indy/news/

Back to top
Jonathan Benedicto
Guest





PostPosted: Sat Apr 16, 2005 7:07 pm    Post subject: Re: design question Reply with quote

"Chad Z. Hower aka Kudzu" <cpub (AT) hower (DOT) org> wrote

Quote:
Not quite! IIS uses IOCP to serve files, but to serve dynamic
content it
switches off to worker threads with a default of max 10 per app.
Unless you
impelement a special IOCP like API in your handlers, you've "lost"
the IOCP.

Thank you for this info. Do you think that I should just build my own
IOCP server ?

Jonathan



Back to top
Chad Z. Hower aka Kudzu
Guest





PostPosted: Sun Apr 17, 2005 9:39 am    Post subject: Re: design question Reply with quote

"Jonathan Benedicto" <incorrect (AT) no (DOT) server> wrote in news:42616287$1
@newsgroups.borland.com:
Quote:
Thank you for this info. Do you think that I should just build my own
IOCP server ?

I didnt see the original post so I dont know what you are trying to do. :)


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Got Indy? Got the book?

http://www.atozed.com/indy/book/

Back to top
Jonathan Benedicto
Guest





PostPosted: Mon Apr 18, 2005 1:13 pm    Post subject: Re: design question Reply with quote

"Chad Z. Hower aka Kudzu" <cpub (AT) hower (DOT) org> wrote

Quote:
I didnt see the original post so I dont know what you are trying to
do. Smile

I am trying to build a server that must handle 100 - 1000+ connections
that are connected for hours at a time. The clients do not do much
communication, just a few requests now and then.

And, the server is probably going to be a Celeron.

Jonathan



Back to top
Chad Z. Hower aka Kudzu
Guest





PostPosted: Wed Apr 20, 2005 6:00 pm    Post subject: Re: design question Reply with quote

"Jonathan Benedicto" <incorrect (AT) no (DOT) server> wrote in news:4263b281
@newsgroups.borland.com:
Quote:
I am trying to build a server that must handle 100 - 1000+ connections
that are connected for hours at a time. The clients do not do much
communication, just a few requests now and then.

You can do that even with Indy now, but you'd need to forego the threads and
use a custom scheduler. For such a item you dont even need fibers.

UDP would be a good candidate too if its possible.



--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Is Indy useful to you? Send a postcard please!
http://www.hower.org/kudzu/indypost.html

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Internet Socket) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.