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 ;)
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
Thank you for Clion license โ HZG expires. So its very cool one more year for tango-controls