concurrent.framework.samples.reversemd5 package

Submodules

concurrent.framework.samples.reversemd5.app module

Sample application using Concurrent to perform a reverse hash

File: reversemd5.app.py

class concurrent.framework.samples.reversemd5.app.MD5HashReverseNode(compmgr, init=None, cls=<class 'concurrent.framework.samples.reversemd5.app.MD5HashReverseNode'>)[source]

Bases: concurrent.framework.nodes.applicationnode.ApplicationNode

Reverse hash application

app_init()[source]

Called just before the main entry. Used as the initialization point instead of the ctor

app_main()[source]

Applications main entry

get_task_system()[source]

Called from the base class when we are connected to a MasterNode and we are able to send computation tasks over

push_tasksystem_response(result)[source]

We just added a ITaskSystem on the framwork. Check result for more info

work_finished(result, task_system)[source]

Called when the work has been done, the results is what our ITaskSystem sent back to us. Check resukt for more info

class concurrent.framework.samples.reversemd5.app.MD5HashReverseTaskSystem(jobs=128, hash_number=1763965)[source]

Bases: concurrent.core.async.api.ITaskSystem

The task system that is executed on the MasterNode and controls what jobs are required to be performed

gather_result(master)[source]

Once the system stated that it has finsihed the MasterNode will request the required results that are to be send to the originator. Returns a tuple like (result, Error)

generate_tasks(master)[source]

Generate the initial tasks this system requires

init_system(master)[source]

Initialize the system

is_complete(master)[source]

Ask the system if the computation has finsihed. If not we will go on and generate more tasks. This gets performed every time a tasks finishes.

task_finished(master, task, result, error)[source]

Called once a task has been performed

class concurrent.framework.samples.reversemd5.app.MD5ReverseTask(name, system_id, client_id, **kwargs)[source]

Bases: concurrent.core.async.task.Task

clean_up()[source]

Called once a task has been performed and its results are about to be sent back. This is used to optimize our network and to cleanup the tasks input data

finished(result, error)[source]

Once the task is finished. Called on the MasterNode within the main thread once the node has recovered the result data.

concurrent.framework.samples.reversemd5.setup module

Sample application using Concurrent to perform a reverse hash

Module contents