DeltaStreams Changesets on steroids
I am... <ul>Göran Krampe,  [email_address] Live north of Stockholm, Sweden Wife, daughter, cat, boat, garden... Consultant...
History (as memory permits) <ul><li>Started in aug  2007
Significant help by  Matthew Fulmer
Development slow at times
...revived before the summer! </li></ul>
Inspiration (cool stuff that actually works) <ul><li>Monticello
Changesets
Darcs
git </li></ul>
Monticello (Avi's baby born from an OOPSLA discussion) <ul><li>Really nice for cooperative development!
But... </li><ul><li>Needs common history
Snapshot centered (not changes)
Package granularity </li></ul></ul>
Changesets (sneaky beasts...) <ul><li>Nice ”patches” by being simple!
But... </li><ul><li>Non intuitive implementation
Captures too little
No ordering
Could be much better... </li></ul></ul>
Darcs (DSCM magic deluxe) <ul><li>True out of order cherry picking!
True out of order revert!
Truly change centered
New ”types” of changes
Selective commit </li></ul>
Git (The KING in the real world) <ul>” THAT is what merging is all about. Not smart merges. Stupid merges with good tools ...
Upcoming SlideShare
Loading in …5
×

Deltastreams

644 views
595 views

Published on

Deltastreams: Changesets on Steroids by Goran Krampe, ESUG09, Brest, France.

Published in: Technology, Health & Medicine
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
644
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Deltastreams

  1. 1. DeltaStreams Changesets on steroids
  2. 2. I am... <ul>Göran Krampe, [email_address] Live north of Stockholm, Sweden Wife, daughter, cat, boat, garden... Consultant & group manager at MSC Smalltalker since 1994 approximately </ul>
  3. 3. History (as memory permits) <ul><li>Started in aug 2007
  4. 4. Significant help by Matthew Fulmer
  5. 5. Development slow at times
  6. 6. ...revived before the summer! </li></ul>
  7. 7. Inspiration (cool stuff that actually works) <ul><li>Monticello
  8. 8. Changesets
  9. 9. Darcs
  10. 10. git </li></ul>
  11. 11. Monticello (Avi's baby born from an OOPSLA discussion) <ul><li>Really nice for cooperative development!
  12. 12. But... </li><ul><li>Needs common history
  13. 13. Snapshot centered (not changes)
  14. 14. Package granularity </li></ul></ul>
  15. 15. Changesets (sneaky beasts...) <ul><li>Nice ”patches” by being simple!
  16. 16. But... </li><ul><li>Non intuitive implementation
  17. 17. Captures too little
  18. 18. No ordering
  19. 19. Could be much better... </li></ul></ul>
  20. 20. Darcs (DSCM magic deluxe) <ul><li>True out of order cherry picking!
  21. 21. True out of order revert!
  22. 22. Truly change centered
  23. 23. New ”types” of changes
  24. 24. Selective commit </li></ul>
  25. 25. Git (The KING in the real world) <ul>” THAT is what merging is all about. Not smart merges. Stupid merges with good tools to help you do the right thing when the right thing isn't _so_ obvious that you can just leave it to the machine.&quot; <ul><ul><ul><ul><ul><li>Linus Torvalds, 2006 </li></ul></ul></ul></ul></ul></ul>
  26. 26. ...so Delta (a ”patch” the Smalltalk way) <ul><li>Simple and change oriented
  27. 27. Not relying on history
  28. 28. Good base for selective commits
  29. 29. Can revert and cherry pick
  30. 30. No magic! </li></ul>
  31. 31. Design (my confused brain) <ul><li>A Delta is an ordered list of Changes
  32. 32. Class hierarchy of Changes
  33. 33. Each change: </li><ul><li>Captures state ”before” and ”after”
  34. 34. Captures enough state to do revert </li></ul></ul>
  35. 35. Pin pointing intent (capturing more stuff) <ul>Changeset Delta ” method is this” ”add this method” ”change this method to that” ” remove selector” ”remove this method” ” class definition” ”add ivar x” ”remove ivar x” ”change superclass” etc etc etc </ul>
  36. 36. Demo 1 (pretty please, feed us code!) <ul><li>Trivial stuff: </li><ul><li>Create a Delta
  37. 37. Record some changes
  38. 38. Explore it </li></ul></ul>
  39. 39. Design (back to boring slides...) <ul>Object #() DSAnnotatedObject #('timeStamp' 'properties') DSChange #('number') DSBasicClassChange #('className') DSClassChange #('superclassName' 'instVarNames' 'classVarNames' 'classInstVarNames' 'poolDictionaryNames' 'category' 'type' 'comment' 'stamp') DSClassCategoryChange #('oldCategory') DSClassCommentChange #('oldComment' 'oldStamp') DSClassCreatedChange #() DSClassNameChange #('oldName') DSClassRemovedChange #() DSClassSuperclassChange #('oldSuperclassName') DSClassTypeChange #('oldType') DSVarsChange #('oldVars') DSClassInstVarsChange #() DSClassVarsChange #() DSInstVarsChange #() DSSharedPoolVarsChange #() DSMethodChange #('selector' 'meta' 'source' 'protocol' 'stamp') DSMethodAddedChange #() DSMethodProtocolChange #('oldProtocol') DSMethodRemovedChange #() DSMethodSelectorChange #('oldSelector') DSMethodSourceChange #('oldSource' 'oldStamp') DSCompositeChange #() DSChangeSequence #('changes') DSCompositeClassChange #('category') DSCompositeClassAddedChange #() DSCompositeClassDeletedChange #() DSDoIt #('code') </ul>
  40. 40. Design (some common sense and separation of concerns) <ul><li>A visitor does the actual apply
  41. 41. The recording is separated
  42. 42. Serialization is separated
  43. 43. There are tests :) </li></ul>
  44. 44. Standalone object (breaking rules) <ul><li>No references! Only plain data
  45. 45. Easily serialized
  46. 46. Easily manipulated
  47. 47. Easily created and thrown away </li></ul>
  48. 48. Load and Apply (an extra step!) <ul><li>Load into the image (from wherever)
  49. 49. Now you can: </li><ul><li>Edit it
  50. 50. Apply to the image atomically
  51. 51. Create an anti Delta </li></ul></ul>
  52. 52. Revert (neat!) revert &quot;Revert this delta by applying its anti Delta to the image.&quot; ^ self asAntiChange apply asAntiChange &quot;Return a new Delta that, when applied, reverts each change of this Delta in reverse order.” | anti | anti := DSDelta name: 'undo ' , self name. self propertiesDo: [: key : val | anti propertyAt: key put: val ]. self changes reverseDo: [: each | anti addChange: each asAntiChange]. ^ anti
  53. 53. Revert of ”dirty” apply (a clever trick!) <ul>So what happens if you ”force” apply a Delta in another image? How can it revert? <ul><ul><ul><li>Answer: </li></ul></ul></ul>Record a sister Delta when applying! </ul>
  54. 54. Demo 2 (now watch him fail...) <ul><li>Harder stuff: </li><ul><li>Create a Delta
  55. 55. Record more changes
  56. 56. Pick out a few, revert those
  57. 57. Revert all </li></ul></ul>
  58. 58. Real world use (can we use the darn thing?) <ul><li>Replace Changeset finally
  59. 59. When MC fails (or is undesirable)
  60. 60. Fork cross pollination
  61. 61. Commit tool
  62. 62. Advanced image changelog
  63. 63. A base for other SCM solutions </li></ul>
  64. 64. Funky ideas (cool stuff we probably should NOT do) <ul><li>More Change types: </li><ul><li>Move method
  65. 65. Rename method
  66. 66. Refactorings? </li></ul><li>Delta reordering, ”commuting” </li></ul>
  67. 67. Streams (Yeah!? What about that?) <ul><li>Chronological queue of Deltas
  68. 68. Per package, person, image etc
  69. 69. Categorized streams
  70. 70. Publish/Discover/Subscribe
  71. 71. ...can also be derived from MC repositories </li></ul>
  72. 72. Delta unit test debugging (Advanced foot shootage) <ul><li>Put a halt in one of the revert tests
  73. 73. Fix a bug when halted
  74. 74. Do the usual proceed and be happy... or?
  75. 75. Conclusion: Meta programming is fun! </li></ul>
  76. 76. To do (pretty please with sugar on top, help!) <ul><li>Cleanups (messy due to reorganisation)
  77. 77. Tirade hooked in fully
  78. 78. A DualDeltaSorter tool
  79. 79. Getting it used!
  80. 80. Streams... </li></ul>
  81. 81. Questions (as if all is not 100% clear...) <ul>? </ul>

×