Rings - ShadowJonathan/ByteCart GitHub Wiki
Definition
A ring is a closed circuit where carts will naturally run in a loop. A ring is the basic cell of a ByteCart network. There are up to 2047 rings in each region, numerotated from 1 to 2047. On a LAN view, a ring is a subnet of the region containing 256 station address (only 255 are usable).
A ring is dedicated to circulation and ditribution of traffic. Carts must never stop on the ring.
Designing a ring generally consists on building a 2-way railroad and closing its ends to close the loop, then plugging stations in it. Any shape can be a ring if it matches the definition of a infinite loop.
Stations must be built aside from the ring, not on the ring, i.e. a cart stopping at a station must leave the ring.
If a router is needed, it will be located at one end of the ring. A second router may be built at the other end. An unlimited number of routers can be plugged in the ring, connecting input and output of an interface of the router to the ring so that the loop is not broken.
Function
A ring has two functions:
- dispatching local traffic to stations depending on it. This function can be delegated to Extended Rings.
- transporting non-local traffic from router to router.
Special rings
- Extended Rings provide only function #1.
- Rings plugged in backbone routers provide only function #2.
- Garbage collector rings provide none of the functions.
Constraints
-
All 255 stations of a ring and its extended rings must have an address in the subnet of the ring and be physically attached to the ring or its extended rings.
-
All traffic to or from another ring or region must pass through a router plugged in the ring.
Extended ring
An extended ring is a physical extension plugged in the main ring. Only traffic to the stations of Extended Ring will be deviated to the Extended ring, all other traffic will take the main ring. Use of Extended rings may optimize router-to-router traffic in a large area where stations may be far from the straight line between routers.
All address of an extended ring must meet the Extended Ring requirements. At the intersection between the main ring and an extended ring, a device must manage the direction switch according to destination address, and, optionally, anti-collision policy.
LAN view
In the LAN topology, rings have a network mask of 2047.2047.0. Extended rings have a network mask of 2047.2047.x where x is a power of 2 less 1 (1, 3, 7, etc. until 255)