27. Open
None
(just a launcher)
Main Process
(Node.js)
Renderer Process
(Chromium)
React.js
Common Lisp Process
(SBCL)
Spawn
+ Common Lisp
28. Open
None
(just a launcher)
Main Process
(Node.js)
Renderer Process
(Chromium)
React.js
Common Lisp Process
(SBCL)
Spawn
Bidirectional Communication
+ Common Lisp
29. Open
None
(just a launcher)
Main Process
(Node.js)
Renderer Process
(Chromium)
React.js
Common Lisp Process
(SBCL)
Spawn
Bidirectional Communication
+ Common Lisp
Make an SBCL executable and bundle it
32. Open
None
(just a launcher)
Main Process
(Node.js)
Renderer Process
(Chromium)
React.js
Common Lisp Process
(SBCL)
Spawn
Bidirectional Communication
+ Common Lisp
33. Open
None
(just a launcher)
Main Process
(Node.js)
Renderer Process
(Chromium)
React.js
Common Lisp Process
(SBCL)
Spawn
Bidirectional Communication
+ Common Lisp
34. Communication between CL and Browser
• MUST be bidirectional
• MUST be asynchronous
• MUST be easy to handle with JavaScript
• SHOULD be real-time
35. We decided to use JSON-RPC
• Small specification
• Not depends on a specific transport layer
• We use WebSocket
• http://jsonrpc.org
• https://github.com/fukamachi/jsonrpc
47. Benefits of Flux + JRPC Architecture
• JavaScript part is just a UI renderer
• Business logics are all in Common Lisp
• Common Lisp functions are easy to test
• Other components are also easy to test
• Because they all talk in JSON-RPC
54. Coin Counter IC Card Reader Printer
API Server
Hard to share data.
55. “brain”, the central storage
• All data(state) are in Common Lisp part
• What service the user chose?
• How much money is in the user’s IC card?
• How many coins are in?
• etc.
• It’s just a hash-table (with thread-lock).