![]() ![]() |
A set of documented samples to help you quickly understand batching, asynchrony and parallel computation with SocketProUDAParts Very different from common remoting frameworks, SocketPro is written from batching asynchrony and parallel computation with online compressing. At the very beginning, you may be not used to SocketPro asynchronous programming style. Therefore, we have created a set of tutorials to assist your development. At this time, the set of tutorials consist of five documented samples and each of them is written from C++, C# and VB.net. As long as you know anyone of the three languages, you can learn something from the set of tutorials. All of code snippets inside the four tutorials documents are from C# code samples. Each of the four documents has a number of FAQs that help you understand the design of SocketPro. The tutorial one is the simplest one, and the tutorials 3 and 4 are more challenging. Please play these tutorials starting from the tutorial one. Tutorial One -- The first tutorial is a hello project to support five simple requests. One of them is a slow request processed with a worker thread at the server side. The tutorial tells you how to code step-by-step at both server and client sides based on the classes of SocketProAdapter and its sub namespaces. The tutorial leads you to do two experiments that require you to use the well known tool Telnet for connecting from a client to a remote SocketPro server. The tutorial tells you SocketPro threads management at server side. It tells you what variables should be synchronized with a critical section or monitor. For client development, the tutorial is focused on how to use SocketProAdapter at client side, how to turn on/off online compressing, how to batch requests, how to do asynchrony computation, how to do synchrony computation, and how to switch between the two computation models. This tutorial leads you to do an particular experiment, freezing and de-freezing Window GUIs at run time. Tutorial Two -- The second tutorial completes all of tasks forgotten in Tutorial one. The tutorial tells you how to secure data communication between a client and server, how to reuse your high performance libraries written from C/C++, how to use SocketPro built-in notification service. Whenever an interesting thing happens at either client or server side, you can easily send a proper message to notify one or multiple clients. Tutorial Three -- With the third tutorial, we create a new service. The service has some challenging tasks that we need to exchange a large size of data collection objects between a client and a server efficiently. Further, the centered data store is accessed from different clients and threads to keep these data, but we don't use any data synchronization object to synchronize the centered data store. The tutorial demonstrates how to avoid using data synchronization and gives your detailed analysis, how to send a large size of data from a server to a client with multiple chunks. At client side, the tutorial shows you how to use one socket connection to server two services, how to switch for different services, how to send a large size of data with a set of small chunks, and how to make sure that your network is fully utilized with 100% network efficiently. Although sending a large size of data from a client to a server, we do not use any worker thread but non-blocking socket only. Tutorial Four -- The fourth tutorial is focused on scalability. SocketPro has a special ATL COM object USocketPool. You can use a pool of socket connections to serve all of clients with much less resources easily. A USocketPool manages a small set of threads and each of them hosts a small set of sockets. All of sockets run in parallel with excellent concurrency to fully utilize the power of a machine having multiple processors. With USocketPool, you can use much less effort and time to develop a high performance and scalability distributed application to supports tens of thousands of clients with load balancing and failure recovery. Tutorial Five -- UDAParts has developed a simple security protocol to secure just-needed requests and return results with zero security settings and super simplicity. The protocol is simply rooted on hashing password with salt to create a private key on the fly for BlowFish. As long as you understand hash and BlowFish, you will have no problem in understanding the simple security protocol. HTTP BASIC -- Beginning from version 5, SocketPro fully supports HTTP protocol version 1.0 and 1,1. SocketPro is running both binary transaction services and HTTP service on the same port. SocketPro HTTP is especially great with exchanging large size of requests in stream between client and server. It is written for accessing SocketPro from any development environments and platforms. HTTP Server Push -- SocketPro has the feature HTTP server push implemented. With help of this powerful feature, you are able to easily and quickly exchange messages among web browsers, smart devices, normal desktop and server applications in real time. This tutorial shows you how to take advantage of this powerful feature. We'll continue to add more tutorials. |