Colonies is a generic framework for implementing next-generation distributed applications and systems

codecov

Go

What is Colonies?

Colonies is a generic framework for implementing next-generation distributed applications and systems. It can be used as a building block for grid computing or edge computing, e.g. implement a meta operating system or cloud-of-cloud platform that combines many execution environments into a new virtual computing environment that can be controlled using an single unified API.

Colonies Architecture

  • A Colony is a trusted collection of (geographically) distributed computers.
  • A Colony Process is a virtual software process. It contains meta information how to actually execute a process on a real operating system.
  • A Colony Runtime communicates with the Colonies Colonies Server and provides an virtual runtime environment for executing Colony Processes.
  • The Colonies Server works as a mediator, trying to match submitted processes specification to Colony Runtimes. It keep tracks of execution history and can also re-assign a Colony Process if is not completed in time. All Remote Procedure Calls (RPC) to the Colonies server are done atomically. This means that two Runtimes cannot be assigned the same process. If a Runtime crashes during a RPC call, that call is consider invalid, thus keeping the Colonies Server consistent.
  • A Colony App is an software that runs somewhere on the Internet. It is a running instance of a Colony Process. A Colony App can for example be an Android app running on a smart phone or an IoT application running a contraint device. A Colony App consists a of Colony Runtime for interacting with other Colony Apps.
  • A Colony Service is Colony App that provide services to other Colony Apps or Colony Sevices. For example, a Colony Kubernetes Service makes it possible to execute Colony Processes on top of Kubernetes. A Colony Slurm Services provides a service to run Colony Processes on HPC supercomputers. Similar to a real-operating system a Colony App may spawn new Colony Processes.

Links

Security principles

A core component of Colonies is a crypto identity protocol inspired by Bitcoin and Ethereum. Each Colony and Colony Runtime is assigned a Digital Identity that is verified by the Colonies server using a so-called Implicit certificates, which is implemented using Elliptic-curve cryptography. This protocol makes it possible to reconstruct public-keys from signatures. Identities can then simply be calculated as cryptographic hashes (SHA3-256) of the reconstructed public-keys.

The Colonies Server keeps track of these identities and applies several rules how runtimes are allowed to interact with each other.

  1. Only the Colonies Server Owner can register a new Colony.
  2. Only the Colonies Server Owner can list registered Colonies.
  3. Only a Colony Owner can register a Colony Runtimes to a Colony.
  4. Only a Colony Owner can list/get info about Colony.
  5. Only a Colony Owner can approve/disapprove a Runtime.
  6. Any Colony Runtime of a Colony can submit/get/list processes.
  7. Only the Colony Runtime that was assigned a process can set attributes on that process.
  8. Any Colony Runtime can get/list attributes on processes.

Note that the Colonies server does not store any crypto keys, but rather stores identites in a database and verifies that reconstructed identities obtained from RPC calls match the identities stored in the database. This protocol works as follows. Let's assume that a Runtime client has the following Id:

69383f17554afbf81594999eec96adbaa0fc6caace5f07990248b14167c41e8f

It then sends the following message to the Colonies Server:

{
    "payloadtype": "addcolonymsg",
    "payload": "ewogICAgICBjb2xvbnlpZDogYWM4ZGM4OTQ5YWYzOTVmZDUxZWFkMzFkNTk4YjI1MmJkYTAyZjFmNmVlZDExYWNlN2ZjN2RjOGRkODVhYzMyZSwKICAgICAgbmFtZTogdGVzdF9jb2xvbnlfbmFtZQogIH0=",
    "signature": "82f2ba6368d5c7d0e9bfa6a01a8fa4d4263113f9eedf235e3a4c7b1febcdc2914fe1f8727746b2f501ceec5736457f218fe3b1a469dd6071775c472a802aa81501",
}

When the server receives the message, it reconstructs the Id of the calling client using the enclosed signature and payload. This means that client Id (e.g. 82f2ba6368d5c7d0e9bfa6...) is never sent to the server but rather derived by the server from messages it receives. In the example above, the server checks in the database if the reconstructed Id is a server owner.

Running the Tests

Follow the instructions at Installation Guide and setup a Postgresql server, then type:

make test
Similar Resources

Broilerplate - A template project for new Go web backend applications

Broilerplate - A template project for new Go web backend applications

Broilerplate A template project for new Go web backend applications. Can be used

Mar 28, 2022

Example patterns for distributed service

Cloud Native Tulisan ini akan mengulas hasil pembelajaran dari beberapa sumber #learn-from-books. Dan terinspirasi dari obrolan The Pursuit of Product

Jan 30, 2022

[爬虫框架 (golang)] An awesome Go concurrent Crawler(spider) framework. The crawler is flexible and modular. It can be expanded to an Individualized crawler easily or you can use the default crawl components only.

go_spider A crawler of vertical communities achieved by GOLANG. Latest stable Release: Version 1.2 (Sep 23, 2014). QQ群号:337344607 Features Concurrent

Dec 30, 2022

A golang framework helps gopher to build a data visualization and admin panel in ten minutes

A golang framework helps gopher to build a data visualization and admin panel in ten minutes

the missing golang data admin panel builder tool. Documentation | 中文介绍 | DEMO | 中文DEMO | Twitter | Forum Inspired by laravel-admin Preface GoAdmin is

Dec 30, 2022

Simple web app using Go and Gin framework

go-gin-app Simple web app using Go and Gin framework Golang 과 Gin 프레임워크를 사용한 간단한 웹 앱 How to get Started Install Gin and have Go installed on your syst

Oct 18, 2021

A fully functional Ecommerce API in GO GIN Framework and mongoDB with JWT Authentication

A fully functional Ecommerce API in GO GIN Framework and mongoDB  with JWT Authentication

Fully functional ECOMMERCE API USING GIN FRAMEWORK AND MONGODB -----Initial Release v2.30 ⚠️ Not tested the efficiency project structure Ecommerce 📁

Dec 11, 2022

Restful API example with using go and gin framework

simple device api Simple Device API is really simple and concise to show how easy to implement a Restful Service with using Golang. It uses gin framew

Nov 18, 2021

Simple control panel for Golang based on Gin framework and MongoDB

Simple control panel for Golang based on Gin framework and MongoDB

Summer panel Simple control panel for Golang based on Gin framework and MongoDB How To Install go install github.com/night-codes/summer/summerGen@late

Dec 16, 2022

REST API with Echo Framework and a JSON File

 REST API with Echo Framework and a JSON File

REST API with Echo Framework and a JSON File Run it in ./src with: go run server.go The documentation, here = echo.labstack.com. Fake data = mockar

Dec 27, 2021
Comments
  • Colonies process get output does not work

    Colonies process get output does not work

    colonies process get --processid 4dfa8234ed9a4922700d6552f0d4d717a3ce34f208a6788f84f788e51ac28ddc --output INFO[0000] Starting a Colonies client Insecure=false ServerHost=colonies-api5.rocksigma.computer ServerPort=443

  • Workflow StartTime is not correct

    Workflow StartTime is not correct

    Workflow: +----------------+------------------------------------------------------------------+ | WorkflowID | e21b90176d7f8f0e49bc8c078d5a78bb52f73b43073dddf04e7ddac61df80789 | | ColonyID | e21b90176d7f8f0e49bc8c078d5a78bb52f73b43073dddf04e7ddac61df80789 | | State | Successful | | SubmissionTime | 2022-06-01 08:25:53 | | StartTime | 2022-06-01 08:26:42 | | EndTime | 2022-06-01 08:26:42 | +----------------+------------------------------------------------------------------+

  • Fibonacci example code

    Fibonacci example code

    Starting generator_sub.go without first starting solver.go or solver_sub.go will result in error ERRO[0200] Failed to call wsConn.ReadMessage() Error="websocket: close 1006 (abnormal closure): unexpected EOF" on the Colonies server.

  • Improved error handling in CLI

    Improved error handling in CLI

    E.g. using incorrect credentials result in cryptic error message:

    ERRO[0000] invalid character 'p' after top-level value BuildTime= BuildVersion= err="invalid character 'p' after top-level value" exit status 255

Go program with embedded Next.js app.
Go program with embedded Next.js app.

golang-nextjs-portable is a small Go program to showcase the embed package for bundling a static HTML export of a Next.js app.

Dec 13, 2022
Implementing URL shortening with Go and Redis as cache with Rate Limiting

URL-Redis Implementing URL shortening with Go and Redis as cache with Rate Limiting. In this project I have tried to implement on of daily task used i

Oct 19, 2022
A Golang package implementing the fastCDC chunking algorithm

go-fastcdc go-fastcdc is a Golang package implementing the fastCDC chunking algorithm. This is a work in progress. chunkerOpts := fastcdc.ChunkerO

May 26, 2022
Automated penetration and auxiliary systems, providing XSS, XXE, DNS log, SSRF, RCE, web netcat and other Servers,gin-vue-admin
Automated penetration and auxiliary systems, providing XSS, XXE, DNS log, SSRF, RCE, web netcat and other Servers,gin-vue-admin

Simple DNS log Server,easy to ACME DNS challenge log easy send to elasticsearch https://github.com/hktalent/DNS_Server go4Hacker Automated penetration

Dec 30, 2022
A new way to create web applications using go and sdf framework.

SDF GO A new way to create web applications using go and sdf framework Explore the docs » View Demo · Report Bug · Request Feature Table of Contents A

Sep 27, 2022
Minimal bundling for projects that require generation (e.g. SASS to CSS)

staticgen staticgen is a tool that generates file bundles and watches directories for changes. Configuration Project configurations are specified in t

Dec 14, 2021
GoCondor is a golang web framework with an MVC like architecture, it's based on Gin framework
GoCondor is a golang web framework with an MVC like architecture, it's based on Gin framework

GoCondor is a golang web framework with an MVC like architecture, it's based on Gin framework, it features a simple organized directory structure for your next project with a pleasant development experience, made for developing modern APIs and microservices.

Dec 29, 2022
Nada is a JS runtime, just like Nodejs. The difference is that Nada allows JS developers to easily achieve millions of concurrent applications.

Nada is a JS runtime, just like Nodejs. The difference is that Nada allows JS developers to easily achieve millions of concurrent applications. It also adds some new enhancements to THE JS syntax (types, interfaces, generics) that fundamentally address JS's perennial complaints.

Jul 11, 2022
Short examples of common anti-patterns in Go Web Applications.

Go Web App Anti-Patterns This repository contains short examples of common anti-patterns in Go Web Applications. For complete description, see Common

Dec 31, 2022
staticfiles is an asset manager for a web applications written in Go.

Overview staticfiles is an asset manager for a web applications written in Go. It collects asset files (CSS, JS, images, etc.) from a different locati

Dec 7, 2022