More Generalized AJAX

Our lab creates free drug-discovery apps that run both in the cloud (through a browser) and on the desktop (using nw.js). These apps are based mostly on Typescript. The web-based versions communicate with our remote servers through ajax calls, mostly to node.js cgi scripts. We need to be able to do the same on the desktop versions of our apps.

This project involves creating a Typescript function that:

  1. Accepts POST data as input.
  2. Detects whether or not it’s being run from within a browser or nw.js.
  3. Passes the POST data through AJAX if it’s in a browser, or to a local file if running in nw.js.
  4. Accepts a callback function to process the returned data.

The AJAX should be managed using JQuery’s $.ajax function.

Menu System

Our lab creates applications that run on both the web (through the browser) and the desktop (through nw.js). These applications are based mostly on Javascript (Typescript, really). The way web and desktop apps manage menus are very different, though. Desktop menus tend to look like this:

img_57d070a453b83

 

Web menus look like this:

We need a single Typescript function that accepts a json object that fully describes how a menu should behave (i.e., the structure, which functions to call when clicked, etc.). This function should support disabled menu items, as well as separator bars. Based on a boolean parameter (isBrowser), the function renders a browser-based menu  or a windows-based/nw.js menu.

Multi-Processor Python

e830b9082ef3023ecd0b470de7444e90fe76e6d21bb618419df7c8_640_serverIn our lab, we often need to run independent python functions on multiple processors. By independent, I mean the functions don’t need to communicate with each other (embarrassingly parallel). Our current scripts divide the individual “tasks” evenly in the beginning and then run each “chunk” (i.e., subset of all tasks) on a separate processor. But occasionally one of these chunks will take much longer to finish than the others, so the processors aren’t all used optimally.

  1. There needs to be periodic “load balancing.”
  2. We need a solution that works on windows if possible.
  3. We’re looking for something written in native python that can be easily incorporated into our projects, without requiring the installation of any third-party modules.