Erlang/OTP Forums

Author Message

<  Erlang questions mailing list  ~  connection pooling with sockets

Guest
Posted: Thu Apr 08, 2010 2:59 pm Reply with quote
Guest
Hi,

What is the correct way to build a TCP socket connection pool?
Each process will open a TCP socket.

1. N processes each handle a single request.
A gen_server will receive requests and if there is no connection free will queue it.

2. N processes each can send several requests over the socket at the same time.
Requests have a unique id so the process can reply to the client, if needed when it decode the response.
A gen_server will pass requests with round robin.

Is it better to use simple processes linked to the gen_server so they will be light weight and faster?
In case a process die the gen_server manually restart it.
Another option is to use a gen_server per connection process and a supervisor to restart it.

Thanks




Post received from mailinglist
cheung
Posted: Tue Feb 21, 2012 3:28 am Reply with quote
Guest
Gingrich made his remarks at a rally in the congressional district Nike Air Max 2012 he represented for 20 years, speaking to a few hundred supporters. Nike Air Max LTD 2 He planned several campaign stops across Air Max Georgia on Saturday Nike Air Max 1 with Herman Cain, a fellow Georgian and former contender for the GOP nomination who has since endorsed Gingrich.CNN Cheap Air Max was forced to cancel the debate, scheduled to take place in Atlanta on March 1, after Mitt Romney declined to participate. Nike Air Max 95 Rick Santorum quickly followed suit.The cancellation was a blow to Gingrich, who is banking on a strong showing on Super Tuesday, March 6, in Air Max 95 Cheap Georgia, Ohio and eight other states holding contests that day."The average Georgian is going to say, the average Nike Air Max 90 Ohioan is going to say, `Let me get this straight. They won't come here to debate Nike Air Max but they want my vote?"' Gingrich said, adding, "Anybody who's Nike Air Max Classic BW afraid of debating Newt Gingrich isn't going to be in very good shape to debate Barack Obama."Gingrich, whose sole win Asics Tiger came in South Carolina's Asics Mexico 66 primary Jan. 21, conceded winning Georgia was "crucial" Asics Kaufen to sustaining his presidential bid. His candidacy has struggled since Romney soundly beat him in Florida Jan. 31 and Santorum won contests in Colorado, Minnesota and Missouri on Feb. 7. “You have an opportunity to speak loudly,” Santorum said at an appearance in Mason, Ohio. Asics Onitsuka Tiger“Give a clear contrast between the two leaders who want to lead this country. Give Asics Turnschuhe America a clear choice.” Though Romney was born and raised in Michigan, his wealthy upbringing and work as a private-equity executive has made it hard for him to connect with working-class voters.The event was sponsored by the Günstige Onitsuka Tiger Sneakers Michigan Faith and Freedom Coalition, three Macomb County tea party groups and the county Republican Party. Asics Mexico 66 günstig The rally was punctuated by gospel singing and speeches Asics Tiger Mexico 66 by ministers.

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

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
You cannot attach files in this forum
You cannot download files in this forum