• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

drbh/ipfs-pubsub-compute: An easy way to run code on other machines using IPFS P ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

drbh/ipfs-pubsub-compute

开源软件地址:

https://github.com/drbh/ipfs-pubsub-compute

开源编程语言:

JavaScript 99.9%

开源软件介绍:

ipfs-pubsub-compute

Article here https://medium.com/@david.richard.holtz/an-ipfs-application-demo-49a1255ffd0

Overview

This is a tiny IPFS PubSub application built in Golang and is less than 130 lines of code. It allows you to write Python 3.7 code in the browser send the code and the input to IPFS pubsub, which another listening device in the channel then picks up and executes using AWS's Lambda Docker container.

Features

  • Web UI for Python 3.7 code

  • Send code and event in Base64 to IPFS pubsub channel

  • Lambda Docker listens to pubsub channel

  • Docker executes code and returns to IPFS pubsub result channel

  • Server listen to response channel and sends compute result to web UI

  • End to end WEB→IPFS→DOCKER→IPFS→WEB

  • Make channel changable from UI

  • Stop panic on code execute failure

  • Allow user to deploy code to IPFS as file

  • Allow compute app to execute file contents and not just pubsub message

Setup

Please install the dependencies

docker - version 18.09.1
go     - go1.11.5 
ipfs   - version 0.4.18

Also you'll need to fetch the AWS Lambda Docker at, https://github.com/lambci/docker-lambda

To get the image just run:


docker pull lambci/lambda:python3.7 

Running

First we need to make sure we can connect to a IPFS gateway that has PubSub enabled. The app is looking for a gateway at http://localhost:5001 so please use go-ipfs to start a local node. check out https://github.com/ipfs/go-ipfs to get IPFS setup on your computer.

Now start the deamon with the pubsub flag enabled.

ipfs daemon --enable-pubsub-experiment

Now, we can start out app that uses IPFS's new gen protocols.

git clone https://github.com/drbh/ipfs-pubsub-compute.git
cd ipfs-pubsub-compute

Running precompiled binary (on OSX)

./ipfs-pubsub-compute 

Run go source files files, you'll need to go get a few libraries

go run execute.go server.go 

The application is available at

http://localhost:8769/



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
AIDXNZ/flutter_ipfs: Add IPFS to your flutter App!发布时间:2022-06-22
下一篇:
fission-suite/ipfs-cluster-aws发布时间:2022-06-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap