Re: [xSocket-develop] question about designing a server and server push
Status: Inactive
Brought to you by:
grro
|
From: Gregor R. <gre...@go...> - 2008-08-05 17:43:12
|
Hi Lenjoy, the current version of xSocket supports on the bottom level TCP (incl. SSL) and UDP. Beside this low level protocol support, extension modules exist to support HTTP and multiplexed TCP. xSocket core as well as the extension modules implement the common interface IDataSink and IDataSource to read and write network data. By using these interfaces, the core part of your code will be protocol-independent. If you have to support other than these protocols you have to write your own extensions. The xSocket community would appreciate sharing new extension modules with you :-) To write an efficient server pushed based server, you have to use an asynchronous/non-blocking network API. For example all the popular Java-based Comet server uses NIO internally. xSocket and the extension modules support both, a synchronous/blocking and asynchronous/non-blocking API, and have been used to write server which implements a server-push approach, as well as implementing classic server such as a SMTP server. The decision Java vs. C++ depends on your platform and your preferred development technology. From the performance view Java is as fast as C++ (or faster?). If you decide to use C++, you will find network libraries like ASIO which supports an asynchronous API. Gregor 2008/8/5 Lenjoy <mar...@gm...> > Dear xSocket develop folks, > > question about designing a lightweight server, which can be on HTTP or TCPor UDP, whatever, the client may not be PC, e.g. cellphone or other devices. > the client sends request to server and wait the response, the response > should be as soon as possible, the server need to deal with some Database > job. > currently, there are two popular methods to achieve that. > > 1. client checks the server in period, if any update, the server give the > updated response back. > 2. server push, when any update in server, this is a nice user > experience for client. The main concern is that the server need to keep the > connection, this may be a heavy load for server, another problem is for the > clients which are not PC, they need to keep the connection always, which may > be wasting money for some services. > > if using xSocket server, any effective solution for this purpose? > Maybe xSocket is not the best choice, any other Java server or C++ or C > server to achieve that? > > Any comments and suggestion are appreciated. > > -- > Lenjoy > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > xSocket-develop mailing list > xSo...@li... > https://lists.sourceforge.net/lists/listinfo/xsocket-develop > > |