Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

V10 sr2

20 views

Published on

Tango V10 Status Report 2

Published in: Software
  • Be the first to comment

  • Be the first to like this

V10 sr2

  1. 1. V10 Refactoring Status Report 2
  2. 2. 16/11/16 Igor Khokhriakov 2 DevVarDoubleArray ● New pattern – Remove inheritance – Replace impl subclass with template ● _var → std::shared_ptr
  3. 3. 16/11/16 Igor Khokhriakov 3 ReadWriteLock
  4. 4. 16/11/16 Igor Khokhriakov 4 Misc ● CORBA::string_dup ● CORBA::Type → DevType ● Spit CxxTests ● Improved README
  5. 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. 6. 16/11/16 Igor Khokhriakov 6 Omnithread → std::thread ● Requires deep analyzes and understanding ● TANGO threads:
  7. 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. 8. 16/11/16 Igor Khokhriakov 8 Tango::polling
  9. 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. 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. 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. 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. 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. 14. 16/11/16 Igor Khokhriakov 14 Misc thoughts ● CORBA creates a new request handler thread if previous one is busy, otherwise reuses
  15. 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. 16. 11/16/16 Igor Khokhriakov 16 SAVE THE DATE: Friday November, 4th @19:00 Pub `Au Bureau` Meal is for free ;)
  17. 17. 16/11/16 Igor Khokhriakov 17 FIN

×