Commit graph

303 commits

Author SHA1 Message Date
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
b9de047b7a Merge branch 'master' of https://github.com/nicholaskariniemi/grub 2014-10-10 19:56:04 +00:00
Nicholas Kariniemi
066d8aa615 Remove unused Procfile, delete generate js on deploy 2014-10-10 19:56:01 +00: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
24a077b277 Update Clojure, ClojureScript, Om, and core.async 2014-10-10 18:00:13 +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
f0e16817b5 Update deploy script 2014-10-06 18:47:11 +00:00
Nicholas Kariniemi
e3eb2639cc Remove log statement 2014-10-06 20:17:00 +03:00
Nicholas Kariniemi
48e7ef1b50 Merge branch 'differential_sync' 2014-10-06 19:27:32 +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
Nicholas Kariniemi
76074e5b5c Optimization: don't reset grub/recipe edit state if unchanged 2014-10-05 00:12:09 +03:00
Nicholas Kariniemi
86bfdf80e4 Simplify MongoDB code by just storing whole state
- Every time it receives a state, it blows away the existing one and
  puts in the new one.
- There's a non-zero probability of losing the entire state if the
  server fails after blowing away the previous state and before
  inserting the new.
2014-10-05 00:12:09 +03:00
Nicholas Kariniemi
48ba2c5449 Possibly fully working (poorly tested) 2014-10-04 22:52:03 +03:00
Nicholas Kariniemi
d174b2236e Integration test for client server sync 2014-09-28 09:35:20 +03:00
Nicholas Kariniemi
e3e763469a Clean up tests slightly 2014-09-26 21:04:17 +03:00
Nicholas Kariniemi
15b9ec8927 Convert tests to Midje 2014-09-26 20:51:23 +03:00
Nicholas Kariniemi
d7708e1382 Move to shared state 2014-09-26 11:53:19 +03:00
Nicholas Kariniemi
d01814fe3c Merge client and server state handling -- wip 2014-09-25 23:23:29 +03:00
Nicholas Kariniemi
e6b3c10396 Move state handling to shared code 2014-09-25 23:16:57 +03:00
Nicholas Kariniemi
39307f5a73 Test at "server agent" level 2014-09-25 23:14:26 +03:00