Skip to main content

A memory map for the World Wide Web

Project description

[thingking](http://dx.doi.org/10.5281/zenodo.10773)
![doi](http://zenodo.org/badge/doi/10.5281/zenodo.10773.png)

ThingKing assigns a byte-for-byte correlation between a resource on
the World Wide Web (WWW) identified by its Uniform Resource Locator
(URL) and a Python virtual memory buffer. The PageCacheURL class
defines an LRU mechanism for caching pages from a URL, with a
default page size of 1 MB and an active pool of 1024 pages. The
HTTPArray class extends this model to numpy arrays, while httpfile
supplies a file-like interface.

Once the URL is mapped to an HTTPArray, an application may index the
array as if it was present in main memory. The interface also enables
"lazy loading", using a small amount of RAM even for very large
resources.

Copyright (c) 2014, Matthew J. Turk, Samuel W. Skillman and Michael S. Warren
All rights reserved.

__thingking__ is distributed under the terms of the BSD 3-clause License.
The full license is in the file COPYING.txt, distributed with this software.

For use in research and related activities, please cite the following
as appropriate:

Matthew J. Turk, Samuel W. Skillman and Michael S. Warren
(2014). ThingKing: Memory Mapping the World Wide Web. Zenodo.
[doi:10.5281/zenodo.10773](http://dx.doi.org/10.5281/zenodo.10773)


thingking
=========

[http://www.physics.ohio-state.edu/~bcd/humor/paging.game.html](http://www.physics.ohio-state.edu/~bcd/humor/paging.game.html)

28-Feb-80 15:38:18-EST,00004278;000000000001
--------
DATE: 28-Feb-80 15:38
FROM: MARANTZ
Subject: The Paging Game
To: BBOARD

THE PAGING GAME

1. Each player gets up to 8,388,608 THINGS in the version 4 game.
In older games, each player gets up to 262,144 things.

2. Things are kept in CRATES that hold 512 things each. Things
in the same crate are called crate-mates.

3. Crates are stored either in the WORKSHOP or a WAREHOUSE. The
workshop is almost always too small to hold all the crates.

4. There is only one workshop but there may be several warehouses.
Everybody shares them.

5. Each thing has its own THING NUMBER.

6. What you do with a thing is to ZARK IT. Everybody takes turns
zarking.

7. You can only zark your things, not anybody else's.

8. Things can only be zarked when they are in the workshop.

9. Only the THING KING knows whether a thing is in the workshop or
in a warehouse.

10. The longer a thing goes without being zarked, the GRUBBIER it is
said to become.

11. The way you get things is to ask the thing king. He gives out
things only in full crates at a time.

12. The way you zark a thing is to give its thing number. If you
give the number of a thing that happens to be in the workshop it
gets zarked right away. If it is in a warehouse, the thing king
packs the crate containing your thing back into the workshop. If
there is no room in the workshop, he first finds the grubbiest
crate in the workshop, whether it be yours or somebody else's,
and packs it off with all its crate-mates to a warehouse. In its
place he puts the crate containing your thing. Your thing then
gets zarked and you never knew that it wasn't in the workshop all
along.

13. Each player's things have the same numbers as everybody else's.
The thing king always knows who owns what thing and whose turn
it is, so you can't ever accidentally zark somebody else's thing
even if it has the same thing number as one of yours.

14. If the thing king must move a crate from the warehouse to the
workshop to let you zark it, he first sends you to sleep so you
don't mind the wait.

NOTES

1. Traditionally, the thing king sits at a large, segmented table
and is attended to by pages (the so-called "TABLE PAGES") whose
job it is to help the thing king remember where all the things
are, who they belong to, and how grubby they are.

2. One consequence of Rule 13 is that everybody's thing numbers will
be similar from game to game, regardless of the number of players.

3. The thing king has a few things of his own, some of which move
back and forth between workshop and warehouse just like anybody
else's. Some, however, are just too heavy to move out of the
workshop.

4. With the given set of rules, oft-zarked things tend to get kept
mostly in the workshop while little-zarked things stay mostly in
a warehouse. This is efficient stock control.

5. Sometimes even the warehouses get full. The thing king then has
to start piling things on the dump out back. This makes the game
slower because it takes a long time to get things off the dump
when they are needed in the workshop. The thing king tries to
select the grubbiest things in the warehouse to send to the dump
in his spare time, but sometimes even this doesn't help, and the
thing king has to take more time away from players to move crates.
This is caused by a player trying to zark so many things at once
that even crates which aren't grubby at all have to be moved into
the warehouse. This is called THRASHING, and at times like these
the game is more for a fool than the thing king.

6. From note 5, a player can figure out that if he has a lot of
things to zark, it is best to zark only a small number of things
at once, and to get a thing's zarking done with quickly. That
way, the thing king doesn't have to do as much thrashing, and
can reward the player by putting him to sleep less often. Players
who do this win the game, and help other players win too.

-- several sources (last snarfed from SCORE's bboard)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

thingking-1.1.1.tar.gz (38.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page