![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |
• Seeders play an active role in maintaining the space by providing CPU and RAM.
• Leeches play a passive role. They have access to space data but provide no resources.You can set up an as-agent to provide proxy access to the metaspace for remote clients by specifying a “remote listen” URL in the as-agent command line arguments.
• You can also use the as-agent process to “keep the data alive” when all of the instances of an application have disconnected from the metaspace.Figure 1, Distribution of Entries in a Space shows how the entries for a space are distributed between seeders in the space. Each seeders has approximately the same number of entries.Figure 1 Distribution of Entries in a Space
• Shared-Nothing Persistence Each node that joins a space as a seeder maintains a copy of the space data on disk. Each node that joins as a seeder writes its data to disk and reads the data when needed for recovery and for cache misses.
• Shared-All Persistence The implementation of this mode of persistence is built into the ActiveSpaces libraries. All nodes share a single persister or a set of persisters. Your application must provide an implementation of the persistence interface and interface to the shared persistence layer of choice.The directory you specify is used as the root path under which ActiveSpaces creates its own subdirectory structure, using the format metaspace/space/member.With shared-all persistence, certain space members are designated as persisters — to provide the service of interacting with a persistence layer, just as some of the space members — the seeders — provide the basic space service.
• Space State Indicates whether the space can accept regular space operations or not. This happens only when the space is in READY state.
• Persistence Type Defines what type of persistence ActiveSpaces uses. Shared-all and shared-nothing are the supported types. Only one type of persistence can be configured on the same space at the same time.
• Persistence Policy Defines how the changes to space will be persisted—synchronously or asynchronously.
• Member Name A unique name to identify each node/seeder/member. Recommended if using shared-nothing persistence.
• Data Store The file system/directory location where ActiveSpaces stores the persistence files.
• Data Loss Data loss is detected by ActiveSpaces when the number of nodes (seeders) that either leave or fail (due to a crash) the space exceeds the count set for that space. In such a scenario, space will be marked as FAILED.
• Space Recovery ActiveSpaces recovers a space (based on user intervention) when the space state is FAILED either due to data loss or cluster startup.
• Space Resume ActiveSpaces resumes a space (based on user intervention) when the space goes into a SUSPENDED mode due to loss of a persister.
• Recovery with Data Use this option if data loss is not acceptable and you want to reload the data from persistence files into the space.
• Recovery Without Data If data loss is acceptable, then use recovery without data. This specifies that ActiveSpaces does not load data back into the space from persistence files.
• INITIAL The space has been defined and is waiting for the minimum number of seeders required by the space's definition to be reached, and for at least one persister to be registered if it is a persisted space.
• LOADING The space is a persisted space that has reached the required minimum number of seeders and has at least one registered persister. One of the persister's onLoad methods is being invoked and the space data is being loaded from the persistence layer.
• READY The space has the required minimum number of seeders and if persisted, has been loaded and has at least one registered persister.Your application can check that the space is in the READY state before attempting to use it by using the space's isReady() method.Your application can also synchronize itself with the space's state by using the space's waitForReady method. This method takes a timeout that is the number of milliseconds for which it will block while waiting for the space to reach the READY state and returns a boolean value indicating whether the timeout was reached or not (Java also has a convenience version of the method that does not take a timeout and just blocks until the space is ready).Another way to synchronize an application with the space's state is to rely on the space definition's SpaceWait attribute: a configurable timeout that is used to block space operations when the space is not in the READY state until either the space becomes ready (at which point the operation is executed) or the SpaceWait timeout expires (at which point the operation will fail).
− With external shared-all persistence, the onLoad method of one of the registered persistence implementations is invoked.This is done either synchronously or asynchronously in a distributed manner by each seeder (including those that replicate the data). Data is persisted to it's designated local storage file folder in shared-nothing persistence, or by the persistence implementation's onWrite method in external shared-all persistence mode.
![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |