-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinterface.lisp
More file actions
105 lines (66 loc) · 1.41 KB
/
interface.lisp
File metadata and controls
105 lines (66 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#|
Note that every request unambiguously identifies both participants.
(ensure record) ->
(ensure record)
(insert record) ->
(ensure record)
(select filter) ->
(ensure record)*
(delete filter) ->
(delete filter)*
(update filter record) ->
(ensure record)*
;; SUBSCRIPTIONS
; subscription
(subscribe filter)
->
(accept filter)
(clock sts)
(ensure record)*
; remove subscription
(subscribe nil)
->
(clock sts)
; full sync subscription
(subscribe t)
->
(accept t)
(clock sts)
(ensure record)*
; create subscription on client:
(accept t)
(clock cts)
(ensure record)*
->
(subscribe t)
; changes from - to, server initiated
(since sts0)
(clock sts1)
(ensure record)*
(delete filter)*
<-
t
; changes from - to, client initiated
(since cts0)
(clock cts1)
(ensure record)*
(delete filter)*
->
t
SO....What do we have to implement??
Client and server implement the same!
Also, one code base!
Data per friend:
(subscription (filter*) sync-ts) ; sync-ts is the local ts until which the remote has all data
(acception (filter*) sync-ts) ; sync-ts is the remote ts until which the local has all data
|#
(ql:quickload :clack)
(ql:quickload :alexandria)
(ql:quickload :ningle)
(defvar *app* (make-instance 'ningle:<app>))
(setf (ningle:route *app* "/")
"Welcome to api4!")
(setf (ningle:route *app* "/instruction" :method :GET)
#'(lambda (params)
(prin1-to-string params)))
(clack:clackup *app*)