{"id":20398055,"url":"https://github.com/zgbjgg/oox","last_synced_at":"2025-04-12T13:09:47.162Z","repository":{"id":57544829,"uuid":"125249354","full_name":"zgbjgg/oox","owner":"zgbjgg","description":"OOX - slave isolated process for jun environments","archived":false,"fork":false,"pushed_at":"2020-02-28T16:39:45.000Z","size":811,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-03-14T19:34:50.011Z","etag":null,"topics":["cluster","dataframe","elixir","erlang","jun","python","slave"],"latest_commit_sha":null,"homepage":"","language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zgbjgg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-14T17:26:54.000Z","updated_at":"2024-03-14T19:34:50.149Z","dependencies_parsed_at":"2022-08-27T04:22:03.988Z","dependency_job_id":null,"html_url":"https://github.com/zgbjgg/oox","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zgbjgg%2Foox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zgbjgg%2Foox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zgbjgg%2Foox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zgbjgg%2Foox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zgbjgg","download_url":"https://codeload.github.com/zgbjgg/oox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248571884,"owners_count":21126522,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cluster","dataframe","elixir","erlang","jun","python","slave"],"created_at":"2024-11-15T04:18:05.867Z","updated_at":"2025-04-12T13:09:47.135Z","avatar_url":"https://github.com/zgbjgg.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"# oox\n![Oox](https://user-images.githubusercontent.com/1471055/37486572-7fedf338-2854-11e8-8bba-fe635c6532a3.jpg)\n\n**OOX** - slave isolated process \u0026 scheduler for jun environments\n\n[![Hex.pm](https://img.shields.io/hexpm/v/oox.svg)](https://hex.pm/packages/oox) \n[![Build Status](https://travis-ci.org/zgbjgg/oox.svg?branch=master)](https://travis-ci.org/zgbjgg/oox)\n[![Codecov](https://img.shields.io/codecov/c/github/zgbjgg/oox.svg)](https://codecov.io/gh/zgbjgg/oox)\n[![License: MIT](https://img.shields.io/github/license/zgbjgg/oox.svg)](https://raw.githubusercontent.com/zgbjgg/oox/master/LICENSE)\n[![Hex.pm](https://img.shields.io/hexpm/dt/oox.svg)](https://hex.pm/packages/oox)\n[![Hex.pm](https://img.shields.io/hexpm/dw/oox.svg)](https://hex.pm/packages/oox)\n\nOOX is a set of tools to execute many jun commands into an isolated slave process, taking control of the cluster (slaves) and managing\nthe connection to it. This tools also can be used to generate a job and check if passed or broken (similar to TDD) but applied to\njun commands and taking advantage of the slave to run all process on a separated node.\n\nThis project is under development and should not be used in production, it's not ready for that.\n\n## Prerequisites\n\nIn order to execute the system correctly, just start the environment in a valid node (short \u0026 long names are allowed)\n\n```shell\n$ erl -pa _build/default/lib/*/ebin/ -name oox@127.0.0.1 -setcookie oox\n```\n\nAfter executing this all dependencies are set in path, just start them:\n\n```erlang\n(oox@127.0.0.1)1\u003e Apps = [syntax_tools, compiler, goldrush, lager, erlport, jun, oox].\n[syntax_tools,compiler,goldrush,lager,erlport,jun,oox]\n(oox@127.0.0.1)2\u003e lists:foreach(fun(App) -\u003e application:start(App) end, Apps).\n18:07:20.845 [info] Application lager started on node 'oox@127.0.0.1'\n18:07:20.846 [info] Application erlport started on node 'oox@127.0.0.1'\n18:07:20.848 [info] Application jun started on node 'oox@127.0.0.1'\n18:07:20.850 [info] Application oox started on node 'oox@127.0.0.1'\nok\n```\n\nDon't worry about starting the apps in the environment if you use `oox` for example in a rebar.config,\nthis is only to show how the system works.\n\n## Add a subscriber process\n\nSince jobs can be executed in async mode, the response will be delivered to a process, just set it:\n\n```erlang\n(oox@127.0.0.1)8\u003e oox_scheduler:set_subscriber(self()).\nok\n```\n\n## Creating a new job\n\nNow creates a new job, this will start a new slave on the host, ready to execute jun commands, it means that\nslave contains an isolated jun environment, adding a job is easy:\n\n```erlang\n(oox@127.0.0.1)9\u003e {ok, Job} = oox_scheduler:add_job(\"127.0.0.1\").\n{ok,\u003c0.115.0\u003e}\n11:40:12.308 [info] ensuring started for jun main dependency, state ok\n11:40:13.314 [info] reached slave node '1536856812309129@127.0.0.1', sending launch signal to main process \u003c0.118.0\u003e\n11:40:13.314 [info] receiving launch signal for slave '1536856812309129@127.0.0.1'\n11:40:13.689 [info] sent RPC to slave node '1536856812309129@127.0.0.1' with response {ok,\u003c11388.64.0\u003e}\n11:40:13.689 [info] starting jun worker on slave node at \u003c11388.64.0\u003e\n```\n\n## Using commands\n\nDefine some commands in order to send \u0026 execute into slave via scheduler, the commands can be a specific overriden variables,\nfor example if in the command you want to use the worker, just use $worker in the args. Example:\n\n```erlang\n[[{mod,jun_pandas},\n  {func,read_csv},\n  {args,['$worker','./files/csv.txt']}],\n [{mod,jun_pandas},\n  {func,head},\n  {args,['$worker','$dataframe',1,[]]}],\n [{mod,jun_pandas},\n  {func,max},\n  {args,['$worker','$dataframe',no_age,[]]}]]\n```\n\n## Starting the job\n\nStart the job to process the commands in the slave and waiting for response (remember response is delivered to the subscriber),\nwhen job finish also the slave is stopped.\n\n```erlang\n(oox@127.0.0.1)10\u003e oox_scheduler:start_job(Job, Cmds).\n{ok,working}\n```\n\n## Receive response of job\n\nIn the subscriber process you will receive a response based on the execution of commands, there is two posibles responses: passed or broken.\n\n```erlang\n(oox@127.0.0.1)11\u003e flush().\nShell got {job,\u003c0.115.0\u003e,{broken,{error,{'exceptions.KeyError',\"Atom('fage')\"}}}}\nok\n```\n### See also\n\n[JUN: python pandas support for dataframes manipulation over erlang](https://github.com/zgbjgg/jun)\n\n#### Authors\n\n@zgbjgg Jorge Garrido \u003czgbjgg@gmail.com\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzgbjgg%2Foox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzgbjgg%2Foox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzgbjgg%2Foox/lists"}