SlideShare a Scribd company logo
1 of 17
V10 Refactoring
Status Report 2
16/11/16 Igor Khokhriakov 2
DevVarDoubleArray
โ— New pattern
โ€“ Remove inheritance
โ€“ Replace impl subclass with template
โ— _var โ†’ std::shared_ptr
16/11/16 Igor Khokhriakov 3
ReadWriteLock
16/11/16 Igor Khokhriakov 4
Misc
โ— CORBA::string_dup
โ— CORBA::Type โ†’ DevType
โ— Spit CxxTests
โ— Improved README
16/11/16 Igor Khokhriakov 5
Isolating ORB
โ— ORB_var (used mainly for Notifyd)
โ— Remove NotifdEvent(Consumer/Supplier)
โ— TangORBProvider declares interface
TODO:
โ— Initialize ORB at start (server or client)
16/11/16 Igor Khokhriakov 6
Omnithread โ†’ std::thread
โ— Requires deep analyzes and understanding
โ— TANGO threads:
16/11/16 Igor Khokhriakov 7
Omnithread โ†’ std::thread
โ— Tasks (KillThread, RestartServer etc) โ†’
std::async
โ€“ One shot action
โ— Threads (PollThread, KeepAliveThread etc)
โ€“ Start method creates new std::thread and detaches
โ— PollThread โ†’ Tango::polling framework
16/11/16 Igor Khokhriakov 8
Tango::polling
16/11/16 Igor Khokhriakov 9
Code rewritten
โ— standard naming patterns (for-loop);
โ— Avoid:
โ€“ nested ifs, huge switches, incomplete variable names;
โ— each method does exactly one thing;
โ— extract general purpose classes;
โ— execution pattern: create than execute;
โ— each class in its own header+source (export as few as needed by the
user)
โ— Eliminate dead code
โ€“ always true/false; fixed value params; etc
โ— Use integral types do calculate time
16/11/16 Igor Khokhriakov 10
TODO
โ— Finish refactoring
โ— Fix tests
โ— Unit tests (compute_next_sleep etc)
โ— Merge PollThInfo and PollThread โ†’
polling::engine
โ— Move (refactor?) other polling related files to
::polling
16/11/16 Igor Khokhriakov 11
Some thoughts
โ— Merge ApiUtil and Util
โ— Util is basically a DS, i.e. merge Util and server
โ— DeviceProxy (Database) has a connection (not inherit)
โ— Replace ifs with polymorphism (Db, FileDb; DeviceServer,
PyDeviceServer etc)
โ— Replace map<device,smth> with corresponding Device field
โ— Distinguish Heartbeat, StoreSubDevices
and Polling threads
โ— Implement event driven service bus
16/11/16 Igor Khokhriakov 12
Some thoughts: events
โ— ORB layer generates events for incoming
requests (attr read/write, cmd, pipe etc)
โ— Server generates events: new attribute value,
state change etc
16/11/16 Igor Khokhriakov 13
Some thoughts: service
โ— AccessControl
โ— Logging
โ— Blackbox
โ— Polling (push new values)
โ— Attribute Read/Writter
โ— Command executor
โ— User defined services
16/11/16 Igor Khokhriakov 14
Misc thoughts
โ— CORBA creates a new request handler thread if
previous one is busy, otherwise reuses
16/11/16 Igor Khokhriakov 15
Further TODOs
โ— Put efforts into GitHub promotion:
โ€“ ESRF deployment pipe line
โ€“ Move other projects (mavenize Java !!!)
โ€“ Source distribution
โ€“ Test on Windows (MSVC #)
โ— Setup REST server @ESRF
โ— CLion training course
โ— ???
11/16/16 Igor Khokhriakov 16
SAVE THE DATE:
Friday November, 4th
@19:00
Pub `Au Bureau`
Meal is for free ;)
16/11/16 Igor Khokhriakov 17
FIN

More Related Content

Recently uploaded

CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Badshah Nagar Lucknow best Female service
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Badshah Nagar Lucknow best Female serviceCALL ON โžฅ8923113531 ๐Ÿ”Call Girls Badshah Nagar Lucknow best Female service
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Badshah Nagar Lucknow best Female service
anilsa9823
ย 
CHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
ย 
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online โ˜‚๏ธ
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online  โ˜‚๏ธCALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online  โ˜‚๏ธ
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online โ˜‚๏ธ
anilsa9823
ย 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
ย 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
bodapatigopi8531
ย 

Recently uploaded (20)

CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Badshah Nagar Lucknow best Female service
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Badshah Nagar Lucknow best Female serviceCALL ON โžฅ8923113531 ๐Ÿ”Call Girls Badshah Nagar Lucknow best Female service
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Badshah Nagar Lucknow best Female service
ย 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
ย 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
ย 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
ย 
CHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
ย 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
ย 
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online โ˜‚๏ธ
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online  โ˜‚๏ธCALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online  โ˜‚๏ธ
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online โ˜‚๏ธ
ย 
Shapes for Sharing between Graph Data Spacesย - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spacesย - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spacesย - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spacesย - and Epistemic Querying of RDF-...
ย 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
ย 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
ย 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlanโ€™s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlanโ€™s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlanโ€™s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlanโ€™s ...
ย 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
ย 
Vip Call Girls Noida โžก๏ธ Delhi โžก๏ธ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida โžก๏ธ Delhi โžก๏ธ 9999965857 No Advance 24HRS LiveVip Call Girls Noida โžก๏ธ Delhi โžก๏ธ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida โžก๏ธ Delhi โžก๏ธ 9999965857 No Advance 24HRS Live
ย 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
ย 
call girls in Vaishali (Ghaziabad) ๐Ÿ” >เผ’8448380779 ๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธ
call girls in Vaishali (Ghaziabad) ๐Ÿ” >เผ’8448380779 ๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธcall girls in Vaishali (Ghaziabad) ๐Ÿ” >เผ’8448380779 ๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธ
call girls in Vaishali (Ghaziabad) ๐Ÿ” >เผ’8448380779 ๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธ
ย 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
ย 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
ย 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
ย 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
ย 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
ย 

Featured

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
ย 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
ย 

Featured (20)

2024 State of Marketing Report โ€“ by Hubspot
2024 State of Marketing Report โ€“ by Hubspot2024 State of Marketing Report โ€“ by Hubspot
2024 State of Marketing Report โ€“ by Hubspot
ย 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
ย 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
ย 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ย 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
ย 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
ย 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
ย 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
ย 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
ย 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
ย 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
ย 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
ย 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
ย 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
ย 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
ย 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
ย 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
ย 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
ย 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
ย 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
ย 

V10 sr2

  • 2. 16/11/16 Igor Khokhriakov 2 DevVarDoubleArray โ— New pattern โ€“ Remove inheritance โ€“ Replace impl subclass with template โ— _var โ†’ std::shared_ptr
  • 3. 16/11/16 Igor Khokhriakov 3 ReadWriteLock
  • 4. 16/11/16 Igor Khokhriakov 4 Misc โ— CORBA::string_dup โ— CORBA::Type โ†’ DevType โ— Spit CxxTests โ— Improved README
  • 5. 16/11/16 Igor Khokhriakov 5 Isolating ORB โ— ORB_var (used mainly for Notifyd) โ— Remove NotifdEvent(Consumer/Supplier) โ— TangORBProvider declares interface TODO: โ— Initialize ORB at start (server or client)
  • 6. 16/11/16 Igor Khokhriakov 6 Omnithread โ†’ std::thread โ— Requires deep analyzes and understanding โ— TANGO threads:
  • 7. 16/11/16 Igor Khokhriakov 7 Omnithread โ†’ std::thread โ— Tasks (KillThread, RestartServer etc) โ†’ std::async โ€“ One shot action โ— Threads (PollThread, KeepAliveThread etc) โ€“ Start method creates new std::thread and detaches โ— PollThread โ†’ Tango::polling framework
  • 8. 16/11/16 Igor Khokhriakov 8 Tango::polling
  • 9. 16/11/16 Igor Khokhriakov 9 Code rewritten โ— standard naming patterns (for-loop); โ— Avoid: โ€“ nested ifs, huge switches, incomplete variable names; โ— each method does exactly one thing; โ— extract general purpose classes; โ— execution pattern: create than execute; โ— each class in its own header+source (export as few as needed by the user) โ— Eliminate dead code โ€“ always true/false; fixed value params; etc โ— Use integral types do calculate time
  • 10. 16/11/16 Igor Khokhriakov 10 TODO โ— Finish refactoring โ— Fix tests โ— Unit tests (compute_next_sleep etc) โ— Merge PollThInfo and PollThread โ†’ polling::engine โ— Move (refactor?) other polling related files to ::polling
  • 11. 16/11/16 Igor Khokhriakov 11 Some thoughts โ— Merge ApiUtil and Util โ— Util is basically a DS, i.e. merge Util and server โ— DeviceProxy (Database) has a connection (not inherit) โ— Replace ifs with polymorphism (Db, FileDb; DeviceServer, PyDeviceServer etc) โ— Replace map<device,smth> with corresponding Device field โ— Distinguish Heartbeat, StoreSubDevices and Polling threads โ— Implement event driven service bus
  • 12. 16/11/16 Igor Khokhriakov 12 Some thoughts: events โ— ORB layer generates events for incoming requests (attr read/write, cmd, pipe etc) โ— Server generates events: new attribute value, state change etc
  • 13. 16/11/16 Igor Khokhriakov 13 Some thoughts: service โ— AccessControl โ— Logging โ— Blackbox โ— Polling (push new values) โ— Attribute Read/Writter โ— Command executor โ— User defined services
  • 14. 16/11/16 Igor Khokhriakov 14 Misc thoughts โ— CORBA creates a new request handler thread if previous one is busy, otherwise reuses
  • 15. 16/11/16 Igor Khokhriakov 15 Further TODOs โ— Put efforts into GitHub promotion: โ€“ ESRF deployment pipe line โ€“ Move other projects (mavenize Java !!!) โ€“ Source distribution โ€“ Test on Windows (MSVC #) โ— Setup REST server @ESRF โ— CLion training course โ— ???
  • 16. 11/16/16 Igor Khokhriakov 16 SAVE THE DATE: Friday November, 4th @19:00 Pub `Au Bureau` Meal is for free ;)

Editor's Notes

  1. Split polling tread into polling, heartbeat and subdevices Execute poll commands synchroniously in the same thread Use priority queue to store workitems EvenytSystem Code rewritten: statndard patterns (for-loop); avoid nested ifs, huge switches, incomplete variable names, each method does exactly one thing; extract general purpose classes; execution pattern: create than execute; each class in its own header+source
  2. Thank you for Clion license โ€“ HZG expires. So its very cool one more year for tango-controls