MESG is an open-source decentralized infrastructure which makes all technologies, including blockchains, interoperable. It’s a building platform for developers.
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Merge branch 'dev' into feature/add-lint-to-circleci Dec 10, 2018
api Rename ID by Hash Dec 7, 2018
commands Output service hash and sid in command service detail Dec 7, 2018
config Lint Nov 29, 2018
container Merge branch 'dev' into feature/auto-remove-volume Dec 4, 2018
core reduce dependencies between ss and ss deployer and add ss to api Nov 14, 2018
daemon Add asseration Nov 28, 2018
database Improve variable name in database Dec 7, 2018
docker-images Create simple&small docker images Aug 29, 2018
docs Generate assets, proto, mocks Dec 6, 2018
event Change require.Nil to require.Error Oct 24, 2018
execution Rename ID by Hash Dec 7, 2018
interface Rename ID by Hash Dec 7, 2018
logger Use logrus for logs in Core (#352) Aug 17, 2018
protobuf Generate proto Dec 7, 2018
pubsub Add more test to pubsub test Aug 15, 2018
scripts Remove survey mocks Dec 5, 2018
service-test Remove warn about .mesgignore Sep 25, 2018
service Rename ID by Hash Dec 7, 2018
systemservices Rename ID by Hash Dec 7, 2018
utils Lint Nov 29, 2018
vendor Switch to go1.11 Dec 1, 2018
version Move version to pkg and log when dameon starts Aug 4, 2018
workflow-test workflow feature: preapare a base & add dummy workflow create and del… Oct 24, 2018
x Merge branch 'dev' into fix/provider-delete-all Dec 1, 2018
.codacy.yml remove vendor for codacy Oct 27, 2018
.codeclimate.yml Ignore assets Sep 11, 2018
.dockerignore system services feature: [fix] change path -sources to sources Nov 7, 2018
.gitignore update vuepress config Jul 26, 2018
.golangci.yml Add golangci-lint Nov 29, 2018
CHANGELOG.md Update changelog Dec 7, 2018
CONTRIBUTING.md Update CONTRIBUTING.md Oct 1, 2018
Dockerfile move service deployment related server side logic from cli (#371) Aug 24, 2018
Dockerfile.dev Dockerfile.dev: install certs for secure connections Nov 28, 2018
Dockerfile.tools Update mesg-dev tools and scripts Nov 20, 2018
LICENSE add first version of the cli Mar 11, 2018
README.md Fix marketplace link Dec 11, 2018
codecov.yml Exclude vendor/ from external tools Aug 15, 2018
dev-cli dev-cli: fix passing ldflags Nov 28, 2018
dev-core dev-core: rm hard deleting MESG services & containers, use stop comma… Dec 3, 2018
go.mod Switch to go1.11 Dec 1, 2018
go.sum Switch to go1.11 Dec 1, 2018
logo.svg Add logo Jun 5, 2018
mesg-tools Add rm flag to mesg-tool docker run command Dec 9, 2018
package-lock.json Merge branch 'master' into dev Oct 5, 2018
package.json Merge branch 'master' into dev Oct 5, 2018
schema1.svg Add architecture schema Jul 3, 2018
testenv Update env variable Jul 24, 2018
tools.go Switch to go1.11 Dec 1, 2018

README.md

MESG Core

Website - Docs - Forum - Chat - Blog

CircleCI Docker Pulls Maintainability codecov

MESG is a platform for the creation of efficient and easy-to-maintain applications that connect any and all technologies.

MESG Core is a communication and connection layer which manages the interaction of all connected services and applications so they can remain lightweight, yet feature packed.

To build an application, follow the Quick Start Guide

If you'd like to build Services and share them with the community, go to the Services section.

To help us build and maintain MESG Core, refer to the Contribute section below.

Contents

Quick Start Guide

This guide will show you steps-by-step how to create an application that sends a Discord invitation email when a webhook is called.

1. Installation

Run the following command in a console to install MESG Core:

bash <(curl -fsSL https://mesg.com/install)

You can also install it manually by following this guide.

2. Run MESG Core

MESG Core runs as a daemon. To start it, execute:

mesg-core start

3. Deploy the services

You need to deploy every service your application is using.

In this guide, the application is using 2 services.

Let's start by deploying the webhook service:

mesg-core service deploy https://github.com/mesg-foundation/service-webhook

Now let's deploy the invite discord service:

mesg-core service deploy https://github.com/mesg-foundation/service-discord-invitation

Once the service is deployed, the console displays its Service ID. The Service ID is the unique way for the application to connect to the right service through MESG Core. You'll need to use them inside the application.

4. Create the application

Now that the services are up and running, let's create the application.

The application is using NodeJS and NPM.

Let's init the app and install the MESG JS library.

npm init && npm install --save mesg-js

Now, let's create an index.js file and with the following code:

const MESG = require('mesg-js').application()

const webhook    = '__ID_SERVICE_WEBHOOK__' // To replace by the Service ID of the Webhook service
const invitation = '__ID_SERVICE_INVITATION_DISCORD__' // To replace by the Service ID of the Invite Discord service
const email      = '__YOUR_EMAIL_HERE__' // To replace by your email
const sendgridAPIKey = '__SENDGRID_API_KEY__' // To replace by your SendGrid API key. See https://app.sendgrid.com/settings/api_keys

MESG.whenEvent(
  { serviceID: webhook, filter: 'request' },
  { serviceID: invitation, taskKey: 'send', inputs: { email, sendgridAPIKey } },
)

Don't forget to replace the values __ID_SERVICE_WEBHOOK__, __ID_SERVICE_INVITATION_DISCORD__, __YOUR_EMAIL_HERE__ and __SENDGRID_API_KEY__.

5. Start the application

Start your application like any node application:

node index.js

6. Test the application

Now let's give this super small application a try.

Let's trigger the webhook with the following command:

curl -XPOST http://localhost:3000/webhook

🎉 You should have received an email in your inbox with your precious invitation to our Discord.

Services

Services are build and shared by the community. They are small and reusable pieces of code that, when grouped together, allow developers to build incredible applications with ease.

You can develop a service for absolutely anything you want, as long as it can run inside Docker. Check the documentation to create your own services.

Services implement two types of communication: executing tasks and submitting events.

Executing Tasks

Tasks have multiple input parameters and multiple outputs with varying data. A task is like a function with inputs and outputs.

Let's take an example of a task that sends a email:

The task accepts as inputs: receiver, subject and body.

The task could return 2 different outputs.

The first possible output is success with an empty object {} as data, meaning that the email has been sent with success

The second possible output is error with for eg, { "reason": "email invalid" } as data.

This way, the application can easily check the type of output and react appropriately.

Check out the documentation for more information on how to create tasks.

Submitting Events

Services can also submit events to MESG Core. They allow two-way communication with MESG Core and Applications.

Let's say the service is a HTTP webserver. An event could be submitted when the webserver receives a request with the request's payload as the event's data. The service could also submit a specific event for every route of your API.

For more info how to create your events, visit the Emit an Event page.

Architecture

MESG Architecture

Marketplace

We have a common place to post all community-developed Services and Applications. Check out the curated list of Awesome Services and Applications to participate.

Alternatively, you can also check out the https://github.com/mesg-foundation/awesome#readme.

Roadmap

June 2018 - Core V1.0 Launched

Create your services and connect them together with your application through a single connection to Core, allowing Core to handle all communications and interoperability with any technology.

Q3 2018 - Rapid Deployment

No need to code your application anymore, just send a list of events with corresponding tasks within a simple configuration file to Core which will then execute tasks on your application’s behalf.

Q4 2018 - Beta Network

The beta decentralized Network means no coding or servers are necessary to run your applications. Connect thousands of services or applications from our shared repository.

Q3 2019 - Main Network

MESG launches its own blockchain Network providing for full scalability and a cheaper and faster user experience. The main network will host the full functionality of the value-driven open market for the sharing of services.

Community

You can find us and other MESG users on the forum. Feel free to check existing posts and help other users of MESG.

Also, be sure to check out the blog to stay up-to-date with our articles.

Contribute

Contributions are more than welcome. For more details on how to contribute, please check out the contribution guide.

If you have any questions, please reach out to us directly on Discord.

0 1 2 3 4 5 6 7