cblgh / cabal-crepes

wip: cabal replication diagnostics
4 stars 1 forks source link

Getting Started #1

Open dwblair opened 5 years ago

dwblair commented 5 years ago

This is awesome!

Just starting to play and get a feel for it ...

pup

Will post observations in this issue thread ...

Cheeeers!

cblgh commented 5 years ago

let me know any requests or oddities you may notice? i'm continuing work on the wip-wss branch if you want a sneak peek :)

(i added a csv format to the logger so that you might be able to reuse the data for your python viz:~)

dwblair commented 5 years ago

@cblgh -- thank you!! This stuff is so cool. I'm super new to coding in javascript, so I'm just getting my bearings ... I've already started playing around with using headless.js to power some super basic visualizations ... I'm going to try to organize my code so that it's not too embarrassing and post it tomorrow ...

And -- thanks for the csv format logger output! That's really useful.

One outcome of these explorations, I hope, is to develop a better sense for how p2p networks behave -- and to convey those intuitions to other novices like myself via visualizations / cartoons / illustrations. E.g.: I think I have a simplistic and wrong notion of what it means for a peer to be "online" in cabal -- and I'm really interested in a) understanding the real deal and b) finding useful and accessible language and metaphors to help others understand. [waves hands vaguely ... trails off ...]

Anyway -- awesome, thank you!!

cblgh commented 5 years ago

i love what you're trying to do and i feel honoured if i can help you along the way :~

i have a feeling we'll all learn a lot as we continue to move forward and get more visualisation of and around cabal. graphics are just so good at exposing certain kinds of data, making issues or previously unnoticed patterns obvious

p.s. i started implementing a tiny webpage to control the swarm. it's an extremely basic thing that i whipped together after breakfast, but i want to hook in the data from the sockets, get some kind of visualizing element in there (not sure what yet) and make it look slick.

if you have central.js running, you can visit the host you were querying from e.g. http//localhost:8899 and some ugly buttons should appear!

dwblair commented 5 years ago

So coooool! The buttons are elegant!

puppet

I think you're absolutely right about the visualizations ... it'll help us notice patterns, and better understand the peculiar dynamics of p2p networks and develop intuitions around them ... exciting times!

I'm going to try to get my bearings around the cool stuff you've done so that I can figure out how to hook some visualizations in ...

Thank you!!

dwblair commented 5 years ago

@cblgh -- I'm still trying to wrap my head around websockets and how to use them :) I think you've made a very elegant and powerful core system here that I'm eager to leverage for visualization tools!

In order to get my bearings at first, I made a little toy network visualization tool, using your headless.js code: https://github.com/dwblair/cabal-netx

network

I'm not even sure I included everything needed to run it (I'm new to all of this) -- let me know if you're able to give it a spin?

I'm hoping to understand the cabal-crepes code (and websockets) well enough soon to integrate these sorts of visualizations into e.g. alternative pages in the cabal-crepes _sites directory (if that makes sense) ...

Cheerio! D

dwblair commented 5 years ago

The websockets functionality is so cooooool!

So far, I'm getting some nice messages telling me when a peer connects:

localhost

But as you can see in the above image, I don't seem to be able to name my puppet properly :) (Note -- I may be doing this wrong, apologies). When I type the nick of the current puppet, 'zwei', and click "stat" or "start", I get "no such puppet" ... but when I check on my Desktop client, it seems as though 'zwei' is the right nick ...

desk

Not sure if I should be doing things differently?

In any case I can't wait to use this as a model for playing with websockets now, and bringing in some visualization here ... exciting!!

(Note -- just to check, I also tried a 'curl' command from the terminal ... )

no_such

cblgh commented 5 years ago

ohhh yeah sorry! right now all of the routes are using the ids of the puppets as they have been connected (which also isn't like exposed anywhere lol)

so zilch = 0 => which should be id 0!

(but yeah, try putting in 0-9 until you hit something. i'll try to rework it soon!)

dwblair commented 5 years ago

Ah that makes sense & that's easy enough! Thanks I'll try it right now w000t

dwblair commented 5 years ago

Quick update -- cobbling things together messily, but -- whee! able to use sockets now b/c of your code! Will see if I can write it in a non-terrible way asap :)

progress

cblgh commented 5 years ago

aaaaaaaaaaa THIS IS GREAT

On 24 Jun 2019, at 01:13, dwblair notifications@github.com wrote:

Quick update -- cobbling things together messily, but -- whee! able to use sockets now b/c of your code! Will see if I can write it in a non-terrible way asap :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

dwblair commented 5 years ago

Oh! Now cabal-crepes is working really nicely for me!

swarm

Not sure what I was doing wrong before, but I wasn't seeing "ping" or "pong", and commands didn't seem to have much effect ... I was likely doing something done & it likely wasn't a bug.

Okay, now need to figure out what to do with all of this POWER bwahahah

cblgh commented 5 years ago

@cblgh ohh haha i added that yesterday!

basically, now the server correctly purges puppets that have been shut down.

i want to improve puppets so that they reconnect to the websocket server if they lose connection as well!

(i'll probably remove the pings and pongs, unless you really want them to stay there. i added the printouts as a debugging measure and forgot about them haha)

dwblair commented 5 years ago

Fannnntassstic ... ! Sorry for the delayed reply -- keep getting sidetracked haha -- this is all so promising --

I see what you mean about removing the pings and pongs -- maybe the functionality can stay in? Because it's so cool & cute for figuring out how / whether these sockets are working! But feel free to drop the code if that's better, I always have the original to reference ...

More soooon -- cheerio!

cblgh commented 5 years ago

hey no worries, i'll keep the ping and pongs in if you find them useful! ^_^

cblgh commented 5 years ago

@dwblair i just made it so that puppets will retry connecting to the websocket server if there either is no initial connectivity, or if they lose connectivity once it has been established! :)

getting close to the finish line :~

todrobbins commented 5 years ago

@cblgh what are puppets in this context?

dwblair commented 5 years ago

@cblgh -- that's so great! I'm eager to see how you do that -- it seems like a generally useful thing to be able to do with websockets ... this system is going to be so rad to play with. I sense that there are very interesting things to be done with it beyond the analytics, too ...

@todrobbins I'm still catching up with @cblgh 's superfastbrain, but (at least part of) the idea is that you can start up sort of scripted, bot-like cabal peers ("puppets") that you can tell to connect to the cabal, disconnect from the cabal, have them post a message to the cabal every X seconds, etc. The overall interest is in getting a sense for how peer connectivity and messaging dynamics work in cabals, and this is a way of doing that with a bunch of 'automatons' who'll one's bidding :)

More concretely: each puppet is a Node process that is capable of both a) communicating with a given cabal and b) receiving commands via a web socket connection. @cblgh has set things up nicely tos that there is a central server "central.js" that connects to the web socket, and also listens for HTTP POST commands. So you can fire off HTTP POST commands "e.g.: puppet 0, connect to the cabal!" to the central server; the central server will then send those commands via web socket to the puppets, which will do what they're told.

At least -- that's how my neophyte brain understands it :) I still haven't played with it nearly enough, but hope to soon ...

cblgh commented 4 years ago

@dwblair heads up that i'm now starting to work on crepes again! i'll be using it for visualizing and interacting with my thesis (which is a new kind of trust-based moderation)

cblgh commented 4 years ago

aww shit i got it functioning in a pomodoro before work image

dwblair commented 4 years ago

Oh goodness that looks cooool!

On Thu, Oct 31, 2019 at 3:52 AM Alexander Cobleigh notifications@github.com wrote:

aww shit i got it functioning in a pomodoro before work [image: image] https://user-images.githubusercontent.com/3862362/67928642-cd19ff80-fbbb-11e9-964d-22467d884f84.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cblgh/cabal-crepes/issues/1?email_source=notifications&email_token=AAE4GEFVIPW3H5AKK2C5Z6DQRKFFVA5CNFSM4HZATCOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECW26MA#issuecomment-548253488, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE4GEBZ44EX5UNI5E3PYBDQRKFFVANCNFSM4HZATCOA .

cblgh commented 4 years ago

pewpew there's been a bit of progress

image