Download the PHP package virge/graph without Composer

On this page you can find all versions of the php package virge/graph. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package graph

Virge::Graph

Virge::Graph is a simple workflow framework to provide scalable queue backed job processing.

Virge::Graph requires RabbitMQ (http://www.rabbitmq.com/) , and a MySQL Database (https://www.mysql.com/).

Virge::Graph uses the Virge::Graphite queue library to handle all of the workers, and scaling. https://github.com/siosphere/virge-graphite

Getting Started

You will need to setup a RabbitMQ Server, and a MySQL Server. Both can be setup easily using http://www.docker.com/

You will need to include the virge/graph package in your project:

You will also need to create a Virge::Reactor and setup some configuration files.

If starting a project from scratch, you can use the virge/project

Which will setup the Reactor for you.

To add to existing projects, it is recommended to make a sub-folder to house the virge configuration files and reactor.

Reactor

The reactor will automatically load all of the configuration files, and register the services needed into Virge.

You will also need to setup / create two configuration files in config/, You can copy these files from the examples directory

database.php

queue.php

You will also need an entry point to run the reactor and process your queues, there is a lightweight admin tool included called "vadmin" that you can copy from the examples directory, or create a new file

vadmin.php

We will also need to create and setup our workflows file, this only needs to contain the definitions for our workflows, the workflow class can be autoloaded by composer see https://getcomposer.org/doc/

workflows.php

The reactor and workflows must be included in your app anywhere you'd like to push onto a workflow. They are automatically included from the resources dir if using a virge/project.

Simple Mode

Virge::Graph has a simple workflow mode, that allows 1 queue to process your workflow. This doesn't allow you to individually scale out individual tasks, but does make it simpler to setup.

Defining a Workflow

A workflow is a class that defines a series of tasks, and their dependencies, as well as their life-cycle callbacks.

A task can be a Closure, or it can be a class that has a "run" method.

And when defining, simply pass in the className

Pushing a job onto a workflow

A Job is a Virge\Graph\Component\Workflow\Job object. You can setup initial data by using the "setData" function. You can setup complex data in setData, but be aware it is serialized and pushed onto multiple queues, so it is unwise to put large amounts of data, and better to pass simple data, and load in the data on each worker.

Working the Queue

You must setup at least 1 worker to work the default virge:graph queue, this queue handles scheduling of tasks, life-cycle events, updating tasks progress, and syncing their results with the database.

On Advanced workflows, each task will be queued to it's own queue, to allow horizontal scalability.


All versions of graph with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package virge/graph contains the following files

Loading the files please wait ....