Skip to content

Instantly share code, notes, and snippets.

View hannahhoward's full-sized avatar

Hannah Howard hannahhoward

View GitHub Profile
@hannahhoward
hannahhoward / performance_issues.md
Last active March 5, 2021 01:14
Graphsync Performance Thoughts

Concurrency

  1. When I run with >1 concurrency, I notice that performance for http over libp2p degrades as concurrency goes up, in a manner SIMILAR to graphsync. By contrast pure HTTP stays relatively flat as concurrency goes up.
  2. This holds true as concurrency goes up to 6, which is the maximum number of simultaneous requests for go-graphsync. If you configure this value higher, it holds true above 6.

Conclussion: I believe the problems may have to do with concurrency scaling with libp2p, or perhaps the way both libp2p over http library and graphsync use libp2p, and, possibly, security encoding on the transport

see k8s compositions below

Slowness With Fast Connection

package testutil
import (
"context"
"reflect"
"testing"
"github.com/stretchr/testify/require"
)

My believe is that: a. The discussion of serializing IPLD graphs to CARs contains many unknowns. b. Storing IPLD graphs and being able to retrievals based on semantic selectors is a worthy goal. At the same time, it’s much more work than just pieces as bytes + padding only. c. The stated ineffeciencies around transfering pieces are potentially not actually correct. i. The 2x overhead in transfer sise is not true if the blocks are chunked in such a way that a bunch of them are just the same block of all 0's. In which case, Graphsync already deduplicates when sending identical blocks. ii. Based on my understanding of how pieces get formed, I can see a limited form of partial retrieval based of of the sub-merklehashes used to calculate commP, even if we are dealing with just pieces. d. The functionality around ipld graphs serialized to CAR is fundamentally a superset of the functionality around just raw pieces. It can be added without changing a piece only implementation much. Given all that, I’d like to pro

import { SignalGraphBuilder, addPrimary, addDependency, addDerived } from '@rxreact/signal'
import { withLatestFrom, flatMap, map, filter } from 'rxjs/operators'
import { merge, pipe, Observable, combineLatest } from 'rxjs'
import { LoginResponse, LoginSuccess, LoginFailure, API, AuthStatus } from "./types"
import { api } from "./api"
const makeAuthStatus = map<LoginSuccess, AuthStatus>(({ data: { userToken } }: LoginSuccess) => ({
status: 'authorized',
token: userToken
}))
defmodule SomeApp.ComplexFormLive do
use Phoenix.LiveView
# see https://github.com/opendoor-labs/redix_pool
alias RedixPool, as: Redis
def mount(%{session_guid: session_guid} = session, socket) do
cached_value = Redis.command(["GET", session_guid])
case cached_value do
{:ok, value} when is_binary(value) and byte_size(value) > 0 ->
{:ok, assign(socket, :erlang.binary_to_term(value))}
describe("parseFormula", () => {
it("can parse a ID as an ID token");
it("can parse an ID with whitespace");
it("can parse two IDs and an add operation");
it("can parse two IDs and an add operation with whitespace");
it("can parse two IDs and an subtract operation");
it("can parse two IDs and a subtract operation with whitespace");
it("can parse a complex formula with multiple IDs and operations");
it("returns an error for an empty string");
it("returns an error for an all whitespace string");
/**
* White theme for reveal.js. This is the opposite of the 'black' theme.
*
* By Hakim El Hattab, http://hakim.se
*/
@import url(../../lib/font/source-sans-pro/source-sans-pro.css);
section.has-dark-background, section.has-dark-background h1, section.has-dark-background h2, section.has-dark-background h3, section.has-dark-background h4, section.has-dark-background h5, section.has-dark-background h6 {
color: #fff; }
/*********************************************
<section data-background-transition='zoom' data-transition='concave' data-state='blackout' data-background='https://www.clipartsgram.com/image/124471650-bubbles-powerpoint-templates-colourful.jpg'>
<h1>Conway's Game Of Life</h1>
<h2 class="fragment">...in Elixir...</h2>
</section>
<section data-background-transition='zoom' data-transition='linear' data-background='https://www.clipartsgram.com/image/124471650-bubbles-powerpoint-templates-colourful.jpg'>
<h2>About Conway's Game Of Life</h2>
<ul>
<li class="fragment">Simple cellular regeneration problem</li>
<li class="fragment">Not to simple, not too hard</li>
<li class="fragment">Makes cool results!</li>
@hannahhoward
hannahhoward / README.md
Created August 18, 2016 17:03
Reactive Programming in GAP Allocation Client

Reactive Programming in GAP Allocation Client

##$ Current strategy:

  • use services to talk to Allocation Web backend
  • manage state in components... pass information down to lower level components
  • track states changes through $scope.$watch where neccesary
@hannahhoward
hannahhoward / gist-reveal.it-slides.html
Last active August 4, 2016 01:04 — forked from ryanj/gist-reveal.it-slides.html
Use Docker, gist.github.com, and Reveal.js to produce themed slideshow presentations for conferences and / or hackathons
<section data-background-transition='zoom' data-transition='concave' data-state='blackout' data-background='http://www.pptback.com/uploads/abstract-fractal-dark-backgrounds-powerpoint.jpg'>
<h1>Phoenix Presence And Channels</h1>
</section>
<section data-background-transition='zoom' data-transition='linear' data-background='http://www.pptback.com/uploads/abstract-fractal-dark-backgrounds-powerpoint.jpg'>
<h2>Outline</h2>
<ul>
<li class="fragment">What are Presence and Channels?</li>
<li class="fragment">Implementing chat for our game rooms using Presence and Channels
<ul>
<li class="fragment">Setup our UI</li>