{"id":527,"date":"2022-08-31T21:03:05","date_gmt":"2022-08-31T14:03:05","guid":{"rendered":"https:\/\/dgway.com\/blog_E\/?p=527"},"modified":"2022-09-07T22:28:01","modified_gmt":"2022-09-07T15:28:01","slug":"toe-multiple-session","status":"publish","type":"post","link":"https:\/\/dgway.com\/blog_E\/2022\/08\/31\/toe-multiple-session\/","title":{"rendered":"TOE Multiple session"},"content":{"rendered":"<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"643\" height=\"395\" src=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/08\/image-2.png\" alt=\"\" class=\"wp-image-541\" srcset=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/08\/image-2.png 643w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/08\/image-2-300x184.png 300w\" sizes=\"auto, (max-width: 643px) 100vw, 643px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Nowadays, algorithmic trading or robot trading is a trend and \u201cFast\u201d is the keyword. After a user completes the algorithm that is fast, reliable and applicable to various products in the market. Now, It is time to talk about theory to upgrade hardware in order to benefit the most.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Theory of TCP<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">TCP has a handshake process to confirm when a client connects or disconnects to the server. The handshake process when connecting client to server is shown in the picture below.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"429\" height=\"315\" src=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/08\/image.png\" alt=\"\" class=\"wp-image-539\" srcset=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/08\/image.png 429w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/08\/image-300x220.png 300w\" sizes=\"auto, (max-width: 429px) 100vw, 429px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Client sends the package with flag syn to the server. Then, the server sends the tcp package with syn and ack flag to the client. After That, the client sends the tcp package with the ack flag to the server. The handshake process for connecting is done. Now, the client and server can send or receive data to each other. The next step is the Disconnect process. The handshake process when disconnecting client from server is illustrated in the picture below.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"429\" height=\"315\" src=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/08\/image-1.png\" alt=\"\" class=\"wp-image-540\" srcset=\"https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/08\/image-1.png 429w, https:\/\/dgway.com\/blog_E\/wp-content\/uploads\/2022\/08\/image-1-300x220.png 300w\" sizes=\"auto, (max-width: 429px) 100vw, 429px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">The client sends the tcp package with the fin flag to the server. Next, the server sends a tcp package with fin and ack flag to the client. Then, the client sends the tcp package with ack flag. The Disconnect handshake is completed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Multiple session<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Multiple sessions is the concept of using one ip address connecting to multiple computers. This can be achieved by using multiple port sections on the tcp header. The benefit of this concept in the first place is to send\/receive information to\/from multiple computers on the internet. This concept can adapt to the trading world by using the same algorithm but sending orders to different brokers. Otherwise, users need to open and close the port when connecting to the server of each broker. The amount of time for opening and closing connections could cost users a lot when relative to the price of stock.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Summary<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Multiple sessions is the key to reduce overhead timing when data needs to be sent\/received to\/from many end-points. Due to the fact that there is no need to re-establish the connection between client and server, robot trading uses this advantage to arbitrage the market even trading the same product but different brokers.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nowadays, algorithmic trading or robot trading is a trend and \u201cFast\u201d is the keyword. After a user completes the algorithm that is fast, reliable and applicable to various products in the market. Now, It is time to talk about theory to upgrade hardware in order to benefit the most. Theory of TCP TCP has a handshake process to confirm when&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":541,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-527","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-low-latency"],"_links":{"self":[{"href":"https:\/\/dgway.com\/blog_E\/wp-json\/wp\/v2\/posts\/527","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dgway.com\/blog_E\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dgway.com\/blog_E\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dgway.com\/blog_E\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dgway.com\/blog_E\/wp-json\/wp\/v2\/comments?post=527"}],"version-history":[{"count":4,"href":"https:\/\/dgway.com\/blog_E\/wp-json\/wp\/v2\/posts\/527\/revisions"}],"predecessor-version":[{"id":556,"href":"https:\/\/dgway.com\/blog_E\/wp-json\/wp\/v2\/posts\/527\/revisions\/556"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dgway.com\/blog_E\/wp-json\/wp\/v2\/media\/541"}],"wp:attachment":[{"href":"https:\/\/dgway.com\/blog_E\/wp-json\/wp\/v2\/media?parent=527"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dgway.com\/blog_E\/wp-json\/wp\/v2\/categories?post=527"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dgway.com\/blog_E\/wp-json\/wp\/v2\/tags?post=527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}