Download the PHP package withinboredom/distributed-hashmap without Composer

On this page you can find all versions of the php package withinboredom/distributed-hashmap. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package distributed-hashmap

distributed-hashmap

A Distributed hashmap for Dapr.

This is a simplistic lock-free implementation of a hashmap that allows fast concurrent writes. It works almost like a regular hashmap except instead of using memory, it uses Dapr State.

Features

  1. Subscribe/unsubscribe to key changes/deletes/inserts.
  2. Supported in multiple languages.
  3. Have a large list of items without worrying about race conditions.

Implementations:

Limitations

There are several limitations with the current version:

Size

There's no way to get the number of keys in the hashmap without causing contention or having to iterate over every bucket. Therefore, it simply is not a provided function. Open an issue if you want this anyway.

Rebuilding

When creating the hashmap, please try to guess at the number of keys you may have stored and the maximum load of each bucket. If the maximum keys are set too small or the maximum load is too large, you may end up with too much contention or unexpected rebuilds of the hashmap.

Once maxLoad number of items are in a hashmap bucket, a rebuild is triggered. This means every reader/writer of the hashmap will immediately start copying all keys from the hashmap into a new generation of the hashmap. Every reader/writer needs to participate to ensure redundancy because they do not coordinate. Old keys from previous generations are not deleted. While this is pretty fast, it still takes several minutes once the size of the hashmap grows beyond ~100,000 items.

Concurrency

In my experiments, there isn't many issues with concurrency except how different languages approach parallel tasks. For example, forking in PHP results in very little overhead allowing over 2000 threads to concurrently write to a hashmap with very little overhead, while C# tends to bog down after the number of actively writing threads goes over the number of physical cores on the machine.


All versions of distributed-hashmap with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
dapr/php-sdk Version dev-main
lastguest/murmurhash Version ^2.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package withinboredom/distributed-hashmap contains the following files

Loading the files please wait ....