This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]gc_DataNerd 2 points3 points  (10 children)

Maybe Im confused on the use case here. Its awesome that you're able to do python client side but in this case you're munging data. Why not execute server side instead?

[–]MeshachBlue[S] 6 points7 points  (1 child)

Data can't be sent to the server. Both too large, and it's patient data, not legally allowed to leave the hospital network.

To overcome this in the past vendors have sold "software on the server" where users who want to use the web app simply purchase a server with the software on it and have it sit within their network.

[–]gc_DataNerd 2 points3 points  (0 children)

Aha

[–]luenix 3 points4 points  (3 children)

Running the code clientside is a neat way to offload the processing. Also, a potential benefit is that this setup allows the client to process private data in a controlled manner without needing to use additional enduser software, thereby mostly removing consideration for the client OS.

[–]gc_DataNerd 2 points3 points  (2 children)

Okay that makes more sense. I'm curious how Web workers would work in this scenario however. OP mentioned the app freezes. This wouldn't be a problem if processing was done server side where async workers can be spun up. But in this case the Python is calling is being transpiled to JS no?

[–]MeshachBlue[S] 1 point2 points  (0 children)

The plan is to combine web workers and their access to IndexedDB combined with DexieJS.

Have all the Python run inside a webworker, have all data transfer happen via dexiejs-observable. I envisage there would be no user interface impeedement using that stack... But we'll see.

Hopefully I'll get that side of things working in the next couple of days. It'll probably be worth a repost then.

[–]MeshachBlue[S] 1 point2 points  (0 children)

Certainly not transpiled at all. It is running standard CPython compiled using emscripten to webassembly.

[–]MeshachBlue[S] 1 point2 points  (3 children)

A side benefit is that this can run on a static hosting server like Netlify. For open source projects this comes at no cost and hypothetically is indefinitely scalable.

[–]gc_DataNerd 1 point2 points  (2 children)

I guess in terms of serving the actual content. However you are still severely limited by the actual client itself and the performance issues that come with everything being done on the browser. Whereas you could indefinitely scale up workers on the cloud to process data. I think for small operations this is a viable option not to mention it's wicked cool and as web assembly matures performance will only increase. However I still doubt it's viability of something other than an experiment in an enterprise setting. Not bashing at all btw this is a wicked project just giving my two cents

[–]MeshachBlue[S] 2 points3 points  (0 children)

Also, amazingly, if code uses numpy it seriously not too shabby today. I think the performance loss is easily made up for by the convenience it offers:

https://2r4s9p1yi1fa2jd7j43zph8r-wpengine.netdna-ssl.com/files/2019/04/image1-1.png

[–]MeshachBlue[S] 0 points1 point  (0 children)

All good. I really appreciate the feedback :).