All Projects → soyuka → Relieve

soyuka / Relieve

Ease the implementation of multi processing accross your microservices

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Relieve

Chronus
Chronus是360金融技术团队基于阿里开源项目TBSchedule重写的分布式调度。
Stars: ✭ 166 (+253.19%)
Mutual labels:  microservice, task
Rq
Simple job queues for Python
Stars: ✭ 8,065 (+17059.57%)
Mutual labels:  task, workers
fast-laravel
基于Swoole的高性能HTTP服务器,加速您Laravel应用程序。
Stars: ✭ 33 (-29.79%)
Mutual labels:  task, process
Gores
👷 Redis-backed library for creating background jobs in Go. Placing jobs in multiple queues, and process them later asynchronously.
Stars: ✭ 137 (+191.49%)
Mutual labels:  microservice, workers
Laravel S
LaravelS is an out-of-the-box adapter between Swoole and Laravel/Lumen.
Stars: ✭ 3,479 (+7302.13%)
Mutual labels:  task, process
Queuer
Queuer is a queue manager, built on top of OperationQueue and Dispatch (aka GCD).
Stars: ✭ 964 (+1951.06%)
Mutual labels:  task
Npm Build Boilerplate
A collection of packages that build a website using npm scripts.
Stars: ✭ 963 (+1948.94%)
Mutual labels:  task
Cookiecutter Sanic Microservice
A template for rapid development of Sanic based RESTful Microservices
Stars: ✭ 32 (-31.91%)
Mutual labels:  microservice
Microservice learning
从零开始微服务框架使用
Stars: ✭ 31 (-34.04%)
Mutual labels:  microservice
Moleculer Decorators
decorators for moleculer
Stars: ✭ 47 (+0%)
Mutual labels:  microservice
Spring Boot Microservice Eureka Zuul Docker
Spring-Boot rest microservices using Eureka, Zuul, Docker. Monitoring with logstash, logback, elasticsearch, kibana
Stars: ✭ 45 (-4.26%)
Mutual labels:  microservice
Nex
Aiming to simplify the construction of JSON API service
Stars: ✭ 35 (-25.53%)
Mutual labels:  microservice
Freedom
Freedom是一个基于六边形架构的框架,可以支撑充血的领域模型范式。
Stars: ✭ 972 (+1968.09%)
Mutual labels:  microservice
Fabric8 Wit
wit stands for Work Item Tracker
Stars: ✭ 43 (-8.51%)
Mutual labels:  microservice
Hands On Microservices With Csharp 8 And .net Core 3 Third Edition
Hands-On Microservices with C# 8 and .NET Core 3, Third Edition, published by Packt
Stars: ✭ 46 (-2.13%)
Mutual labels:  microservice
Jbone
jbone基于Spring Cloud框架开发,旨在为中小企业提供稳定的微服务解决方案,为开发人员提供基础开发骨架,jbone包含微服务中所有常用组件,例如注册中心、服务管理、服务监控、JVM监控、内存分析、调用链跟踪、API网关等等。业务功能包括系统权限的统一管理、单点登录、CMS、电商平台、工作流平台、支付平台等等。
Stars: ✭ 961 (+1944.68%)
Mutual labels:  microservice
Task after
Elixir TaskAfter library
Stars: ✭ 35 (-25.53%)
Mutual labels:  task
Mini Platform
Mini-Platform致力于更简洁易用的轻量级微服务治理平台。
Stars: ✭ 45 (-4.26%)
Mutual labels:  microservice
Sidekiq Job Php
Push and schedule jobs to Sidekiq from PHP
Stars: ✭ 34 (-27.66%)
Mutual labels:  workers
Principles.design
An open source collection of design principles and methods.
Stars: ✭ 975 (+1974.47%)
Mutual labels:  process

Relieve Test Coverage Code Climate Build Status Build status

The goal of this library is to ease the implementation of multi processing accross your existing microservices. Relieve aims to give a reusable design pattern using process forks. It also eases communication with child processes with an high-level abstraction.

For example, with a CallableTask:

//task.js
//just export a module in the child process
module.exports = {
  print: (str) => {
    console.log(str)
  },
  data: () => {
    //return some async data
    return Promise.resolve({foo: 'bar'})
  }
}

Then from your master, just call the task:

//worker.js
var CallableTask = require('relieve/tasks/CallableTask')
var task = new CallableTask('task.js')

task.start()
.then(() => {
  task.call('print', 'hello world')
  return task.get('data')
})
.then(d => {
  //d is {foo: 'bar'}
})

The design pattern

Relieve is based on a design pattern containing:

  • A Worker
  • One or more tasks

The task can be used without a Worker, but the Worker helps managing workflows.

Task

The task will implement a child process using fork. It'll make sure that there is an ipc channel open so that Workers and Tasks can communicate. There are different tasks implementations:

  • Fork Task - simply transforms a ChildProcess.fork in a Task
  • Script Task - wraps a script path in a container that is managed through ChildProcess.fork. It gives the ability to start, restart or kill a Task
  • Callable Task - this is a Script Task with convenience methods to call or get script methods remotely

Tutorials:

Worker

Different kind of Workers for different use cases. Every Worker takes one or more tasks and handles them.

  • Worker - it's a basic worker. Helps sending a message to every task.
  • QueueWorker - process tasks one after the other, or in concurrency. Waits for a Task to exit before it consider's it as done.
  • CloudWorker - does not wait for tasks to exit and process them through a Strategy (ie: RoundRobin)

Tutorials:

Tools

  • Containers - easy way to add ipc methods for your tasks
  • Interfaces - extends how the tasks are managed (FailSafe, Logger)

Links

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].