Frequently Asked Questions

How do I use Circle on two different computers?

[pfh]: By default, when you first start Circle it creates a new identity for you the first time you run it. This is not so good if you already have a Circle identity that other people know about. You will appear as two different people!

To appear as the same person on a different computer, you need to copy the your circle configuration across to it. Under Linux (and other Unices) this is stored in the .circle sub-directory of your home directory. Under Windows, it is stored in the circle_config sub-directory of the directory where you unzipped Circle.

For example, if you are using Circle on a Linux machine called alice and you also want to use it on bob, type

scp -r ~/.circle bob:.

How do I delete a gossip item?

[pfh]: You don't. Once you've posted it, its too late to change your mind. You can however alter the trust distance. If you give the post a very high trust distance it will only appear far down in people's gossip lists, and chances are not many people will see it.

How do Circle searches work?

[njh]: circle should scale as approx lg(n) links per node. To see this we assume that each node has a link for 1/2 way round the circle, 1/4 way around the circle... 1/2^nth around the circle. We need enough links that the last link is the next link (or close to it). To find any value we need to make at most one 1/2 hop, one 1/4 hop.... 1/2^nth hop, which is lg(n) hops althogether. By knowing more than lg(n) neighbours the algorithm will go faster, or be more reliable. Obviously this is a theoretical result, we haven't seen circle running with more than a few hundred people. The starting time is more dependent on things like published files and network latency for lots of small transfers.

njh clarifies that the above is not the current implementation, but that pfh intends to implement it once it becomes an issue.

Discussion of different topologies (hypernets, hypercubes, hypertori etc.): http://www.perfdynamics.com/Papers/Gnews.html

What are the scrawly signatures shown for people

They are graphical representations of the person's public key.

It is generated by converting the public key a few bits at a time into parameters of bezier curves, and adding a bias towards motion in a positive x direction. (See circlelib/widget.py, search for `bezier'.)

The idea of using bezier curves was to have some visual representation (easier to recognize than say a string of hex digits) that can be displayed on a web page, printed from a [black & white] printer, etc.

Discussion of alternatives

[Please skip this unimportant section.]

Face-looking things might be another interesting representation.

Iterated function system images (e.g. `xlock -nolock -mode ifs') are insufficiently device-independent.

Having different representations for different media is probably a bad thing. Similarly for the idea of implementing a choice of representations. (Conclusion of njh,pfh,ryan.)

What does the Circle icon (in the top-right of the window) mean?

Each mark on the edge of the circle represents a peer that your client is currently connected to. The position around the circle of each mark corresponds to the hash position of a node (circle client).

After your client has been up for ~an hour, the short marks change to arcs. (The point where all the arcs are springing from is your client.) During that first hour, your client doesn't play much of a part in the distributed hash table.
[[pjm]: I wrote this paragraph without checking the details; can someone confirm?]

These hash positions are related to the distributed hash table on which circle is based. If your client has hash position 0.23c5 (to use hexadecimal notation for fractions in the range [0.0, 1.0)), and the next client around the circle is 0.2a3f, then your client will be responsible for hash code positions in the range [0.23c5, 0.2a3f) (i.e. from 0.23c5 inclusive to 0.2a3f exclusive).

"Next around the circle" is in the angular (wraparound) sense, so if your hash is 0.fff3 then the next client might be 0.0002, in which case your client is responsible for [0.fff3, 1.0) and also for the range [0.0, 0.0002).

(The above explanation is written with just 4 hexadecimal digits, but the hashes are actually 128 bits long.)

More on hash storage: load balancing

[rnc]: If a node gets the hash ID 0.1a29, and "mp3" searches get hashed into "0.1a29", then will this node will end up being queried for mp3 files ?
[rnc]: also: What if a node with a lousy connection ends up responsible for all search queries "mp3" ?
[rnc]: is there some kind of load balancing already implemented ?

Hash entries are generally stored at multiple locations (see circlelib/node.py:publish and its doc string). This redundancy gives both load balancing and some resilience against node dropout.

[njh]: pfh tells me there is also a randomised jittering type algo to stop the "Britney spears effect".

Why does circle use so much/99% CPU on (MS) Windows?

[njh]: Not 100% sure, but I suspect a significant proportion of the blame lies somewhere in this code:

  if sys.platform == 'win32':
    # You may scream in horror if you wish.

    threadnice_mainloop_running = 1

    def threadnice_mainloop():
      global threadnice_mainloop_running
      while threadnice_mainloop_running:
        while events_pending():
          mainiteration()
        time.sleep(0.05)
      threadnice_mainloop_running = 1
    ...

[pfh]: Possibly not, that will only execute once every 1/20th second. Compare that with your average processor which executes an instruction every 1/1000000000th of a second.

[njh]: Sure, if the OS can schedule routines at that resolution. Does anybody know what the average nop scheduling time for windows is?

[ryan]: Can someone run the profiler under windows to find out?

A for a solution, the best would be to provide some alternative code; otherwise a) buy a faster computer, b) run circle on a unixy type machine and run via remote X, c) install Linux :) d) increase that 0.05 to say 0.5, but note that doing so will increase the latency of your GUI. Yeah, it sucks.