Skip to content

Commit

Permalink
Prepare v1.0.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
clue committed May 17, 2018
1 parent ffad1ae commit c41a30e
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 9 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.0.0 (2018-05-17)

* First stable release, now following SemVer

* Improve documentation and usage examples

> Contains no other changes, so it's actually fully compatible with the v0.1.2 release.
## 0.1.2 (2018-05-11)

* Feature: Limit buffer size to 64 KiB by default.
Expand Down
47 changes: 39 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,26 @@
# clue/reactphp-ndjson [![Build Status](https://travis-ci.org/clue/reactphp-ndjson.svg?branch=master)](https://travis-ci.org/clue/reactphp-ndjson)

Streaming newline delimited JSON ([NDJSON](http://ndjson.org/)) parser and encoder for ReactPHP.

**Table of Contents**
Streaming newline-delimited JSON ([NDJSON](http://ndjson.org/)) parser and encoder for [ReactPHP](https://reactphp.org/).

[NDJSON](http://ndjson.org/) can be used to store multiple JSON records in a
file to store any kind of (uniform) structured data, such as a list of user
objects or log entries. It uses a simple newline character between each
individual record and as such can be both used for efficient persistence and
simple append-style operations. This also allows it to be used in a streaming
context, such as a simple inter-process commmunication (IPC) protocol or for a
remote procedure call (RPC) mechanism.

* **Standard interfaces** -
Allows easy integration with existing higher-level components by implementing
ReactPHP's standard streaming interfaces.
* **Lightweight, SOLID design** -
Provides a thin abstraction that is [*just good enough*](https://en.wikipedia.org/wiki/Principle_of_good_enough)
and does not get in your way.
Builds on top of well-tested components and well-established concepts instead of reinventing the wheel.
* **Good test coverage** -
Comes with an [automated tests suite](#tests) and is regularly tested in the *real world*

**Table of contents**

* [Usage](#usage)
* [Decoder](#decoder)
Expand Down Expand Up @@ -200,18 +218,24 @@ For more details, see ReactPHP's
The recommended way to install this library is [through Composer](https://getcomposer.org).
[New to Composer?](https://getcomposer.org/doc/00-intro.md)

This project follows [SemVer](https://semver.org/).
This will install the latest supported version:

```bash
$ composer require clue/ndjson-react:^0.1.2
$ composer require clue/ndjson-react:^1.0
```

See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.

This project aims to run on any platform and thus does not require any PHP
extensions and supports running on legacy PHP 5.3 through current PHP 7+ and
HHVM.
It's *highly recommended to use PHP 7+* for this project.

## Tests

To run the test suite, you first need to clone this repo and then install all
dependencies [through Composer](http://getcomposer.org):
dependencies [through Composer](https://getcomposer.org):

```bash
$ composer install
Expand All @@ -225,18 +249,25 @@ $ php vendor/bin/phpunit

## License

MIT
This project is released under the permissive [MIT license](LICENSE).

> Did you know that I offer custom development services and issuing invoices for
sponsorships of releases and for contributions? Contact me (@clue) for details.

## More

* If you want to learn more about processing streams of data, refer to the documentation of
the underlying [react/stream](https://github.com/reactphp/stream) component.

* If you want to process compressed NDJSON files (`.ndjson.gz` file extension)
* If you want to process compressed NDJSON files (`.ndjson.gz` file extension),
you may want to use [clue/reactphp-zlib](https://github.com/clue/reactphp-zlib)
on the compressed input stream before passing the decompressed stream to the NDJSON decoder.

* If you want to create compressed NDJSON files (`.ndjson.gz` file extension)
* If you want to create compressed NDJSON files (`.ndjson.gz` file extension),
you may want to use [clue/reactphp-zlib](https://github.com/clue/reactphp-zlib)
on the resulting NDJSON encoder output stream before passing the compressed
stream to the file output stream.

* If you want to concurrently process the records from your NDJSON stream,
you may want to use [clue/reactphp-flux](https://github.com/clue/reactphp-flux)
to concurrently process many (but not too many) records at once.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clue/ndjson-react",
"description": "Streaming newline delimited JSON (NDJSON) parser, built on top of React PHP",
"description": "Streaming newline-delimited JSON (NDJSON) parser and encoder for ReactPHP.",
"keywords": ["NDJSON", "newline", "JSON", "jsonlines", "streaming", "ReactPHP"],
"homepage": "https://github.com/clue/reactphp-ndjson",
"license": "MIT",
Expand Down

0 comments on commit c41a30e

Please sign in to comment.