AsyncSocket - 3.12Cocoa socket class |
|
||||||||||||||
|
|||||||||||||||
Feedback Summary:
| Version 3.12: | |||||
| Overall Rating: | Features: | Support: | |||
| Ease of Use: | Quality / Stability: | Price: | |||
Key to Types of Feedback:
Reviews
Troubleshooting
Usage Tips
Developer Notes
Commentary
Featured Reviews
Performance issues addressed? - Version: 4.0, 5/16/2005 09:41AM PST
Dustin_Voss_785
I am the author of AsyncSocket. I've addressed some of tyraynor's performance issues in version 4.0. It should be a more capable server now.
Excellent design, but there are performance issues 



- Version: 3.12, 11/19/2004 11:09AM PST
(4 of 4 users found this comment useful)
tyrayner
I must amend my previous review now that I have made extensive use of AsyncSocket. I still recommend this class to anyone who is implementing sockets on a small scale, but if you're going to be dealing with large amounts of data and many simultaneous connections this class will not be adequate. There are major performance problems.
Over the past few months I have been writing an OS X HTTP proxy server. Initially I planned on writing the socket functionality with SmallSockets, my old favorite, but the synchronous nature of SmallSockets was going to be a problem. So I wrote my connection classes using AsyncSocket, and I was thrilled with the simplicity and the incredibly clean and intuitive design of this class. When I started stress-testing my proxy server, however, it would sustain 40-50% CPU utilization when downloading large files over my cable connection. I ended up re-writing the program using SmallSockets and implementing threads manually to make it asynchronous. Now the CPU utilization never spikes above 2-3%. I wrestled with AsyncSocket for a long time trying to see if I could get the CPU utilization down, but I think it's a factor of the single-threaded, notifications-based architecture of this class.
In conclusion, this does have the nicest interface of all the OS X socket classes. OmniNetworking is big and confusing. I haven't tried NetSocket so I don't know about that one. SmallSockets is the leanest and meanest, but you have to get a bit more low-level with it. If you're implementing sockets on a small scale, this is probably still your best and easiest choice.
Over the past few months I have been writing an OS X HTTP proxy server. Initially I planned on writing the socket functionality with SmallSockets, my old favorite, but the synchronous nature of SmallSockets was going to be a problem. So I wrote my connection classes using AsyncSocket, and I was thrilled with the simplicity and the incredibly clean and intuitive design of this class. When I started stress-testing my proxy server, however, it would sustain 40-50% CPU utilization when downloading large files over my cable connection. I ended up re-writing the program using SmallSockets and implementing threads manually to make it asynchronous. Now the CPU utilization never spikes above 2-3%. I wrestled with AsyncSocket for a long time trying to see if I could get the CPU utilization down, but I think it's a factor of the single-threaded, notifications-based architecture of this class.
In conclusion, this does have the nicest interface of all the OS X socket classes. OmniNetworking is big and confusing. I haven't tried NetSocket so I don't know about that one. SmallSockets is the leanest and meanest, but you have to get a bit more low-level with it. If you're implementing sockets on a small scale, this is probably still your best and easiest choice.
Most Recent Replies: View All 1 Replies
- Excellent design, but there are performance issues
The class Apple forgot! 



- Version: 3.12, 8/2/2004 09:23AM PST
(1 of 1 users found this comment useful)
fejta
When making an internet program you want a socket class that is easy to use and efficient. AsyncSocket hits both of these goals right on the head. All you need to do is define a couple functions in your class, instantiate AsyncSocket, set yourself up as the receiver and call a couple functions. Preso! Instant internet connectivity!
SolarSeek, a p2p client, uses this class. Being a p2p client, it has to manage a large number of simultaneous connections. AsyncSocket is the ideal choice because it can handle many connections at once without any extra programming or threads. Yet it still neither blocks nor pegs the resource meter at 100%.
Also, the author will quickly resolve any bugs you may find in his class after providing him with sufficient evidence his code is at fault.
Excellent work, this class comes highly recommended.
SolarSeek, a p2p client, uses this class. Being a p2p client, it has to manage a large number of simultaneous connections. AsyncSocket is the ideal choice because it can handle many connections at once without any extra programming or threads. Yet it still neither blocks nor pegs the resource meter at 100%.
Also, the author will quickly resolve any bugs you may find in his class after providing him with sufficient evidence his code is at fault.
Excellent work, this class comes highly recommended.