Commit graph

283 commits

Author SHA1 Message Date
Nicholas Kariniemi
42afcc5b77 Extend one-way sync tests 2015-11-29 01:36:08 +02:00
Nicholas Kariniemi
e9c006281a Simplify algorithm: remove count, unused if statement 2015-11-29 01:16:44 +02:00
Nicholas Kariniemi
a003fc9db7 Working specification for a simple sync 2015-11-29 00:42:10 +02:00
Nicholas Kariniemi
cd7397ef40 CSP: Re-specification of sync algorithm with Datomic in mind
- This specification ignores the actual diffing/patching itself and
  concerns itself only with the current database, server, and client t
  or database time.
2015-11-26 22:09:33 +02:00
Nicholas Kariniemi
798f1a5891 Working sync for single client (no changes from others) 2015-11-20 02:14:07 -05:00
Nicholas Kariniemi
a8d8ae56c5 Rework sync - client reworked, wip 2015-11-19 23:33:30 -05:00
Nicholas Kariniemi
838e6497d4 Correct fetching of database values
The existing way did not work for local database for some reason. The
	existing approach tried to fetch all attributes for a given
	entity. We now specifically fetch the attributes we want for an
	entity, which is better anyway.
2015-11-17 23:01:18 -05:00
Nicholas Kariniemi
bde07221a6 More sync musings 2015-11-17 22:49:53 -05:00
Nicholas Kariniemi
fac9486787 Add Datomic to README and clean up 2015-11-17 20:38:46 -05:00
Nicholas Kariniemi
432ee48162 Buffers - Add a client-side download buffer as well
--> No deadlock but state explosion. Not sure if syncing still works.
2015-08-26 22:22:34 +03:00
Nicholas Kariniemi
e47f79ac7b Buffers - wip2 2015-08-26 22:09:10 +03:00
Nicholas Kariniemi
52af4dfd68 Buffers - wip 2015-08-26 21:35:22 +03:00
Nicholas Kariniemi
619f21e4d8 CSP: Introduce a one element sliding buffer when DB changes are saved
This fixes a deadlock issue from the previous model.
2015-08-24 18:40:01 +03:00
Nicholas Kariniemi
b3b8011719 CSP: Fix issue over which events can be communicated when 2015-08-19 20:50:08 +03:00
Nicholas Kariniemi
0cebe1f5ab Fix deadlock in previous implementation
by only allowing new inputs if the previous one has been "acked".

I.e. if you send one diff, you don't process any more diffs until you
	receive a diff back. This is something specified in the Neil Frasier
	paper and also something needed to prevent deadlock.
2015-08-15 18:32:25 +03:00
Nicholas Kariniemi
9f32a03d04 Force processes to synchronize on communication
Use parallel operation || instead of the (unsynchronized) interleave
	operation |||.
2015-08-15 18:18:04 +03:00
Nicholas Kariniemi
1b99e49563 Add identifiers to events 2015-08-15 16:51:25 +03:00
Nicholas Kariniemi
da0541518e Send unsent client changes to server 2015-08-15 16:38:20 +03:00
Nicholas Kariniemi
cd94b6a966 More complicated - loads but untested 2015-08-15 15:14:27 +03:00
Nicholas Kariniemi
14a8c340e0 More complicated model with multiple server/client pairs - wip 2015-08-15 14:58:59 +03:00
Nicholas Kariniemi
30bbfff308 More nuance - send back diff 2015-08-13 22:41:30 +03:00
Nicholas Kariniemi
bdc78589ea Slight improvement 2015-08-13 22:25:18 +03:00
Nicholas Kariniemi
2736769825 Basic CSP "sync" - some working CSPM 2015-08-13 21:58:03 +03:00
Nicholas Kariniemi
cec0060984 db - wip 2015-08-10 06:45:09 +03:00
Nicholas Kariniemi
d71f9260e8 Rework sync - also actually remove removed items 2015-07-17 00:36:12 +03:00
Nicholas Kariniemi
755d06f32b Rework sync - wip
- Fetch full sync state from database, save upsert changes to database
2015-07-17 00:25:24 +03:00
Nicholas Kariniemi
8b11c119f2 Separate server and client syncing
- They vary in important ways anyway so it's more clear this way
2015-07-15 10:39:29 +03:00
Nicholas Kariniemi
455cf54bc9 Add another short delay to make async sync test pass 2015-07-05 22:09:42 +03:00
Nicholas Kariniemi
1260c4418c Report sync differences in failed tests more explicitly 2015-07-05 22:02:57 +03:00
Nicholas Kariniemi
3c96ea5fbf Add back midje and remove unused test 2015-07-05 21:59:17 +03:00
Nicholas Kariniemi
0a6add1ae3 Add script for releasing: build + deploy 2015-07-05 18:45:55 +03:00
Nicholas Kariniemi
6d7bf48570 Add script for running server, restarting when new version pushed 2015-07-05 18:39:47 +03:00
Nicholas Kariniemi
6ca589e3e6 Update Om to fix production build issues 2015-07-05 10:30:21 +03:00
Nicholas Kariniemi
9e6d900596 Hard-code database schema in database namespace
- Loading it separately doesn't make sense for e.g. production builds.
2015-07-04 23:01:19 +03:00
Nicholas Kariniemi
543143026b Remove cljx steps from release build script 2015-07-04 22:59:29 +03:00
Nicholas Kariniemi
6a27015edb Remove unused source path causing problems 2015-07-04 22:59:17 +03:00
Nicholas Kariniemi
90e512d59d Minor cleanup of db code 2015-07-04 22:33:36 +03:00
Nicholas Kariniemi
efbc29b0ad Use (possibly persistent) database URI from env var 2015-07-04 22:23:16 +03:00
Nicholas Kariniemi
c1e0dfbf0b Switch to Datomic for storage (not persistent)
- Still not taking advantage of Datomic features but using it as a
  simple dump for Clojure data structures.
2015-07-04 22:22:47 +03:00
Nicholas Kariniemi
fdd9baf23b Use new reader conditionals and remove cljx deps 2015-07-02 20:25:28 +03:00
Nicholas Kariniemi
4f5e91bf29 Update dependencies 2015-06-30 20:46:39 +03:00
Nicholas Kariniemi
cc3dbdca62 Remove dead code (mostly unused requires) 2015-06-16 20:03:32 +03:00
Nicholas Kariniemi
f7b79a5e2a Fix bug where grubs/recipes could not be deleted
- Fixed by using keywords as map keys client-side. Monger "keywordizes"
  keys by default and it's easier to change client side than to remove
  that behavior.
2015-06-16 19:57:41 +03:00
Nicholas Kariniemi
6794e81ea9 Update from clojure 1.7.0-alpha1 -> 1.7.0-RC1 2015-06-16 19:55:04 +03:00
Nicholas Kariniemi
c7caec9a3b Comment out user.clj to make building work 2015-06-08 23:37:30 +03:00
Nicholas Kariniemi
48067a00f6 Deploy script just copies files over 2015-05-01 09:01:22 +03:00
Nicholas Kariniemi
021ec1b531 Use /ws path for websocket connections
- Less confusion around upgrading HTTP connections to WebSocket
2015-05-01 08:56:37 +03:00
Nicholas Kariniemi
1eb7136d27 Use relative paths for websocket connection 2015-05-01 08:46:02 +03:00
Nicholas Kariniemi
10148897c8 Use relative paths for static files 2015-04-30 23:38:15 +03:00
Nicholas Kariniemi
ab67f02172 Use ws or wss based on location protocol 2015-04-30 23:31:32 +03:00