All Projects → 1amageek → AssemblyLine

1amageek / AssemblyLine

Licence: MIT license
AssemblyLine is a library for easily writing workflows.

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to AssemblyLine

Maid
Markdown driven task runner.
Stars: ✭ 1,999 (+4897.5%)
Mutual labels:  task
Opensa
资产管理、资产采集、灰度发布、反向代理、批量任务、任务编排、计划任务、日志审计、权限管理、角色管理、部门管理、运维自动化
Stars: ✭ 220 (+450%)
Mutual labels:  task
Task Easy
A simple, customizable, and lightweight priority queue for promises.
Stars: ✭ 244 (+510%)
Mutual labels:  task
Cloudtask
cloudtask is a distributed task scheduling platform.
Stars: ✭ 173 (+332.5%)
Mutual labels:  task
Taskbuilder.fs
F# computation expression builder for System.Threading.Tasks
Stars: ✭ 217 (+442.5%)
Mutual labels:  task
Dramatiq
A fast and reliable background task processing library for Python 3.
Stars: ✭ 2,844 (+7010%)
Mutual labels:  task
Chronus
Chronus是360金融技术团队基于阿里开源项目TBSchedule重写的分布式调度。
Stars: ✭ 166 (+315%)
Mutual labels:  task
react-native-dnd-board
A drag and drop Kanban board for React Native.
Stars: ✭ 41 (+2.5%)
Mutual labels:  task
Terraform Aws Ecs Container Definition
Terraform module to generate well-formed JSON documents (container definitions) that are passed to the aws_ecs_task_definition Terraform resource
Stars: ✭ 217 (+442.5%)
Mutual labels:  task
Opendevops
CODO是一款为用户提供企业多混合云、一站式DevOps、自动化运维、完全开源的云管理平台、自动化运维平台
Stars: ✭ 2,990 (+7375%)
Mutual labels:  task
Nake
Magic script-based C# task runner for .NET Core
Stars: ✭ 183 (+357.5%)
Mutual labels:  task
Aws Containers Task Definitions
Task Definitions for running common applications Amazon ECS
Stars: ✭ 210 (+425%)
Mutual labels:  task
Asyncex
A helper library for async/await.
Stars: ✭ 2,794 (+6885%)
Mutual labels:  task
Scheduler
Task scheduler for Golang
Stars: ✭ 171 (+327.5%)
Mutual labels:  task
Todokit
TodoKit - A beautiful bug and issue tracking software.
Stars: ✭ 253 (+532.5%)
Mutual labels:  task
Kommander Ios
A lightweight, pure-Swift library for manage the task execution in different threads. Through the definition a simple but powerful concept, Kommand.
Stars: ✭ 167 (+317.5%)
Mutual labels:  task
Javascript Total
Сборник практических вопросов, задач разного уровня сложности, сниппетов (утилит), паттерны проектирования, а также полезные ссылки по JavaScript
Stars: ✭ 214 (+435%)
Mutual labels:  task
qless-php
PHP Bindings for qless
Stars: ✭ 25 (-37.5%)
Mutual labels:  task
composer
API-first task runner with three methods: task, run and watch.
Stars: ✭ 35 (-12.5%)
Mutual labels:  task
Selinon
An advanced distributed task flow management on top of Celery
Stars: ✭ 237 (+492.5%)
Mutual labels:  task

AssemblyLine

Version Platform

AssemblyLine processes several tasks continuously in the background. Discard tasks that failed during execution during execution.

Why

Processing flow of data becomes complicated year by year. Until a few years ago I just took a picture and uploaded it. Recently, it passes through multiple flow, processing photos and processing meta information, face recognition.

Processing of data does not always succeed in all. Because mobile has an unstable factor.

  1. Network disconnection
  2. Insufficient memory
  3. Insufficient storage

It is necessary to have a method to make each processing independent and to process it simple.

Usage 👻

Take example of Tesla's factory.

Define Status.

enum ModelXStatus: StatusProtocol {
    case spec
    case assembly
    case paint
}

Define Error.

enum ModelXError: Error {
    case invalid
}

Processable protocol.

class ModelX: Processable {
    
    typealias Status = ModelXStatus
    
    var error: Error?
    var id: String
    var status: Status
    var workItem: DispatchWorkItem?
    var isAssembled: Bool = false
    var color: UIColor?
    
    init() {
        self.id = UUID().uuidString
        self.status = .spec        
    }
    
    // Processing when an error occurs
    func dispose(_ error: Error?) {
        
    }
}
struct ModelXPackage: Packageable {
    var products: [ModelX]
}
// Define workflow steps
let assembly: Step<ModelX> = Step({ (product) -> ModelX in
    product.isAssembled = true
    return product
})

// Define workflow steps
let paint: Step<ModelX> = Step({ (product) -> ModelX in
    product.color = .white
    return product
})

// Making a manufacturing line to do workflow
let line: Line<ModelX, ModelXPackage> = Line(workflow: [assembly, paint])

// Generate 10 ModelX
(0..<10).forEach({ (index) in
    let product: ModelX = ModelX()
    line.generate(product)
})

// Packaging
line.packing { (products, isStopped) in    
    if isStopped {
        print("Line is stopped")
        return
    }
    let package = ModelXPackage(products: products)
}
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].