Commit graph

168 commits

Author SHA1 Message Date
Nicholas Kariniemi
79e64596ae Add back sync integration tests 2014-10-21 23:26:27 +03:00
Nicholas Kariniemi
8fe22b9a52 Use timestamp tags instead of hashes
- Hashing was slow and we weren't using the hash properties much anyway
2014-10-21 23:25:42 +03:00
Nicholas Kariniemi
19ca650078 Fix tests - sync integration tests commented out 2014-10-19 11:49:02 +03:00
Nicholas Kariniemi
9591e9fd93 Rename state <--> sync namespaces 2014-10-19 10:53:14 +03:00
Nicholas Kariniemi
e14b3d2a29 Optimization: don't set grub/recipe state if state is unchanged 2014-10-15 22:51:53 +03:00
Nicholas Kariniemi
78d5617356 Keep state history with state in one atom 2014-10-15 22:14:32 +03:00
Nicholas Kariniemi
e5309fcd69 Correct use of swap! 2014-10-15 21:26:28 +03:00
Nicholas Kariniemi
0bf8344c62 Reset state on full sync 2014-10-15 21:22:53 +03:00
Nicholas Kariniemi
96dd93309d Merge branch 'master' of github.com:nicholaskariniemi/grub 2014-10-15 21:06:11 +03:00
Nicholas Kariniemi
8dbb410667 Bounce favicon requests 2014-10-15 21:05:07 +03:00
Nicholas Kariniemi
fd249cefca Use swap! in diff handling to update state
- Ensures state updates always use the current state as a basis.
2014-10-15 14:46:12 +03:00
Nicholas Kariniemi
dd5bf7a53a Clean up state loop 2014-10-15 11:07:55 +03:00
Nicholas Kariniemi
f496fb51e5 Pull state history into state handler loop
- This is incidental complexity and other code doesn't need to know
  about it
2014-10-14 22:49:04 +03:00
Nicholas Kariniemi
7ada33bdfc Make server, client agent APIs more similar 2014-10-13 22:02:32 +03:00
Nicholas Kariniemi
b5a668e6ee Push state history into state handling 2014-10-13 21:54:52 +03:00
Nicholas Kariniemi
dffdc7cabb Remove init-server from state handling 2014-10-13 21:27:24 +03:00
Nicholas Kariniemi
a367d5cb25 Comment out integration test 2014-10-13 21:27:07 +03:00
Nicholas Kariniemi
8f5814e07e Simplify state functions 2014-10-13 20:48:13 +03:00
Nicholas Kariniemi
5fd54b62e6 Make state syncing code more explicit 2014-10-12 23:15:40 +03:00
Nicholas Kariniemi
64b1bb05a7 Start client code like server side 2014-10-12 22:57:00 +03:00
Nicholas Kariniemi
73cf89f9d5 Move state handling atoms to global system var 2014-10-12 13:41:19 +03:00
Nicholas Kariniemi
7b3b509eaf Use Stuart Sierra reloaded workflow 2014-10-12 13:29:48 +03:00
Nicholas Kariniemi
8ef1522c1e Remove atoms from server,db so app can be reloaded 2014-10-12 12:56:57 +03:00
Nicholas Kariniemi
ec27d58e31 Drop compojure dependency
It was hardly used and makes control flow, reloaded workflow more difficult.
2014-10-12 12:25:15 +03:00
Nicholas Kariniemi
58373496f0 Use transit for communication for possible speed improvements 2014-10-10 22:48:39 +03:00
Nicholas Kariniemi
75b58d58a3 Add thread-safe printer 2014-10-10 22:15:49 +03:00
Nicholas Kariniemi
fd1f9bddef Don't swap in new client states as they come, only in handler 2014-10-10 22:15:28 +03:00
Nicholas Kariniemi
16b61063ec Update tests, client also sends ACK messages 2014-10-10 22:09:38 +03:00
Nicholas Kariniemi
87b88f9340 Update unit tests to not use core async 2014-10-10 22:02:51 +03:00
Nicholas Kariniemi
e581f34afc Add more tests for history states 2014-10-10 20:58:04 +03:00
Nicholas Kariniemi
421a921fd4 Convert sync tests to midje 2014-10-10 20:48:08 +03:00
Nicholas Kariniemi
07e85a4d30 Only update edited recipes if the recipe changed 2014-10-10 20:39:47 +03:00
Nicholas Kariniemi
14427e89d9 Return "out" event instead of directly pushing out event 2014-10-10 20:03:53 +03:00
Nicholas Kariniemi
63153ecc5d Pull states atom out of event handling 2014-10-10 19:56:22 +03:00
Nicholas Kariniemi
af7c9535df Rename handle-message -> handle-event 2014-10-10 19:41:52 +03:00
Nicholas Kariniemi
e833a48034 Correct typo 2014-10-10 19:36:54 +03:00
Nicholas Kariniemi
604a1ff1d8 Pass in single event to event handler 2014-10-10 19:36:45 +03:00
Nicholas Kariniemi
88d1a0db1a Rename in, out -> <remote, >remote 2014-10-10 19:06:28 +03:00
Nicholas Kariniemi
bef0e8d4e7 Separate event handling into handler methods 2014-10-10 19:03:33 +03:00
Nicholas Kariniemi
52ce9ffb42 Use different events for full sync, full sync request 2014-10-10 19:03:22 +03:00
Nicholas Kariniemi
0f06d21767 Tag local state changes
to avoid passing remote changes back to remote
2014-10-10 18:45:51 +03:00
Nicholas Kariniemi
423b962d2c View takes in state changes, pushes out state changes 2014-10-10 18:35:22 +03:00
Nicholas Kariniemi
d6670f4157 Update React: 0.11.1 -> 0.11.2 2014-10-10 17:52:27 +03:00
Nicholas Kariniemi
4b743f420b Reorganize sync tests into integration 2014-10-06 22:18:39 +03:00
Nicholas Kariniemi
12ac165f24 Store max 20 history states, reset on client when server ACKs 2014-10-06 22:14:40 +03:00
Nicholas Kariniemi
e3eb2639cc Remove log statement 2014-10-06 20:17:00 +03:00
Nicholas Kariniemi
bd47ec1099 Remove log statements 2014-10-06 19:21:06 +03:00
Nicholas Kariniemi
7126a6b7b3 Server assumes client gets messages sent 2014-10-06 19:18:08 +03:00
Nicholas Kariniemi
821ba079e0 Add timeout to make tests work even if channel pull blocks 2014-10-06 17:58:46 +03:00
Nicholas Kariniemi
8850552838 Send empty diffs as ACKs on both client/server
On receiving ACK, update "current server state".
2014-10-05 00:12:09 +03:00