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