• Przemyslaw Kaminski's avatar
    [websockets] initial implementation of async notifications · 9de83328
    Przemyslaw Kaminski authored
    I'm currently able to do the following:
    - start gargantext-server (as it hosts central exchange and
    dispatcher, currently)
    - start a websocket connection:
      websocat ws://localhost:8008/ws
    - subscibe to a topic (in websocat):
      {"request": "subscribe", "topic": {"type": "update_tree", "node_id":
      15}}
    - optionally subscibe to other node_ids or start other websocat's with
      different subscriptions (can be multiple)
    - fire up
      cabal v2-run gargantext-central-exchange -- client
      This triggers a node_id: 15 and node_id: 16 notification to be sent
    
    You can send your own notifications, e.g. with Python:
    import json
    import nanomsg as n
    s = n.Socket(n.PUSH)
    s.connect('tcp://localhost:5560')
    s.send(json.dumps({'type': 'update_tree_first_level', 'node_id': 15}))
    9de83328
Name
Last commit
Last update
..
gargantext-admin Loading commit data...
gargantext-cbor2json Loading commit data...
gargantext-central-exchange Loading commit data...
gargantext-cli Loading commit data...
gargantext-db-obfuscation Loading commit data...
gargantext-golden-file-diff Loading commit data...
gargantext-import Loading commit data...
gargantext-init Loading commit data...
gargantext-invitations Loading commit data...
gargantext-phylo Loading commit data...
gargantext-phylo-profile Loading commit data...
gargantext-server Loading commit data...
gargantext-upgrade Loading commit data...
metrics Loading commit data...
backup Loading commit data...
build Loading commit data...
gargantext_stop Loading commit data...
gargantext_tmux Loading commit data...
ghci Loading commit data...
gource Loading commit data...
haddock Loading commit data...
init Loading commit data...
install Loading commit data...
install-cabal2stack Loading commit data...
psql Loading commit data...
setup-ci-environment Loading commit data...
sql Loading commit data...
track_haskell_deps.hs Loading commit data...
update-project-dependencies Loading commit data...