Code Monkey home page Code Monkey logo

Comments (9)

dffffffff avatar dffffffff commented on September 14, 2024 1

Try this
Open terminal.app , go to the directory that holds the_db
run ./the_db --address 0x006eae72077449caca91078ef78552c0cd9bce8f --port 58001
Open a new window (cmd-n), go to the directory that holds the_db
run ./the_db --address 0x006eae72077449caca91078ef78552c0cd9bce8f --port 58002
repeat up to 58005

from swarmdb.

rnistuk avatar rnistuk commented on September 14, 2024 1

SWEET IDEA!!! I'm totally stealing that!

The only thing that I see missing is that you haven't changed the working directory to where the the_db application or peers file is.

from swarmdb.

rnistuk avatar rnistuk commented on September 14, 2024 1

from swarmdb.

dffffffff avatar dffffffff commented on September 14, 2024 1

@rnistuk There is a pull request with scripts for GNU screen and tmux, you should add this script to it! https://github.com/bluzelle/bluzelle/pull/20

from swarmdb.

RBNasty avatar RBNasty commented on September 14, 2024

Thanks for the response! I'll give that a try. Should I leave everything else as is when I do this?

from swarmdb.

RBNasty avatar RBNasty commented on September 14, 2024

So I tried your idea and it opened multiple instances, but I could not get the follower nodes to send or read back to the leader. I did however find a way to create multiple windows using this code:

#!/bin/bash

osascript -e 'tell application "Terminal" to do script ""' ./the_db --address 0x006eae72077449caca91078ef78552c0cd9bce8f --port 58001

osascript -e 'tell application "Terminal" to do script ""' ./the_db --address 0x006eae72077449caca91078ef78552c0cd9bce8f --port 58002

osascript -e 'tell application "Terminal" to do script ""' ./the_db --address 0x006eae72077449caca91078ef78552c0cd9bce8f --port 58003

osascript -e 'tell application "Terminal" to do script ""' ./the_db --address 0x006eae72077449caca91078ef78552c0cd9bce8f --port 58004

osascript -e 'tell application "Terminal" to do script ""' ./the_db --address 0x006eae72077449caca91078ef78552c0cd9bce8f --port 58005

While this now creates all 5 windows for me when I execute the ./run.sh command I get this error in all 5 windows:

-bash: export: ./the_db': not a valid identifier -bash: export: --address': not a valid identifier
-bash: export: 0x006eae72077449caca91078ef78552c0cd9bce8f': not a valid identifier -bash: export: --port': not a valid identifier
-bash: export: `58001': not a valid identifier

Obviously it's hanging after the first line of code, but I'm still getting the multiple window output I wanted. Any thoughts on how to address the -bash:export errors?

from swarmdb.

RBNasty avatar RBNasty commented on September 14, 2024

Steal away! haha. Which part do I need to change/add into my code?

from swarmdb.

RBNasty avatar RBNasty commented on September 14, 2024

I played around some more and this is what I came up with.

#!/bin/bash

osascript -e 'tell application "Terminal" to do script " exec bluzelle/build/daemon/the_db --address 0x006eae72077449caca91078ef78552c0cd9bce8f --port 58001"'
osascript -e 'tell application "Terminal" to do script " exec bluzelle/build/daemon/the_db --address 0x006eae72077449caca91078ef78552c0cd9bce8f --port 58002"'
osascript -e 'tell application "Terminal" to do script " exec bluzelle/build/daemon/the_db --address 0x006eae72077449caca91078ef78552c0cd9bce8f --port 58003"'
osascript -e 'tell application "Terminal" to do script " exec bluzelle/build/daemon/the_db --address 0x006eae72077449caca91078ef78552c0cd9bce8f --port 58004"'
osascript -e 'tell application "Terminal" to do script " exec bluzelle/build/daemon/the_db --address 0x006eae72077449caca91078ef78552c0cd9bce8f --port 58005"

Now I get 5 windows generated and each one displays the correct ports in order. Now my issue is all 5 windows hang at the "votes requested" . How do I initiate the vote to have a leader designated?

exec bluzelle/build/daemon/the_db --address 0x006eae72077449caca91078ef78552c0cd9bce8f --port 58001
Ryans-Air:~ bucnasty$ exec bluzelle/build/daemon/the_db --address 0x006eae72077449caca91078ef78552c0cd9bce8f --port 58001
Running node with ID: 24a11059-6501-46c3-9fcc-3df184fe78d4
Ethereum Address ID: 0x006eae72077449caca91078ef78552c0cd9bce8f
on port: 58001
Token Balance: 2700 BLZ

      I am Candidate

Election in 11341 millisecs
votes requested

from swarmdb.

amastracci avatar amastracci commented on September 14, 2024

Please have a look at the new docker deployment setup. Reopen the issue if you still see this as a problem.

from swarmdb.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.