Saturday 8 July 2017

บอนด์ ซื้อขาย ระบบ สถาปัตยกรรม


ระบบเทรดดิ้งระบบการซื้อขายคืออะไรระบบการซื้อขายคือกลุ่มของกฎหรือพารามิเตอร์เฉพาะที่กำหนดจุดเข้าและออกสำหรับผู้ถือหุ้นแต่ละรายจุดเหล่านี้เรียกว่าสัญญาณมักถูกทำเครื่องหมายไว้บนแผนภูมิในเวลาจริงและพร้อมท์ การดำเนินการในทันทีของการค้านี่คือบางส่วนของเครื่องมือการวิเคราะห์ทางเทคนิคที่พบมากที่สุดที่ใช้ในการสร้างพารามิเตอร์ของระบบการซื้อขายโดยเฉลี่ย MA. Relative ความแข็งแรง Bolllinger Bands. Otheren สองคนหรือมากกว่าของตัวบ่งชี้เหล่านี้จะรวมอยู่ใน การสร้างกฎตัวอย่างเช่นระบบครอสโอเวอร์ MA ใช้พารามิเตอร์เฉลี่ยเคลื่อนที่สองค่าระยะยาวและระยะสั้นเพื่อสร้างกฎการซื้อเมื่อข้ามระยะสั้นเหนือระยะยาวและขายเมื่อตรงข้ามคือ true ในกรณีอื่น ๆ กฎใช้ตัวบ่งชี้เพียงตัวเดียวตัวอย่างเช่นระบบอาจมีกฎที่ห้ามการซื้อใด ๆ เว้นแต่ความแรงของญาติอยู่เหนือระดับหนึ่ง แต่เป็นการรวมกันของกฎเหล่านี้ทั้งหมดที่ทำให้ระบบการซื้อขาย MSFT การย้ายค่าเฉลี่ยข้ามระบบโดยใช้ค่าเฉลี่ยเคลื่อนที่ 5 และ 20 เนื่องจากความสำเร็จของระบบโดยรวมขึ้นอยู่กับประสิทธิภาพของกฎเกณฑ์ผู้ค้าระบบต้องใช้เวลาในการเพิ่มประสิทธิภาพเพื่อจัดการความเสี่ยงเพิ่มปริมาณที่ได้รับต่อการค้าและบรรลุความมั่นคงในระยะยาว ตัวอย่างเช่นเพื่อเพิ่มประสิทธิภาพของระบบครอสโอเวอร์แบบ MA พ่อค้าจะทดสอบเพื่อดูว่าค่าเฉลี่ยเคลื่อนที่ 10 วัน 30 วัน ฯลฯ ทำงานได้ดีที่สุดและใช้งานได้ดีที่สุด แต่การเพิ่มประสิทธิภาพสามารถปรับปรุงผลลัพธ์ได้ โดยเฉพาะขอบขนาดเล็ก - มัน s การรวมกันของพารามิเตอร์ที่ใช้ที่จะกำหนดความสำเร็จของระบบดังนั้นข้อดีดังนั้นทำไมคุณอาจต้องการที่จะนำระบบการซื้อขายมันใช้เวลาอารมณ์ความรู้สึกทั้งหมดออกจากการซื้อขาย - อารมณ์มักถูกอ้างถึงเป็นหนึ่ง ของข้อบกพร่องที่ใหญ่ที่สุดของนักลงทุนรายย่อยนักลงทุนที่ไม่สามารถรับมือกับความเสียหายที่สองเดาการตัดสินใจของพวกเขาและท้ายการสูญเสียเงินโดยอย่างเคร่งครัดต่อไปนี้ระบบก่อนการพัฒนาผู้ค้าระบบสามารถละเลยความต้องการ ที่จะทำให้การตัดสินใจใด ๆ เมื่อระบบมีการพัฒนาและจัดตั้งขึ้นการซื้อขายไม่ได้เป็นเชิงประจักษ์เพราะเป็นแบบอัตโนมัติโดยการลดความไร้ประสิทธิผลของมนุษย์ผู้ค้าระบบสามารถเพิ่มผลกำไรได้สามารถประหยัดเวลาได้มากเมื่อระบบที่มีประสิทธิภาพได้รับการพัฒนาและเพิ่มประสิทธิภาพเพียงเล็กน้อย เพื่อความพยายามไม่จำเป็นต้องใช้โดยผู้ประกอบการค้าคอมพิวเตอร์มักจะใช้โดยอัตโนมัติไม่เพียง แต่การสร้างสัญญาณ แต่ยังซื้อขายจริงเพื่อให้ผู้ประกอบการค้าเป็นอิสระจากการใช้เวลาในการวิเคราะห์และการทำ trades. It ง่ายถ้าคุณให้คนอื่นทำเพื่อ คุณต้องทำงานทั้งหมดให้กับคุณบ้าง บริษัท บางแห่งขายระบบการซื้อขายที่พวกเขาพัฒนาขึ้น บริษัท อื่น ๆ จะให้สัญญาณที่สร้างขึ้นโดยระบบการซื้อขายภายในของพวกเขาสำหรับค่าบริการรายเดือนโปรดระวังแม้ว่า บริษัท เหล่านี้จะหลอกลวง ดูเมื่อผลลัพธ์ที่พวกเขาโอ้อวดเกี่ยวกับถูกถ่ายหลังจากทั้งหมดมันง่ายที่จะชนะในอดีตมองหา บริษัท ที่มีการทดลองซึ่งช่วยให้คุณสามารถทดสอบระบบในเวลาจริงข้อเสีย เรามองไปที่ข้อได้เปรียบหลักของการทำงานร่วมกับระบบการซื้อขาย แต่วิธีการนี้ยังมีข้อเสียอยู่ด้วยระบบการค้าที่ซับซ้อน - นี่คือข้อเสียที่ใหญ่ที่สุดของพวกเขาในขั้นตอนการพัฒนาระบบการซื้อขายต้องการความเข้าใจที่มั่นคงเกี่ยวกับการวิเคราะห์ทางเทคนิค ตัดสินใจเชิงประจักษ์และความรู้อย่างละเอียดเกี่ยวกับวิธีการทำงานของพารามิเตอร์แม้ว่าคุณจะไม่ได้พัฒนาระบบการซื้อขายของตนเอง แต่ก็จำเป็นที่จะต้องทำความคุ้นเคยกับพารามิเตอร์ต่างๆที่ใช้โดยการซื้อทักษะเหล่านี้ทั้งหมดอาจเป็นเรื่องท้าทาย คุณต้องสามารถใช้สมมติฐานที่สมจริงและใช้ระบบได้อย่างมีประสิทธิภาพ - ผู้ค้าระบบต้องตั้งสมมติฐานที่สมจริงเกี่ยวกับค่าใช้จ่ายในการทำธุรกรรมซึ่งจะประกอบด้วยค่าคอมมิชชั่นมากกว่าค่านายหน้า - ความแตกต่างระหว่างราคาดำเนินการกับราคาที่เติมเป็นส่วนหนึ่งของต้นทุนการทำธุรกรรม ใจก็มักจะเป็นไปไม่ได้ที่จะทดสอบระบบได้อย่างถูกต้องทำให้ระดับของความไม่แน่นอนเมื่อนำระบบอยู่ปัญหาที่เกิดขึ้นเมื่อ ผลการจำลองที่แตกต่างกันอย่างมากจากผลลัพธ์ที่เกิดขึ้นจริงจะเรียกว่าความลื่นไถลอย่างมีประสิทธิภาพการจัดการกับการลื่นไถลสามารถเป็นอุปสรรคสำคัญในการปรับใช้ระบบที่ประสบความสำเร็จการพัฒนาอาจเป็นงานที่ต้องใช้เวลามากเวลาสามารถเข้าไปในการพัฒนาระบบการซื้อขายเพื่อให้ทำงานได้ และการทำงานอย่างถูกต้องการสร้างแนวคิดระบบและนำไปสู่การปฏิบัติเกี่ยวข้องกับการทดสอบมากมายซึ่งจะใช้เวลาสักครู่ประวัติย้อนหลังใช้เวลาเพียงไม่กี่นาทีอย่างไรก็ตามการทดสอบกลับเพียงอย่างเดียวไม่เพียงพอระบบต้องเป็นกระดาษที่ซื้อขายในเวลาจริงเพื่อให้มั่นใจได้ , การลื่นไถลอาจทำให้ผู้ค้าทำการตรวจทานแก้ไขระบบต่างๆของตนได้หลายอย่างแม้หลังจากการปรับใช้งานพวกเขาทำงานมีการหลอกลวงทางอินเทอร์เน็ตจำนวนหนึ่งที่เกี่ยวข้องกับการซื้อขายระบบ แต่ยังมีระบบที่ประสบความสำเร็จหลายอย่างถูกต้องตามกฎหมายบางทีตัวอย่างที่มีชื่อเสียงที่สุดคือหนึ่งที่พัฒนาขึ้นและใช้งาน โดย Richard Dennis และ Bill Eckhardt ผู้เป็นพ่อค้า Turtle ดั้งเดิมในปี 1983 ทั้งสองมีข้อพิพาทว่าดี t เกิดขึ้นหรือทำดังนั้นพวกเขาเอาคนบางคนออกจากถนนและการฝึกอบรมพวกเขาขึ้นอยู่กับระบบการซื้อขายเต่าที่มีชื่อเสียงของพวกเขาตอนนี้พวกเขารวบรวม 13 ผู้ค้าและจบลงด้วยการทำ 80 ปีในช่วงสี่ปีต่อไปบิล Eckhardt เคยกล่าวว่าทุกคนที่มีสติปัญญาเฉลี่ย สามารถเรียนรู้การค้าได้นี่ไม่ใช่วิทยาศาสตร์จรวดอย่างไรก็ตามการเรียนรู้ว่าคุณควรทำอะไรในการซื้อขายมากกว่าการทำระบบการซื้อขายจะกลายเป็นที่นิยมมากขึ้นในหมู่นักลงทุนมืออาชีพผู้จัดการกองทุนและนักลงทุนรายย่อยเหมือนกันบางทีนี่อาจเป็น พิสูจน์ได้ว่าพวกเขาทำงานได้ดีเพียงใดการหลอกลวงด้วยการหลอกลวงเมื่อมองหาการซื้อระบบการซื้อขายอาจเป็นเรื่องยากที่จะหาธุรกิจที่น่าเชื่อถือ แต่การหลอกลวงส่วนใหญ่สามารถพบได้โดยสามัญสำนึกตัวอย่างเช่นการรับประกัน 2,500 ปีเป็นเรื่องอุกฉกรรจ์อย่างชัดเจนตามที่สัญญาไว้ ที่มีเพียง 5,000 คุณสามารถทำให้ 125,000 ในหนึ่งปีและผ่านการประนอมเป็นเวลาห้าปี 48,828,125,000 หากเป็นจริงไม่ได้ t ผู้สร้างทางค้าของเขาหรือเธอทางที่จะกลายเป็นสอง แต่วิธีการทั่วไปในการหลีกเลี่ยงการหลอกลวงคือการหาระบบที่มีการทดลองใช้ฟรีด้วยวิธีนี้คุณสามารถทดสอบระบบได้ด้วยตัวเองไม่เคยเชื่อใจธุรกิจที่ภูมิใจนำเสนอนอกจากนี้ยังเป็น ความคิดที่ดีในการติดต่อผู้อื่นที่ใช้ระบบเพื่อดูว่าพวกเขาสามารถยืนยันความน่าเชื่อถือและความสามารถในการทำกำไรข้อสรุปการพัฒนาระบบการซื้อขายที่มีประสิทธิภาพไม่ใช่เรื่องง่ายงานนี้ต้องมีความเข้าใจที่ชัดเจนเกี่ยวกับพารามิเตอร์ต่างๆที่มีอยู่ สมมติฐานที่สมจริงและเวลาและความทุ่มเทในการพัฒนาระบบอย่างไรก็ตามหากมีการพัฒนาและใช้งานอย่างถูกต้องระบบการซื้อขายสามารถให้ผลประโยชน์ได้มากมายสามารถเพิ่มประสิทธิภาพได้ฟรีเวลาและที่สำคัญที่สุดคือการเพิ่มผลกำไรของคุณระบบการจัดระบบการออกแบบระบบของคุณ - 1. ส่วนก่อนหน้าของการกวดวิชานี้ดูที่องค์ประกอบที่ประกอบกันเป็นระบบการซื้อขายและกล่าวถึงข้อดีและข้อเสียของการใช้ระบบดังกล่าวในระบบ tr สภาพแวดล้อมที่เอื้ออำนวยในส่วนนี้เราจะสร้างความรู้ดังกล่าวขึ้นโดยการตรวจสอบว่าตลาดใดมีความเหมาะสมกับการซื้อขายระบบมากที่สุดจากนั้นเราจะเจาะลึกในรูปแบบต่างๆของระบบการซื้อขายการซื้อขายในตลาดที่แตกต่างกันตลาดอีเทอร์เน็ตส่วนของผู้ถือหุ้น ในตลาดนี้ผู้เล่นรายใหญ่เช่น Warren Buffett และ Merrill Lynch ครองส่วนค่านิยมแบบดั้งเดิมและกลยุทธ์การลงทุนที่เพิ่มสูงขึ้นเป็นที่นิยมมากที่สุดอย่างไรก็ตามสถาบันหลายแห่งได้ลงทุนอย่างมากในตลาดนี้ การออกแบบการพัฒนาและการใช้ระบบการซื้อขายนักลงทุนรายย่อยกำลังเข้าร่วมแนวโน้มนี้แม้ว่าจะช้าๆต่อไปนี้เป็นปัจจัยสำคัญบางประการที่ต้องคำนึงถึงเมื่อใช้ระบบการซื้อขายในตลาดตราสารทุนจำนวนมากที่มีอยู่ช่วยให้นักลงทุนสามารถทดสอบระบบได้หลายแบบ ประเภทของหุ้น - ทุกอย่างจากหุ้น OTC ที่ซื้อขายตามใบสั่งซื้อที่ไม่ต้องผันผันผวนไปยังชิปสีน้ำเงินที่ไม่ระเหยง่ายประสิทธิภาพของ ระบบการซื้อขายอาจถูก จำกัด ด้วยสภาพคล่องในระดับต่ำของหุ้นโดยเฉพาะอย่างยิ่ง OTC และการออกใบอนุญาตในแถบสีชมพูสามารถกินผลกำไรที่เกิดจากการซื้อขายที่ประสบความสำเร็จและสามารถเพิ่มความสูญเสีย OTC และหุ้นของแผ่นสีชมพูมักมีค่าคอมมิชชั่นเพิ่มขึ้น ที่มองหาค่า - นั่นคือระบบที่ใช้พารามิเตอร์ที่แตกต่างกันเพื่อพิจารณาว่าการรักษาความปลอดภัยถูกประเมินต่ำกว่าผลการปฏิบัติงานในอดีตเพื่อนหรือตลาดโดยทั่วๆไป ​​Forex Exchange Market ตลาดแลกเปลี่ยนเงินตราต่างประเทศหรืออัตราแลกเปลี่ยนเป็นจำนวนมากที่สุดและมากที่สุด ตลาดของเหลวในโลกรัฐบาลของโลกธนาคารและสถาบันการเงินขนาดใหญ่อื่น ๆ ทำการค้าเงินหลายล้านล้านดอลลาร์ในตลาดอัตราแลกเปลี่ยนทุกวันผู้ค้าสถาบันส่วนใหญ่ในตลาดอัตราแลกเปลี่ยนพึ่งพาระบบการซื้อขายเช่นเดียวกันกับบุคคลทั่วไปในตลาดแลกเปลี่ยนเงินตราต่างประเทศ เกี่ยวกับรายงานทางเศรษฐกิจหรือการจ่ายดอกเบี้ยที่นี่มีบางปัจจัยสำคัญที่ต้องจำไว้เมื่อใช้ระบบการซื้อขายในตลาด forex สภาพคล่อง i. n ตลาดนี้เนื่องจากปริมาณมากทำให้ระบบการซื้อขายมีความถูกต้องและมีประสิทธิภาพมากขึ้นไม่มีค่าคอมมิชชั่นในตลาดนี้เพียงแค่กระจายดังนั้นการทำธุรกรรมต่างๆได้ง่ายขึ้นโดยไม่ต้องเพิ่มค่าใช้จ่ายให้กับจำนวนหุ้นหรือสินค้าที่พร้อมใช้งาน, จำนวนสกุลเงินที่ใช้ในการซื้อขายมีจำนวน จำกัด แต่เนื่องจากความพร้อมของคู่สกุลเงินที่แปลกใหม่นั่นคือสกุลเงินจากประเทศเล็ก ๆ ช่วงของความผันผวนไม่จำเป็นต้อง จำกัด ไว้ระบบการซื้อขายหลักที่ใช้ในการแลกเปลี่ยนเงินตราต่างประเทศคือสกุลเงินที่มีแนวโน้มเป็นไปตาม คำนิยมในตลาดมีแนวโน้มเป็นเพื่อนหรือระบบของคุณที่ซื้อหรือขายบน breakouts เนื่องจากตัวชี้วัดทางเศรษฐกิจมักจะทำให้เกิดการเคลื่อนไหวของราคาที่มีขนาดใหญ่ในครั้งเดียวฟอร์ดตราสารทุนตลาดแลกเปลี่ยนเงินตราต่างประเทศและสินค้าโภคภัณฑ์มีการซื้อขายสัญญาซื้อขายล่วงหน้าทั้งหมดนี้เป็นที่นิยม ยานพาหนะสำหรับการซื้อขายระบบเนื่องจากปริมาณเงินที่สูงขึ้นของการใช้ประโยชน์และสภาพคล่องและความผันผวนที่เพิ่มขึ้นอย่างไรก็ตามปัจจัยเหล่านี้สามารถลดทั้งสองวิธีที่พวกเขา ca n ขยายกำไรของคุณหรือขยายการสูญเสียของคุณด้วยเหตุนี้การใช้ฟิวเจอร์สมักสงวนไว้สำหรับผู้ค้าระบบรายย่อยและระบบสถาบันขั้นสูงเนื่องจากระบบการซื้อขายที่มีความสามารถในการพึ่งพาตลาดฟิวเจอร์สจำเป็นต้องมีการปรับแต่งมากขึ้น มากขึ้นในการพัฒนาดังนั้นซึ่งเป็นที่ดีที่สุดขึ้นอยู่กับนักลงทุนรายย่อยในการตัดสินใจว่าตลาดใดเหมาะที่สุดสำหรับการซื้อขายระบบ - แต่ละมีข้อดีและข้อเสียของตัวเองคนส่วนใหญ่คุ้นเคยกับตลาดทุนมากขึ้นและความคุ้นเคยนี้ทำให้การพัฒนาเป็น ระบบการซื้อขายง่ายขึ้นอย่างไรก็ตาม forex ถูกคิดว่าเป็นแพลตฟอร์มที่ดีกว่าในการเรียกใช้ระบบการค้าโดยเฉพาะอย่างยิ่งในหมู่ผู้ค้าที่มีประสบการณ์มากขึ้นนอกจากนี้หากผู้ประกอบการตัดสินใจที่จะใช้ประโยชน์จากความได้เปรียบและความผันผวนที่เพิ่มขึ้นทางเลือกฟิวเจอร์สก็จะเปิดอยู่ตลอดเวลา มือของนักพัฒนาระบบประเภทของระบบการซื้อขายระบบการให้คะแนนต่อไปวิธีการที่พบมากที่สุด ของระบบการค้าเป็นระบบแนวโน้มแนวโน้มในรูปแบบพื้นฐานที่สุดของระบบนี้ก็รอการเคลื่อนไหวของราคาอย่างมีนัยสำคัญแล้วซื้อหรือขายในทิศทางที่ธนาคารระบบประเภทนี้กับหวังว่าการเคลื่อนไหวของราคาเหล่านี้จะรักษาแนวโน้ม. ระบบเฉลี่ยที่ใช้บ่อยในการวิเคราะห์ทางเทคนิคค่าเฉลี่ยเคลื่อนที่เป็นตัวบ่งชี้ที่แสดงราคาเฉลี่ยของสต็อคในช่วงเวลาหนึ่งสาระสำคัญของแนวโน้มจะได้มาจากการวัดนี้วิธีที่ใช้ทั่วไปในการกำหนดการเข้าและออกคือการครอสโอเวอร์ นี่คือกราฟที่ทำเครื่องหมายทั้งเส้นสีฟ้าราคาและเส้นสีแดง MA 20 วันของ IBM ระบบบีบอัดข้อมูลแนวคิดพื้นฐานที่อยู่เบื้องหลังประเภทนี้ ของระบบจะคล้ายกับของระบบค่าเฉลี่ยเคลื่อนที่แนวคิดก็คือเมื่อมีการสร้างสูงหรือต่ำใหม่ขึ้นการเคลื่อนไหวของราคาน่าจะยังคงดำเนินต่อไปในทิศทางของ br eakout ตัวบ่งชี้หนึ่งตัวที่สามารถใช้ในการกำหนด breakouts คือ Bollinger Band แบบวง Bollinger Bands แสดงค่าเฉลี่ยของราคาที่สูงและราคาต่ำและ breakouts เกิดขึ้นเมื่อราคาตรงกับขอบของวงนี่คือแผนภูมิที่ใช้เส้นสีน้ำเงินและ Bollinger Bands สีเทา บรรทัดของ Microsoft ข้อเสียของระบบ Trend-Following การตัดสินใจเชิงประจักษ์ที่จำเป็น - เมื่อพิจารณาแนวโน้มจะมีองค์ประกอบเชิงประจักษ์ที่จะต้องพิจารณาถึงระยะเวลาของแนวโน้มในอดีตตัวอย่างเช่นค่าเฉลี่ยเคลื่อนที่อาจเป็นเวลา 20 วันที่ผ่านมาหรือสำหรับ ที่ผ่านมาห้าปีดังนั้นนักพัฒนาจะต้องตรวจสอบว่าเป็นวิธีที่ดีที่สุดสำหรับระบบปัจจัยอื่น ๆ ที่จะต้องพิจารณาคือค่าเฉลี่ยความสูงและต่ำสุดในระบบ breakout. Nagging Nature - การย้ายค่าเฉลี่ยและระบบ breakout จะล้าหลังเสมอกล่าวอีกนัยหนึ่งก็คือ ไม่เคยตีตรงด้านบนหรือด้านล่างของแนวโน้มนี้ย่อมส่งผลให้ริบของกำไรที่อาจเกิดขึ้นซึ่งบางครั้งอาจเป็นอย่างสำคัญผลกระทบทางสถิติ - ในตลาด แรงที่เป็นอันตรายต่อความสำเร็จของระบบเทรนด์ต่อไปนี้เป็นส่วนหนึ่งที่พบได้ทั่วไปผลกระทบ whipsaw เกิดขึ้นเมื่อค่าเฉลี่ยเคลื่อนที่สร้างสัญญาณเท็จ - นั่นคือเมื่อค่าเฉลี่ยลดลงเพียงแค่เป็นช่วงจากนั้นก็กลับทิศทางนี้สามารถ นำไปสู่การสูญเสียขนาดใหญ่เว้นแต่มีการหยุดขาดทุนที่มีประสิทธิภาพและเทคนิคการบริหารความเสี่ยงที่มีการใช้งานด้านข้างตลาด - ระบบติดตามแนวโน้มตามธรรมชาติมีความสามารถในการทำเงินได้เฉพาะในตลาดที่ทำตามแนวโน้มอย่างไรก็ตามตลาดยังเคลื่อนไปด้านข้างอยู่ในช่วงที่กำหนด เป็นระยะเวลานานความผันผวนสูงสุดอาจเกิดขึ้น - บางครั้งระบบแนวโน้มตามอาจพบความผันผวนมากบาง แต่ผู้ประกอบการค้าจะต้องติดกับระบบของเขาหรือเธอไม่สามารถที่จะทำเช่นนั้นจะส่งผลให้เกิดความล้มเหลวมั่นใจ. ระบบขากลับโดยทั่วไป เป้าหมายกับระบบ countertrend คือการซื้อที่ต่ำสุดต่ำและขายที่สูงที่สุดความแตกต่างหลักระหว่างนี้และแนวโน้มตามระบบคือการ co untertrend system ไม่ใช่ self-correcting ในคำอื่น ๆ ไม่มีเวลาที่จะออกจากตำแหน่งและส่งผลให้เกิดข้อเสียที่ไม่ จำกัด ประเภทของระบบการนับถอยหลังระบบต่างๆหลายประเภทถือว่าเป็นระบบ countertrend แนวคิดนี้คือการซื้อเมื่อโมเมนตัมใน ทิศทางหนึ่งเริ่มซีดจางนี่คือการคำนวณโดยส่วนใหญ่ใช้ oscillators ตัวอย่างเช่นสัญญาณสามารถสร้างขึ้นได้เมื่อ stochastics หรือตัวบ่งชี้ความแข็งแกร่งอื่น ๆ ตกอยู่ด้านล่างจุดบางอย่างมีประเภทอื่น ๆ ของระบบการซื้อขาย countertrend แต่ทั้งหมดของพวกเขามีเป้าหมายเดียวกันพื้นฐาน - ซื้อต่ำและขายสูงข้อดีของ Countertrend ดังต่อไปนี้การตัดสินใจที่จำเป็น mesirical - ตัวอย่างเช่นปัจจัยหนึ่งที่ผู้พัฒนาระบบต้องตัดสินใจคือจุดที่ตัวบ่งชี้ความเข้มของสัมพัทธ์อาจจางหายไปความผันผวนสูงสุดอาจเกิดขึ้น - ระบบเหล่านี้ อาจมีความผันผวนมากและความสามารถในการติดกับระบบแม้จะมีความผันผวนนี้จะส่งผลให้ มั่นใจได้ว่าจะมีข้อเสียน้อยลงข้อ จำกัด ด้านการซื้อขายที่เหมาะสมคือตลาดตราสารทุนตลาด forex และ futures ซึ่งเป็นตลาดหลักที่มีระบบการซื้อขายที่เหมาะสม แต่ละตลาดมีข้อดีและข้อเสียทั้งสองระบบหลักของระบบการซื้อขายคือระบบแนวโน้มและระบบ countertrend แม้ว่าความแตกต่างของระบบทั้งสองประเภทในขั้นตอนการพัฒนาจะต้องมีการตัดสินใจเชิงประจักษ์ในส่วนของผู้พัฒนา ระบบเหล่านี้อาจมีความผันผวนมากและอาจต้องการความแข็งแกร่งบางอย่างจำเป็นที่ผู้ค้าระบบจะติดอยู่กับระบบของเขาในช่วงเวลาดังกล่าวในงวดต่อไปนี้เราจะศึกษาวิธีการออกแบบระบบการซื้อขายและ พูดคุยบางส่วนของซอฟต์แวร์ที่ผู้ค้าระบบใช้เพื่อทำให้ชีวิตของพวกเขาง่ายขึ้นรูปแบบการรวมการคิดแบบบูรณาการในการศึกษากรณีศึกษากรณีศึกษา d ระบบการซื้อขาย โดยโจนาธาน Simon. It เป็นเรื่องง่ายที่จะห่างตัวเองจากคอลเลกชันที่มีขนาดใหญ่ของรูปแบบหรือรูปแบบภาษารูปแบบที่เป็นนามธรรมของความคิดในรูปแบบนำมาใช้ใหม่บ่อยครั้งลักษณะทั่วไปมากของรูปแบบที่ทำให้พวกเขามีประโยชน์เพื่อยังทำให้พวกเขายากที่จะเข้าใจ บางครั้งสิ่งที่ดีที่สุดในการช่วยให้เข้าใจรูปแบบเป็นตัวอย่างของโลกแห่งความเป็นจริงไม่ใช่สถานการณ์ที่เกิดขึ้นจริง แต่สิ่งที่เกิดขึ้นจริงและสิ่งที่จะเกิดขึ้นบทนี้ใช้รูปแบบในการแก้ปัญหาโดยใช้กระบวนการค้นพบระบบที่เราจะกล่าวถึงคือการซื้อขายตราสารหนี้ ระบบที่ฉันทำงานด้วยเป็นเวลาสองปีตั้งแต่เริ่มออกแบบโดยการผลิตเราจะสำรวจสถานการณ์และปัญหาที่พบและวิธีแก้ปัญหาด้วยรูปแบบซึ่งเกี่ยวข้องกับกระบวนการตัดสินใจในการเลือกรูปแบบรวมทั้งวิธีการรวมและปรับรูปแบบให้เหมาะสม ความต้องการของระบบและนี่คือทั้งหมดที่เกิดขึ้นโดยคำนึงถึงแรงที่พบในระบบจริงเช่นความต้องการทางธุรกิจการตัดสินใจของลูกค้า ar ข้อกำหนดทางสถาปัตยกรรมและทางเทคนิคเช่นเดียวกับการรวมระบบเดิมความตั้งใจของวิธีนี้คือการให้ความเข้าใจที่ชัดเจนของรูปแบบตัวเองผ่านการประยุกต์ใช้ในทางปฏิบัติการสร้างระบบธนาคารพาณิชย์ที่สำคัญ Wall Street กำหนดออกไปสร้างระบบการกำหนดราคาพันธบัตรใน ขณะนี้ผู้ค้าพันธบัตรต้องส่งมอบราคาสำหรับพันธบัตรจำนวนมากไปยังสถานที่การซื้อขายหลายแห่งโดยแต่ละแห่งมีส่วนติดต่อผู้ใช้ของตนเองเป้าหมายของระบบคือการลดรายละเอียดของการกำหนดราคาทั้งหมดของ พันธบัตรของพวกเขารวมกับการทำงานวิเคราะห์ขั้นสูงที่เฉพาะเจาะจงไปยังตลาดพันธบัตรในส่วนติดต่อผู้ใช้แบบห่อหุ้มเดียวซึ่งหมายความว่าการผสานรวมและการสื่อสารกับคอมโพเน็นต์ต่างๆผ่านโปรโตคอลการสื่อสารต่างๆการไหลระดับสูงของระบบมีลักษณะเช่นนี้ประการแรกข้อมูลตลาดเข้ามาในระบบ ข้อมูลเป็นข้อมูลเกี่ยวกับราคาและคุณสมบัติอื่น ๆ ของพันธบัตรที่เป็นตัวแทนของสิ่งที่ผู้คนกำลัง willin g จะซื้อและขายพันธบัตรในตลาดเสรีข้อมูลการตลาดจะถูกส่งไปยังเครื่องมือวิเคราะห์ที่เปลี่ยนแปลงข้อมูล Analytics หมายถึงฟังก์ชันทางคณิตศาสตร์สำหรับแอ็พพลิเคชันทางการเงินที่เปลี่ยนแปลงราคาและคุณลักษณะอื่น ๆ ของพันธบัตรเหล่านี้เป็นฟังก์ชันทั่วไปที่ใช้อินพุต ตัวแปรที่จะปรับแต่งผลการทำงานให้เป็นพันธบัตรโดยเฉพาะแอ็พพลิเคชันไคลเอ็นต์ที่จะทำงานบนเดสก์ท็อปของผู้ค้าแต่ละรายจะกำหนดค่าเครื่องมือวิเคราะห์บนพื้นฐานของผู้ค้าแต่ละรายควบคุมข้อมูลเฉพาะของการวิเคราะห์สำหรับแต่ละพันธบัตรผู้ค้าจะได้รับการกำหนดราคาเมื่อวิเคราะห์แล้ว นำไปประยุกต์ใช้กับข้อมูลการตลาดข้อมูลที่แก้ไขจะถูกส่งออกไปยังสถานที่ซื้อขายต่างๆที่ผู้ค้าจาก บริษัท อื่นสามารถซื้อหรือขายพันธบัตรได้สถาปัตยกรรมที่มีรูปแบบด้วยภาพรวมของกระบวนการทำงานของระบบนี้เราสามารถนำปัญหาทางสถาปัตยกรรมบางอย่างมาใช้ เราพบในระหว่างขั้นตอนการออกแบบลองมาดูที่สิ่งที่เรารู้จนถึงปัจจุบันผู้ค้าต้องใช้แอพพลิเคชั่นที่ตอบสนองได้ดีทั้งบน Windows NT d Solaris workstations ดังนั้นเราจึงตัดสินใจที่จะใช้แอ็พพลิเคชันไคลเอ็นต์เป็นไคลเอนต์หนาของ Java เนื่องจากความเป็นอิสระของแพลตฟอร์มและความสามารถในการตอบสนองต่อข้อมูลผู้ใช้และข้อมูลการตลาดได้อย่างรวดเร็วทางด้านเซิร์ฟเวอร์เราจะสืบทอดองค์ประกอบ C แบบเดิมที่ระบบของเราจะใช้ คอมโพเนนต์ข้อมูลการตลาดสื่อสารกับ TIBCO Information Bus โครงสร้างการรับส่งข้อความ TIB เราสืบทอดองค์ประกอบต่อไปนี้ Data Market Data Data Feed Server เผยแพร่ข้อมูลตลาดขาเข้าให้กับ TIB. Analytics Engine ดำเนินการวิเคราะห์ข้อมูลตลาดขาเข้าและออกอากาศข้อมูลตลาดที่แก้ไขไป TIB. Contribution Server ดำเนินการติดต่อสื่อสารกับสถานที่เทรดดิ้งสถานที่จัดจำหน่ายเป็นส่วนประกอบของบุคคลที่สามที่ไม่ได้รับการควบคุมโดยธนาคาร LEGEMATSYS Market Data Subsystem. Legacy Participatory Subsystem เราจำเป็นต้องตัดสินใจว่าระบบไคลเอ็นต์หนาหนาแน่นข้อมูลตลาด จะสื่อสารเราอาจมีลูกค้าหนาสื่อสารโดยตรงกับ le gacy servers แต่จะต้องใช้ตรรกะทางธุรกิจมากเกินไปในไคลเอ็นต์แทนเราจะสร้างคู่ของเกตเวย์ Java เพื่อสื่อสารกับเซิร์ฟเวอร์รุ่นเก่าเกตเวย์กำหนดราคาสำหรับข้อมูลตลาดเกตเวย์การมีส่วนร่วมสำหรับการส่งราคาไปยังสถานที่จัดจำหน่ายสถานที่นี้จะบรรลุการห่อหุ้มที่ดี ของตรรกะทางธุรกิจที่เกี่ยวข้องกับพื้นที่เหล่านี้องค์ประกอบปัจจุบันในระบบจะแสดงด้านล่างการเชื่อมต่อระบุว่าเรายังไม่แน่ใจว่าคอมโพเนนต์บางส่วนจะสื่อสารอย่างไรระบบและส่วนประกอบของมันคำถามแรกของการสื่อสารคือการรวมระบบ ลูกค้า Java หนาและสองส่วนประกอบเซิร์ฟเวอร์ Java เพื่อแลกเปลี่ยนข้อมูล Let s ดูที่สี่รูปแบบการรวมที่แนะนำในหนังสือเล่มนี้ File Transfer Shared Database การเรียกขั้นตอนระยะไกลและ Messaging เราสามารถออกกฎ Shared Database ทันทีเพราะเราต้องการสร้างชั้นของ abstraction ระหว่างไคลเอ็นต์และฐานข้อมูลและ don t ต้องการมีรหัสการเข้าถึงฐานข้อมูลในไคลเอ็นต์ File Transfe r สามารถถูกตัดออกได้เนื่องจากจำเป็นต้องมีเวลาแฝงเล็กน้อยเพื่อให้แน่ใจว่าราคาปัจจุบันจะถูกส่งออกไปยังสถานที่ซื้อขายสิ่งนี้ทำให้เราสามารถเลือกระหว่าง Remote Procedure Invocation หรือ Messaging ได้แพลตฟอร์ม Java มีการสนับสนุนทั้ง Remote Procedure Invocation และ Messaging การรวมเข้ากับ RPC ทำได้โดยการใช้ RMI Method แบบรีโมต RBA, CORBA หรือ Enterprise Java Beans EJB Java Messaging Service JMS เป็น API ทั่วไปสำหรับการรวมระบบการรับส่งข้อความดังนั้นรูปแบบการรวมระบบจึงสามารถใช้งานได้ง่ายใน Java ดังนั้นจะสามารถทำงานได้ดีขึ้น สำหรับโปรเจ็กนี้ Remote Procedure Invocation หรือ Messaging มีเพียงหนึ่งอินสแตนซ์ของ Pricing Gateway และหนึ่งอินสแตนซ์ของ Contribution Gateway ในระบบ แต่โดยปกติลูกค้าหนามากจะเชื่อมต่อกับบริการเหล่านี้สำหรับผู้ค้าตราสารหนี้แต่ละรายที่เข้าสู่ระบบ ในเวลาใดเวลาหนึ่งนอกจากนี้ธนาคารต้องการให้เป็นระบบการกำหนดราคาทั่วไปที่สามารถนำมาใช้ประโยชน์ได้ในโปรแกรมอื่น ๆ นอกเหนือจาก Think Clients จำนวนที่ไม่รู้จักอาจมีแอปพลิเคชันอื่น ๆ ที่ไม่รู้จักจำนวนมากที่ใช้ข้อมูลการกำหนดราคาที่มาจากไคลเอ็นต์หนาของ Gateways หรือโปรแกรมอื่น ๆ โดยใช้ข้อมูลราคาสามารถใช้ RPC เพื่อโทรไปที่เกตเวย์ได้อย่างง่ายดาย ข้อมูลการกำหนดราคาและเรียกใช้การประมวลผลอย่างไรก็ตามข้อมูลราคาจะมีการเผยแพร่ตลอดเวลาและลูกค้าบางรายสนใจเฉพาะข้อมูลบางอย่างเท่านั้นดังนั้นการรับข้อมูลที่เกี่ยวข้องกับลูกค้าที่เหมาะสมในเวลาที่เหมาะสมอาจเป็นเรื่องยากลูกค้าสามารถสำรวจเกตเวย์ได้ แต่จะเป็นเช่นนั้น สร้างค่าใช้จ่ายมากเกินไปเกตเวย์จะดีกว่าสำหรับเกตเวย์ที่จะทำให้ลูกค้าสามารถรับข้อมูลได้ทันทีที่สามารถใช้งานได้อย่างไรก็ตามระบบนี้จะต้องใช้เกตเวย์แต่ละเครื่องเพื่อติดตามว่าลูกค้ารายใดที่ใช้งานอยู่ในปัจจุบันและต้องการข้อมูลใด จากนั้นเมื่อมีการสร้างข้อมูลใหม่ขึ้นซึ่งจะเกิดขึ้นหลายครั้งต่อวินาที Gateway จะต้องให้ RPC แก่ลูกค้าที่สนใจแต่ละรายเพื่อส่งข้อมูลไปยัง Clie nt ควรให้ลูกค้าทุกคนได้รับแจ้งพร้อม ๆ กันดังนั้นแต่ละ RPC จะต้องทำในเธรดพร้อม ๆ กันซึ่งสามารถทำงานได้ แต่มีความซับซ้อนมากขึ้นอย่างรวดเร็วข้อความส่วนใหญ่ช่วยลดปัญหานี้ได้ง่ายขึ้นด้วยการรับส่งข้อความเราสามารถกำหนดช่องแยกสำหรับประเภทต่างๆได้ ของข้อมูลราคาแล้วเมื่อเกตเวย์ได้รับข้อมูลใหม่จะเพิ่มข้อความที่มีข้อมูลดังกล่าวลงในช่องเผยแพร่ - สมัครสมาชิกสำหรับประเภทข้อมูลนั้นในขณะที่ลูกค้าทั้งหมดที่สนใจข้อมูลบางประเภทจะรับฟังในช่องทางสำหรับ ประเภทนี้ด้วยวิธีนี้เกตเวย์สามารถส่งข้อมูลใหม่ ๆ ไปให้คนที่สนใจได้โดยไม่จำเป็นต้องรู้ว่ามีแอพพลิเคชันฟังมากมายหรือสิ่งที่พวกเขาเป็นลูกค้ายังคงต้องสามารถเรียกใช้พฤติกรรมในเกตเวย์ได้เช่นกัน มีเพียงสองเกตเวย์เท่านั้นและไคลเอ็นต์อาจจะขัดขวางในขณะที่เมธอดถูกเรียกใช้แบบซิงโครนัสการติดต่อแบบไคลเอ็นต์กับเกตเวย์เหล่านี้สามารถทำได้โดยง่ายโดยใช้ RPC แต่เนื่องจากเรา กำลังใช้การรับส่งข้อความสำหรับการสื่อสารระหว่างเกตเวย์กับไคลเอ็นต์ข้อความอาจเป็นวิธีที่ดีในการใช้การติดต่อสื่อสารแบบไคลเอ็นต์กับเกตเวย์ด้วยเช่นกันดังนั้นการสื่อสารทั้งหมดระหว่างเกตเวย์และลูกค้าจะทำได้โดยการส่งข้อความเนื่องจากทั้งหมดนี้ คอมโพเนนต์ถูกเขียนขึ้นในภาษาจาวา JMS นำเสนอทางเลือกที่ง่ายสำหรับการเป็นระบบการรับส่งข้อความนี่คือการสร้าง Message Bus หรือสถาปัตยกรรมที่จะช่วยให้ระบบในอนาคตสามารถทำงานร่วมกับระบบในปัจจุบันได้โดยไม่ต้องมีการเปลี่ยนแปลงโครงสร้างการรับส่งข้อความเพียงเล็กน้อยหรือไม่มีเลย วิธีการทำงานทางธุรกิจของโปรแกรมสามารถใช้งานได้ง่ายโดยโปรแกรมประยุกต์อื่น ๆ ที่ธนาคารพัฒนาคอมโพเนนต์ Java Communicating with JMS. JMS เป็นเพียงข้อกำหนดและเราจำเป็นต้องตัดสินใจเกี่ยวกับระบบการส่งข้อความที่สอดคล้องกับ JMS เราตัดสินใจที่จะใช้ IBM MQSeries JMS เนื่องจาก ธนาคารเป็นร้านค้าของ IBM โดยใช้เซิร์ฟเวอร์แอ็พพลิเคชัน WebSphere และผลิตภัณฑ์ IBM อื่น ๆ ดังนั้นเราจะใช้ MQSeries เนื่องจากเราได้รับบริการแล้ว ave โครงสร้างพื้นฐานการสนับสนุนในสถานที่และใบอนุญาตเว็บไซต์ของผลิตภัณฑ์คำถามต่อไปคือวิธีการเชื่อมต่อระบบการส่งข้อความ MQSeries กับเซิร์ฟเวอร์ C Contribute แบบสแตนด์อโลนและ TIBCO ข้อมูลตลาดที่ใช้และเซิร์ฟเวอร์ Analytics Engine เราต้องการวิธีการสำหรับผู้บริโภค MQSeries มีการเข้าถึงข้อความ TIB แต่อย่างไรบางทีเราอาจใช้รูปแบบข้อความนักแปลเพื่อแปลข้อความ TIB เป็นข้อความ MQSeries แม้ว่าไคลเอ็นต์ C สำหรับ MQSeries ทำหน้าที่เป็น Message Translator โดยใช้มันจะเสียสละความเป็นอิสระของ JMS server และถึงแม้ว่า TIBCO จะมี Java API, สถาปนิกลูกค้าและผู้จัดการได้ปฏิเสธมันดังนั้นวิธี Message Translator จึงต้องถูกยกเลิกไปสะพานที่เชื่อมต่อจากเซิร์ฟเวอร์ TIB ไปยังเซิร์ฟเวอร์ MQSeries จำเป็นต้องมีการสื่อสารระหว่าง C กับ Java เราสามารถใช้ CORBA ได้ แต่แล้วสิ่งที่เกี่ยวกับการรับส่งข้อความ ดูรูปแบบข้อความนักแปลที่แสดงว่าเกี่ยวข้องกับ Channel Adaptor ในการใช้โปรโตคอลการสื่อสารหัวใจของช่อง อะแดปเตอร์คือการเชื่อมต่อระบบที่ไม่ใช่ข้อความเข้ากับระบบการรับส่งข้อความคู่ของอะแดปเตอร์ช่องสัญญาณที่เชื่อมต่อระบบส่งข้อความสองระบบคือสะพานข้อความวัตถุประสงค์ของสะพาน Messaging คือการถ่ายโอนข้อความจากระบบการรับส่งข้อความหนึ่งไปยังอีกระบบหนึ่งนั่นคือสิ่งที่เรากำลังทำอยู่ ความซับซ้อนที่เพิ่มขึ้นของการสื่อสารภายใน Java Java กับ C เราสามารถใช้สะพาน Messaging Messaging แบบ cross language โดยใช้ Channel Adapter s และ CORBA เราจะสร้างเซิร์ฟเวอร์ Adapter Adapters 2 ช่องที่มีน้ำหนักเบาหนึ่งใน C ที่จัดการการสื่อสารกับ TIB และอีกหนึ่งช่อง Java สื่อสารการจัดการกับ JMS ทั้งสอง Channel Adaptor ซึ่งเป็น Message Endpoint ของตัวเองจะสื่อสารกันผ่านทาง CORBA เช่นเดียวกับทางเลือกของเราสำหรับ MQSeries เราจะใช้ CORBA แทน JNI เนื่องจากเป็นมาตรฐานของ บริษัท สะพานส่งข้อความจะใช้ข้อความจำลองที่มีประสิทธิภาพ การแปลระหว่างระบบการรับส่งข้อความที่เข้ากันไม่ได้และภาษาอื่น ๆ นักแปลข้อความโดยใช้ Adapte Channel แผนภาพถัดไปแสดงการออกแบบระบบในปัจจุบันรวมถึงเกตเวย์และส่วนประกอบอื่น ๆ นี่คือตัวอย่างที่ดีของแอ็พพลิเคชันรูปแบบเราได้รวมเอาอะแดปเตอร์ระบบสองช่องเข้ากับโปรโตคอลที่ไม่ใช่ข้อความเพื่อใช้รูปแบบข้อความนักแปลซึ่งมีประสิทธิภาพในการใช้รูปแบบหนึ่งเพื่อใช้งานอื่น นอกจากนี้เราเปลี่ยนบริบทของ Channel Adaptor เพื่อเชื่อมโยงระบบข้อความสองระบบเข้ากับโปรโตคอลการแปลข้ามภาษาที่ไม่ใช่ข้อความแทนที่จะเชื่อมต่อระบบการรับส่งข้อความไปยังระบบข้อความที่ไม่ใช่ข้อความระบบปัจจุบันที่มี Channel Adapters. Structuring Channels. A key การทำงานกับรูปแบบไม่ได้เป็นเพียงการรู้ว่าควรใช้รูปแบบใด แต่ยังต้องใช้อย่างมีประสิทธิภาพมากที่สุดการใช้รูปแบบแต่ละอย่างจะต้องคำนึงถึงเฉพาะด้านบัญชีของแพลตฟอร์มเทคโนโลยีตลอดจนเกณฑ์การออกแบบอื่น ๆ ส่วนนี้ใช้กระบวนการค้นพบเดียวกันเพื่อค้นหา การใช้ช่องทางเผยแพร่ - ลงทะเบียนที่มีประสิทธิภาพมากที่สุดในบริบทของเซิร์ฟเวอร์ข้อมูลตลาดที่สื่อสารกับ t เขาเป็นเครื่องมือวิเคราะห์ข้อมูลตลาดเรียลไทม์มาพร้อมกับฟีดข้อมูลตลาดเซิร์ฟเวอร์ C ที่เผยแพร่ข้อมูลตลาดใน TIB ฟีดข้อมูลตลาดใช้ช่องทางเผยแพร่ - สมัครสมาชิกแยกต่างหากสำหรับแต่ละพันธบัตรเป็นราคาที่เผยแพร่นี้อาจดูเหมือนเล็กน้อยนับตั้งแต่ แต่ละพันธบัตรใหม่ต้องใช้ช่องทางใหม่ของตัวเอง แต่นี่ไม่ใช่เรื่องรุนแรงมากนักเนื่องจากคุณไม่จำเป็นต้องสร้างช่องใน TIBCO แต่ช่องทางต่างๆจะถูกอ้างอิงโดยชุดชื่อหัวข้อที่เรียกว่าวิชาเซิร์ฟเวอร์ TIBCO จะกรองการไหลของข้อความเดี่ยวตามหัวข้อ , การส่งแต่ละเรื่องที่ไม่ซ้ำกันไปช่องทางเสมือนเดียวผลของการที่มีช่องทางข้อความที่มีน้ำหนักเบามากเราสามารถสร้างระบบที่เผยแพร่ในไม่กี่ช่องทางและสมาชิกสามารถฟังเฉพาะสำหรับราคาที่พวกเขามีความสนใจในนี้จะต้องมีสมาชิกที่จะใช้ กรองข้อความหรือผู้บริโภคเลือกที่จะกรองการไหลของข้อมูลทั้งหมดสำหรับราคาพันธบัตรที่น่าสนใจและตัดสินใจว่าควรมีการประมวลผลข้อความแต่ละข้อความตามที่ได้รับหรือไม่ e ข้อมูลตลาดถูกเผยแพร่ในช่องทุ่มเทพันธบัตรสมาชิกสามารถลงทะเบียนสำหรับการปรับปรุงในชุดของพันธบัตรนี้ได้อย่างมีประสิทธิภาพช่วยให้สมาชิกสามารถกรองโดยเลือกรับสมัครช่องและได้รับการปรับปรุงความสนใจมากกว่าการตัดสินใจหลังจากที่ได้รับข้อความเป็นสิ่งสำคัญที่ โปรดทราบว่าการใช้ช่องสัญญาณหลายช่องเพื่อหลีกเลี่ยงการกรองคือการใช้ช่องทางการรับส่งข้อความที่ไม่เป็นไปตามมาตรฐานอย่างไรก็ตามในบริบทของเทคโนโลยี TIBCO เรากำลังตัดสินใจว่าจะใช้หรือเป็นเจ้าของตัวกรองหรือใช้ช่องกรองที่มีอยู่ภายใน TIBCO แทนหรือไม่ว่าจะใช้จำนวนมากหรือไม่ channel องค์ประกอบถัดไปที่เราต้องออกแบบคือเครื่องมือการวิเคราะห์เซิร์ฟเวอร์ CIB อีกเครื่องหนึ่งที่จะแก้ไขข้อมูลการตลาดและเผยแพร่ใหม่ไปยัง TIB แม้ว่าจะอยู่นอกขอบเขตของการพัฒนา Java JMS ของเราเรากำลังทำงานอย่างใกล้ชิดกับ C ทีมออกแบบมาตั้งแต่เราเป็นลูกค้าหลักของ Analytics หลัก ๆ ปัญหาในมือก็คือการหาโครงสร้างช่องที่มีประสิทธิภาพมากที่สุด rebroadcas t ข้อมูลการตลาดที่แก้ไขใหม่เนื่องจากเรามีช่องข้อความเฉพาะสำหรับหนึ่งพันธบัตรที่รับมาจากฟีดข้อมูลราคาตลาดแล้วจึงเป็นเรื่องที่ควรปรับเปลี่ยนข้อมูลตลาดและเผยแพร่ข้อมูลตลาดใหม่ที่มีการแก้ไขเกี่ยวกับพันธบัตรเฉพาะช่องข้อความ แต่จะไม่เป็นเช่นนั้น ทำงานตั้งแต่การวิเคราะห์การปรับราคาพันธบัตรเป็นการค้าเฉพาะถ้าเราเผยแพร่ข้อมูลใหม่ที่แก้ไขในช่องข้อความพันธบัตรเราจะทำลายความสมบูรณ์ของข้อมูลโดยการแทนที่ข้อมูลตลาดทั่วไปกับข้อมูลเฉพาะของพ่อค้าในทางกลับกันเราอาจมีประเภทข้อความที่แตกต่างออกไป trader specific market data that we publish on the same channel allowing subscribers to decide which message they are interested in to avoid destroying the data integrity But then clients will have to implement their own filters to separate out messages for other traders Additionally, there will a substantial increase in messages received by subscribers, placing an unnecessary burden on them. There are two options. One Channel per Trader Each trader has a designated channel for the modified market data This way, the original market data remains intact and each trader application can listen to its specific traders Message Channel for the modified price updates. One Channel per trader per Bond Create one Message Channel per-trader per-bond solely for the modified market data of that bond For example, the market data for bond ABC would be published on channel Bond ABC while the modified market data for trader A would be published on Message Channel Trader A, Bond ABC , modified market data for trader B on Trader B, Bond ABC, and so on. One channel per trader. One channel per bond per trader. There are advantages and disadvantages to each approach The per-bond approach, for example, uses a lot more Message Channel In the worst-case scenario, the number of Message Channel will be the number of bonds total multiplied by the number of traders We can put upper bounds on the number of channels that will be created since we know that there are only around 20 traders and they never price more than a couple hundred bonds This puts the upper limit below the 10,000 range, which is not so outlandish compared to the nearly 100,000 Message Channel the market data price feed is using Also, since we are using the TIB and Message Channel are quite inexpensive, the number of Message Channel s is not a severe issue On the other hand, the sheer number of Message Channel s could be a problem from a management perspective Every time a bond is added a channel for each trader must be maintained This could be severe in a very dynamic system Our system, however, is essentially static It also has an infrastructure for automatically managing Message Channel s This combined with the inherited architecture of a legacy component using a similar approach minimizes the downside This is not to say we should make an unnecessarily excessive number of Message Channel s Rather, we can implement an architectural approach that uses a large number of Message Channel s when there is a reason. And there is a reason in this case that comes down to the location of logic If we implement the per trader approach, the Analytics Engine needs logic to group input and output channels This is because the input channels from the Analytics Engine are per bond and the output Message Channel s would be per trader, requiring the Analytics Engine to route all analytics input from multiple bonds for a particular trader to a trader specific output Message Channel This effectively turns the analytics engine into a Content-Based Router to implement custom routing logic for our application. Following the Message Bus structure, the Analytics Engine is a generic server that could be used by several other systems in the So we don t want to cloud it with system specific functionality On the other hand, the per-bond approach works since the idea of a trader owning the analytics output of bond prices is a company accepted practice The per-bond a pproach keeps the Message Channel separation of the market data feed intact, while adding several more Message Channel s Before we reach the client, we want a Content-Based Router to combine these several channels into a manageable number of channels We don t want the client application running on the trader s desktop to be listening to thousands or tens of thousands of Message Channel s Now the question becomes where to put the Content-Based Router We could simply have the C TIB Channel Adapter forward all of the messages to the Pricing Gateway on a single Message Channel This is bad for two reasons we would be splitting up the business logic between C and Java, and we would lose the benefit of the separate Message Channel s on the TIB side allowing us to avoid filtering later in the data flow Looking at our Java components, we could either place it in the Pricing Gateway or create an intermediary component between the Pricing Gateway and the client. In theory, if we persisted the bond - based separation of Message Channel s all the way to the client, the Pricing Gateway would rebroadcast pricing information with the same channel structure as the Pricing Gateway and Analytics Engine This means a duplication of all of the bond dedicated TIB channels in JMS Even if we create an intermediary component between the Pricing Gateway and the client, the Pricing Gateway will still have to duplicate all of the channels in JMS On the other hand, implementing logic directly in the Pricing Gateway allows us to avoid duplicating the large number of channels in JMS allowing us to create a much smaller number of channels in the order of one per trader The Pricing Gateway registers itself through the C TIB Channel Adapter as a consumer for each bond of every trader in the system Then the Pricing Gateway will forward each specific client only the messages related to that particular trader This way, we only use a small number of Message Channel s on the JMS end, while maximizing the ben efit of the separation on the TIB end. The complete Market Data Flow to the client. The Message Channel layout discussion is a good example of how integrating patterns is important The goal here was to figure out how to effectively use the Message Channel s Saying you use a pattern isn t enough You need to figure out how to best implement it and incorporate into your system to solve the problems at hand Additionally, this example shows business forces in action If we could implement business logic in any of our components, we could have gone with the per trader approach and implemented an overall more simple approach with many less channels. Selecting a Message Channel. Now that we know the mechanics of the communication between the Java JMS components and the C TIBCO components, and we have seen some Message Channel structuring, we need to decide which type of JMS Message Channel s the Java components should use to communicate Before we can choose between the different Message Channels av ailable in JMS, let s look at the high level message flow of the system We have two gateways Pricing and Contribution communicating with the client Market data flows to the client from the Pricing Gateway which sends it out to the Contribution Gateway The client application sends message to the Pricing Gateway to alter the analytics being applied to each bond The Contribution Gateway also sends messages to the Client application relaying the status of the price updates to the different trading venues. The system message flow. The JMS specification describes two Message Channel types, Point-to-Point Channel JMS Queue and Publish-Subscribe Channel JMS Topic Recall that the case for using publish-subscribe is to enable all interested consumers to receive a message while the case for using point-to-point is to ensure that only one eligible consumer receives a particular message. Many systems would simply broadcast messages to all client applications, leaving each individual client application to decide for itself whether or not to process a particular message This will not work for our application since there are a large number of market data messages being sent to each client application If we broadcast market data updates to uninterested trader, we will be unnecessarily wasting client processor cycles deciding whether or not to process a market data update. Point-to-Point Channel s initially sound like a good choice since the clients are sending messages to unique servers and visa versa But it was a business requirement that traders may be logged in to multiple machines at the same time If we have a trader logged in at two workstations simultaneously and a point-to-point price update is sent, only one of the two client applications will get the message This is because only one consumer on a Point-to-Point Channel can receive a particular message Notice that only the first of each group of a trader s client applications receives the message. Point-to-Point Messaging for Pri ce Updates. We could solve this using the Recipient List pattern, which publishes messages to a list of intended recipients, guaranteeing that only clients in the recipient list will receive messages Using this pattern, the system could create recipient lists with all client application instances related to each trader Sending a message related to a particular trader would in turn send the message to each application in the recipient list This guarantees all client application instances related to a particular trader would receive the message The downside of this approach is that it requires quite a bit of implementation logic to manage the recipients and dispatch messages. Recipient List for Price Updates. Even though point-to-point could be made to work, let s see if there is a better way Using Publish-Subscribe Channel s, the system could broadcast messages on trader specific channels rather than client application specific channels This way, all client applications processing messages for a single trader would receive and process the message. Publish-Subscribe Messaging for Price Updates. The downside of using Publish-Subscribe Channel s is that unique message processing is not guaranteed with the server components It would be possible for multiple instances of a server component to be instantiated and each instance process the same message, possibly sending out invalid prices. Recalling the system message flow, only a single communication direction is satisfactory with each Message Channel Server-to-client communication with publish-subscribe is satisfactory while client-to-server communication is not and client-server communication with point-to-point is satisfactory while server-client is not Since there is no need to use the same Message Channel in both directions, we can use each Message Channel only one direction Client-to-server communication will be implemented with point-to-point while server-to-client communication will be implemented with publish-subscribe Using this combination of Message Channel s, the system benefits from direct communication with the server components using point-to-point messaging and the multicast nature of publish-subscribe without either of the drawbacks. Message flow with Channel Types. Problem Solving With Patterns. Patterns are tools and collections of patterns are toolboxes They help solve problems Some think that patterns are only useful during design Following the toolbox analogy, this is like saying that tools are only useful when you build a house, not when you fix it The fact is that patterns are a useful tool throughout a project when applied well In the following sections we will use the same pattern exploration process we used in the previous section to solve problems in our now working system. Flashing Market Data Updates. Traders want table cells to flash when new market data is received for a bond, clearly indicating changes The Java client receives messages with new data which triggers a client data ca che update and eventually flashing in the table The problem is that updates come quite frequently The GUI thread stack is becoming overloaded and eventually freezing the client since it can t respond to user interaction We will assume that the flashing is optimized and concentrate on the data flow of messages through the updating process An examination of performance data shows the client application is receiving several updates a second some updates occurred less than a millisecond apart Two patterns that seem like they could help slow down the message flow are Aggregator and Message Filter. A first thought is to implement a Message Filter to control the speed of the message flow by throwing out updates received a small amount of time after the reference message As an example, lets say that we are going to ignore messages within 5 milliseconds of each other The Message Filter could cache the time of the last acceptable message and throw out anything received within the next 5 milliseco nds While other applications may not be able to withstand data loss to such an extent, this is perfectly acceptable in our system due to the frequency of price updates. Time based Message Filter. The problem with this approach is that not all data fields are updated at the same time Each bond has approximately 50 data fields displayed to the user including price We realize that not every field is updated in every message If the system ignores consecutive messages, it may very well be throwing out important data. The other pattern of interest is the Aggregator The Aggregator is used to manage the reconciliation of multiple, related messages into a single message, potentially reducing the message flow The Aggregator could keep a copy of the bond data from the first aggregated message, then update only new or changed fields successive messages Eventually the aggregated bond data will be passed in a message to the client For now, lets assume that the Aggregator will send a message every 5 mil liseconds like the Message Filter Later, we ll explore another alternative. Aggregator with partial successive updates. The Aggregator like any other pattern, is not a silver bullet it has its pluses and minuses that need to be explored One potential minus is that implementing an Aggregator would reduce the message traffic by a great amount in our case only if many messages are coming in within a relatively short time regarding the same bond On the other hand, we would accomplish nothing if the Java client only receives updates for one field across all of the traders bonds For example, if we receive 1000 messages in a specified timeframe with 4 bonds of interest, we would reduce the message flow from 1000 to 4 messages over that timeframe Alternatively, if we receive 1000 messages in the same timeframe with 750 bonds of interest, we will have reduced the message flow from 1000 to 750 messages relatively little gain for the amount of effort A quick analysis of the message updates proves t hat the Java client receives many messages updating fields of the same bond, and therefore related messages So, Aggregator is in fact a good decision. What s left is to determine how the Aggregator will know when to send a message it has been aggregating The pattern describes a few algorithms for the Aggregator to know when to send the message These include algorithms to cause the aggregator to send out its contents after a certain amount of time has elapsed, after all required fields in a data set have been completed, and others The problem with all of these approaches is that the aggregator is controlling the message flow, not the client And the client is the major bottleneck in this case, not the message flow. This is because the Aggregator is assuming the consumers of its purged messages the client application in this case are Event-Driven Consumer s, or consumers that rely on events from an external source We need to turn the client into a Polling Consumer or a consumer that continu ously checks for messages, so the client application can control the message flow We can do this by creating a background thread that continuously cycles through the set of bonds and updates and flashes any changes that have occurred since the last iteration This way, the client controls when messages are received and as a result, guarantees that it will never become overloaded with messages during high update periods We can easily implement this by sending a Command Message to the Aggregator initiating an update The Aggregator will respond with a Document Message containing the set of updated fields that the client will process. The choice of Aggregator over Message Filter is clearly a decision based solely on the business requirements of our system Each could help us solve our performance problems, but using the Message Filter would solve the problem at cost of the system data integrity. Major Production Crash. With the performance of the flashing fixed, we are now in production One day the entire system goes down MQSeries crashes, bringing several components down with it We struggle with the problem for a while and finally trace it back to the MQSeries dead letter queue an implementation of the Dead Letter Channel The queue grows so large that it brings down the entire server After exploring the messages in the dead letter queue we find they are all expired market data messages This is caused by slow consumers, or consumers that do not process messages fast enough While messages are waiting to be processed, they time out see the Message Expiration pattern and are sent to the Dead Letter Channel The excessive number of expired market data messages in the dead letter queue is a clear indication that the message flow is too great messages expire before the target application can consume them We need to fix the message flow and we turn to patterns for help slowing down the message flow. A reasonable first step is to explore solving this problem with the Aggregator as we recently used this pattern to solve the similar flashing market data control rate problem The system design relies on the client application to immediately forward market data update messages to the trading venues This means the system cannot wait to collect messages and aggregate them So the Aggregator must be abandoned. There are two other patterns that deal with the problem of consuming messages concurrently Competing Consumers and Message Dispatcher Starting with Competing Consumers the benefit of this pattern is the parallel processing of incoming messages This is accomplished using several consumers on the same channel Only one consumer processes each incoming message leaving the others to process successive messages Competing Consumers however, will not work for us since we are using Publish-Subscribe Channel s in server-to-client communication Competing Consumers on a Publish-Subscribe Channel channel means that all consumers process the same incoming message This results in mo re work without any gain and completely misses the goal of the pattern This approach also has to be abandoned. On the other hand, the Message Dispatcher describes an approach whereby you add several consumers to a pool Each consumer can run its own execution thread One main Message Consumer listens to the Channel and delegates the message on to an unoccupied Message Consumer in the pool and immediately returns to listening on the Message Channel This achieves the parallel processing benefit of Competing Consumers but works on Publish-Subscribe Channel s. The Message Dispatcher in context. Implementing this in our system is simple We create a single JMSListener called the Dispatcher, which contains a collection of other JMSListener s called Performers When the onMessage method of the Dispatcher is called, it in turn picks a Performer out of the collection to actually process the message The result of which is a Message Listener the Dispatcher that always returns immediately This guarantee s a steady flow of message processing regardless of the message flow rate Additionally, this works equally well on a Publish-Subscribe Channel s as it does on a Point-to-Point Channel s With this infrastructure, messages can be received by the client application at almost any rate If the client application is still slow to process the message after receiving them, the client application can deal with the delayed processing and potentially outdated market data rather than the messages expiring in the JMS Message Channel. The crash discussed in this section and the fix using the Message Dispatcher is an excellent example of the limits of applying patterns We encountered a performance problem based on a design flaw not allowing the client to process messages in parallel This greatly improved the problem, but did not completely fix it This is because the real problem was the client becoming a bottleneck This couldn t be fixed with a thousand patterns We later addressed this problem by refac toring the message flow architecture to route messages directly from the Pricing Gateway to the Contribution Gateway So patterns can help design and maintain a system, but don t necessarily make up for poor upfront design. Throughout this chapter, we have applied patterns to several different aspects of a bond trading system including solving initial upfront design problems and fixing a nearly job threatening production crash with patterns We also saw these patterns as they already exist in third party product, legacy components, and our JMS and TIBCO messaging systems Most importantly, these are real problems with the same types of architectural, technical and business problems we experience as we design and maintain our own systems Hopefully reading about applying patterns to this system helps give you a better understanding of the patterns as well as how to apply them to your own systems. Want to keep up-to-date Follow My Blog. Want to read more in depth Check out My Articles. Want to s ee me live See where I am speaking next. Find the full description of this pattern in Enterprise Integration Patterns Gregor Hohpe and Bobby Woolf ISBN 0321200683 650 pages Addison-Wesley. From Enterprise Integration to Enterprise Transformation. My new book describes how architects can play a critical role in IT transformation by applying their technical, communication, and organizational skills with 37 episodes from large-scale enterprise IT. Parts of this page are made available under the Creative Commons Attribution license You can reuse the pattern icon, the pattern name, the problem and solution statements in bold , and the sketch under this license Other portions of the text, such as text chapters or the full pattern text, are protected by copyright. Messaging Patterns Integration Patterns in Practice Case Study Bond Trading System.

No comments:

Post a Comment