Skip to content

Commit

Permalink
tested mongodb change_stream capability
Browse files Browse the repository at this point in the history
  • Loading branch information
rkube committed Feb 28, 2020
1 parent 7b352a0 commit b8eb60b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,20 @@ This mitigates the low bandwidth available to the compute nodes to the outside.
stream name: shotnum-channelid.bp shotnum-channelid.s1.bp
```
This scenario is currently not fully.


# Interfacing to visualizers

Visualizers interface to the streaming data analysis through the database. Using the mongodb backend allows
for siphoning the analysis as it comes in through change streams:
[https://docs.mongodb.com/manual/changeStreams/](https://docs.mongodb.com/manual/changeStreams/)

Let's say `processor_mpi.py` is running with runID `1ABCDE`, writing updates into mongodb. By default,
delta writes the analysis results into the collection test_analysis_RUNID, where RUNID is just the 6-char
runID. In a python session you can follow them
```
cursor = db.test_analysis_1ABCDE.watch()
for change in cursor():
print(change)
print("")
```
3 changes: 0 additions & 3 deletions backends/backend_mongodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ def store_metadata(self, cfg, dispatch_seq):
cfg.update(j)
cfg.update({"timestamp": datetime.datetime.utcnow().strftime("%Y-%m-%d %X UTC")})


cfg.update({"description": "metadata"})

try:
Expand Down Expand Up @@ -104,8 +103,6 @@ def store_task(self, task, future=None, dummy=True):
# Add a time stamp to the scheme
storage_scheme["time"] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")



if dummy:
storage_scheme["results"] = result
print(storage_scheme)
Expand Down
File renamed without changes
Binary file added doc/delta_network_perf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b8eb60b

Please sign in to comment.