2. Outline
• What Chilinet is
• Project Goals
• How it works
• Execution Flows
• Result
• Expectations
• Future work
3. What is Chilinet?
• A client module to support communication
between machines
• Zmq messaging library & CZMQ binding
• C++
4. Project Goals
- Add network module to Qimchi framework
- Implement simple demo to show how it works
5. Project Goals
I want Chilinet to be..
1. Simple
2. General / Flexible
3. Replaceable
6. Chilinet Elements
• ChiliClient
- svrIP, ports
- subscribe, getInit, pubRequest, storeState
• State
- topic, default value, current state
- Read/write state file from/to disk
- Fire event (When state is updated)
7. How does it work?
Client Server
- Graphic user interface
QML
Event Generation / Handling
Qimchi Framework
- Command line interface
- Sends initState
- Propagates update
- Store state
Chilitags Chilinet
8. How does it work? - State
• State can be saved to a file in the server.
9. How does it work? – Events handling
ü Codes in the grey box are executed when a user clicks a button.
ü Codes in the grey box are executed when a user’s tag is detected.
10. How does it work? - Sockets
- Among patterns provided by ZMQ, I used PUB-SUB,
REP-REQ, PUSH-PULL patterns.
• PUB-SUB
• REP-REQ
• PULL-PUSH
• REQ-ROUTER
• DEALER-REP
• DEALER-ROUTER
• DEALER-DEALER
• ROUTER-ROUTER
• PAIR-PAIR
13. Execution Flow - getInit
Client Server
OnStateUpdated OnCompleted
6 5 4 1
1. Client.getInit(topic, defaultval)
5. State.setState(newState)
6. StateUpdated
2
3
REQ REP
QML
State ChiliClient
Initialization(topic, value)
If there is a file containing
previous state information,
read it and
return previous state.
If there is no file,
save a default value to a file
and return default value got
from client.
14. Execution Flow – pub/sub
Client Server
On
Clicked
2
3
4
On
Completed
5
.
.
1
PUSH
OnState
Updated
6
QML
State ChiliClient
1. Client.subscribe(topic)
2. Client.pubRequest(topic, value)
5. Subscribed
6. StateUpdated
updateState ( )
PULL
writeFile(topic, value, false)
Overwrite a value (new state)
to a file named topic.
15. Execution Flow – storeState
Client Server
QML
1 2
4 5
OnClicked
OnStateUpdated
3
PUSH
ChiliClient
State
PULL
1. State.updateState(value)
2. StateUpdated
3. Client.storeState(topic, value)
5. Server.writeFile(fileName. Value, true)
writeFile(topic, value, true)
Write a value (new state)
to a file named topic.
You can consider this
function as a function
for logging.
16. Demo
• One central server
• Many clients
• Three states
• Input event from mouse
18. Project Goals – Flexibility
• We can store any string as
a state.
• Application can have as
many states as we want.
• You can make a state to be
shared or not.
Possible msgs
- Position of tangible object
- Events
Next step / Previous step /
Help / Check solution /
show axes / construction lines /
freeze
19. Project Goals – Replaceablility
In QML, No ZMQ code/elements needed. Good!
20. Result
Anyone can get the codes from github.
ChiliClient : https://github.com/heejeongkim/qimchi/tree/chilinet0820
ChiliSvr : https://github.com/heejeongkim/ChiliSvr
22. Future work
• Can it be more simple?
• Mask options for propagation
• File Download (roll book, activity file etc..)
• 1:1 communication
Is it simple enough?