
Suddenly I looked on the EOSIO GitHub and saw something that was never and very important!
https://github.com/EOSIO/eosio-project-demux-example
It is a blogging DAPP utilizing Demux and React. The first day I got to Australia for the EOS Hackathon the mentors were informed about Demux and it essentially is "a backend infrastructure pattern for sourcing blockchain events to deterministically update query-able data stores and trigger side effects."
Confusing but basically it allows the retrieval of data at a faster rate. STEEM uses a similar system to this.
Recently they have been working on some more example DAPPs at Block One and this one is fairly new. I ran into a lot of problems trying to build it on Ubuntu 18.04 because there were a lot of dependency errors.
I'm going to detail some of the issues below for documentation purposes but I have a GitHub issue out to see if I can get it resolved.
There are several dependency issues that Ubuntu 18.04 gets hung up on when running the scripts. This could help someone build on Ubuntu faster.
You need the following: nodemon, dotenv, node-sass, node-sass-chokidar, lodash.assign, true-case-path
sudo npm install -g nodemon
sudo npm install -g dotenv
sudo npm install -g node-sass (Probably won't work.......I had to copy those libraries from a folder I had from an Ionic install)
sudo npm i --save lodash.assign
sudo npm i --save true-case-path
Resolving all that got me all the way trough to where everything was running including the front end.
The issue is that it won't write to the blocks because for some reason it won't connect to port 8888.
Here are the results of 'sudo netstat -tulpn' when it isn't producing blocks.
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 992/systemd-resolve
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 9228/sshd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1148/cupsd
tcp 0 0 0.0.0.0:3000 0.0.0.0:* LISTEN 4620/node
tcp 0 0 10.0.0.9:10010 0.0.0.0:* LISTEN 14334/docker-contai
tcp6 0 0 :::22 :::* LISTEN 9228/sshd
tcp6 0 0 ::1:631 :::* LISTEN 1148/cupsd
udp 0 0 0.0.0.0:35677 0.0.0.0:* 1140/avahi-daemon:
udp 4608 0 127.0.0.53:53 0.0.0.0:* 992/systemd-resolve
udp 0 0 0.0.0.0:68 0.0.0.0:* 1676/dhclient
udp 0 0 0.0.0.0:631 0.0.0.0:* 1273/cups-browsed
udp 6912 0 0.0.0.0:5353 0.0.0.0:* 3166/chrome
udp 12288 0 0.0.0.0:5353 0.0.0.0:* 1140/avahi-daemon:
udp6 0 0 :::44243 :::* 1140/avahi-daemon:
udp6 11520 0 :::5353 :::* 3166/chrome
udp6 50176 0 :::5353 :::* 1140/avahi-daemon:
Here are the results of 'sudo netstat -tulpn' when it is producing blocks.
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 992/systemd-resolve
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 9228/sshd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1148/cupsd
tcp 0 0 0.0.0.0:3000 0.0.0.0:* LISTEN 4620/node
tcp 0 0 10.0.0.9:10010 0.0.0.0:* LISTEN 14334/docker-contai
tcp6 0 0 :::9876 :::* LISTEN 14757/docker-proxy
tcp6 0 0 :::22 :::* LISTEN 9228/sshd
tcp6 0 0 ::1:631 :::* LISTEN 1148/cupsd
tcp6 0 0 :::8888 :::* LISTEN 14770/docker-proxy
udp 0 0 0.0.0.0:35677 0.0.0.0:* 1140/avahi-daemon:
udp 45312 0 127.0.0.53:53 0.0.0.0:* 992/systemd-resolve
udp 0 0 0.0.0.0:68 0.0.0.0:* 1676/dhclient
udp 0 0 0.0.0.0:631 0.0.0.0:* 1273/cups-browsed
udp 9216 0 0.0.0.0:5353 0.0.0.0:* 3166/chrome
udp 9216 0 0.0.0.0:5353 0.0.0.0:* 3166/chrome
udp 21504 0 0.0.0.0:5353 0.0.0.0:* 1140/avahi-daemon:
udp6 0 0 :::44243 :::* 1140/avahi-daemon:
udp6 19968 0 :::5353 :::* 3166/chrome
udp6 19968 0 :::5353 :::* 3166/chrome
udp6 19968 0 :::5353 :::* 3166/chrome
udp6 26624 0 :::5353 :::* 1140/avahi-daemon:
It looks like 8888 is open and associated with docker-proxy but for some reason it isn't getting through.
curl -v 127.0.0.1:8888
- Rebuilt URL to: 127.0.0.1:8888/
- Trying 127.0.0.1...
- TCP_NODELAY set
- Connected to 127.0.0.1 (127.0.0.1) port 8888 (#0)
GET / HTTP/1.1
Host: 127.0.0.1:8888
User-Agent: curl/7.58.0
Accept: /
- Recv failure: Connection reset by peer
- stopped the pause stream!
- Closing connection 0
curl: (56) Recv failure: Connection reset by peer
I'm sort of stumped at this point. Does anyone happen to know what could be the issue? I know docker situations can kind of be goofy because it gives me another IP address in the container.
So I can only really see the first part of the simple Blogging DAPP and here is what it looks like.
I had the browser sized down more like a mobile device. What is out there isn't complex on the front end but more of an example of how to implement Demux with MongoDB on the EOS blockchain so it is a big deal and a great example to build off of. I don't think a lot of people have tried to build it yet and probably all that have are on a MacBook. Hopefully I can get it resolved soon and keep trucking along.
