Skip to content

Commit

Permalink
piqi-0.5.5 release
Browse files Browse the repository at this point in the history
  • Loading branch information
alavrik committed Apr 12, 2011
1 parent 9087531 commit 3308f37
Show file tree
Hide file tree
Showing 3 changed files with 135 additions and 24 deletions.
104 changes: 104 additions & 0 deletions CHANGES
@@ -1,3 +1,107 @@
Piqi 0.5.5 (April 12, 2011)
===========================

Highlights:

- Multi-format data serialization for Erlang (JSON, XML, Protocol Buffers)
- Piqi-RPC -- an RPC-over-HTTP system for Erlang
- Support for XML encoding
- Function definitions in the Piqi language
- Piqi getopt -- type-based command-line arguments parsing

Backward-incompatible changes:

- "piqirun" Erlang application is renamed to "piqi" (contains the old
"piqirun.erl" and some new functionality). The new application runs a
supervisor and some servers which are used by Piqi-RPC and multi-format data
serialization (see below).

- (piqic ocaml, piqic erlang) Both Piqi compilers now generate
"<Mod>_piqi.ml|.erl|.hrl" instead of "<Mod>.ml|.erl|.hrl". For OCaml it is
still possible to specify the name of the output file explicitly using "-o"
parameter. OCaml and Erlang module names can be also set using
"ocaml-module" and "erlang-module" directly in the .piqi file.

- (ocaml) Generated OCaml serialization functions (i.e. gen_<typename>) now
accept 1 arguments instead of 2. Old functions accepting 2 arguments are
renamed to gen__<typename>. The removed argument is an integer tag for a
Protobuf field -- there's rarely a need to specify it explicitly.

Important changes in Erlang serialization:

- Generated Erlang serialization functions (i.e. gen_<type>/2) can also accept
only 1 argument. It is now possible to use gen_<type>(X) instead of
gen_<type>('undefined', X).

- Calling piqirun:init_from_binary/1 is no longer necessary as all
parse_<typename>/1 functions will accept Erlang binaries.

Other changes:

- (piqirun-erlang) Improved error reporting when deserializing incomplete
data: a special 'not_enough_data' exception will be thrown in such case.
- (json) Wrapping top-level primitive values into {"_": <value>} object to
conform with JSON RFC4627 specification.
- Piqi-light syntax improvements for better readability.
- Don't generate {<field>: null} for optional fields missing in JSON records.
- Tests will now work even if Protocol Buffers is not installed.
- (piqirun-ocaml) Remove "Stream" layer and use channels directly in the input
buffer.

Bug fixes:

- (erlang) Fixed incorrect Erlang mapping for some built-in types (problem was
introduced in 0.5.4 release).
- (erlang) A proper support for records with no fields.
- (piqic ocaml) crash on imports of built-in aliases (Issue #2).
- (make ocaml-install) Fixed installation of OCaml libraries which conflicted
with installation of OCaml dependencies (Issue #1).

New functionality (XML support):
- "piqi convert" can now convert data between Protobuf, XML, JSON and Piq
formats. Other Piqi commands that rely on conversion functionality, such as
"piqi getopt", can work with XML as well.

New functionality (XML, JSON and Piq serialization for Erlang):

- "piqic-erlang-ext" -- a command-line Piqi compiler (an extended version of
"piqic erlang" command). It generates Erlang code for
serializing/deserializing data XML, JSON, Piq, Protobuf formats.
- piqi_tools.erl -- Erlang bindings for Piqi tools implemented as Erlang
port running "piqi server".

New functionality (miscellaneous):

- Support for serializing top-level values of primitive types (ocaml, erlang,
piqi tools, all formats).
- (piqirun-erlang, piqirun-ocaml) New functions for encoding/decoding
length-delimited blocks (gen_block/parse_block). Compatible with similar
functionality in Protocol Buffers.
- (piqic-ocaml, piqic-erlang) Support for generating default values for types:
'piqic ocaml|erlang --gen-defaults ...'.
- A new "piqi getopt" command interprets idiomatic command-line arguments as
Piq data object (according to a Piqi type spec) and converts it to JSON,
XML, Piq and Protobuf formats.
- Piqi-RPC -- an PRC-over-HTTP system for Erlang (see below).
- Performance tests for Erlang serialization to/from Protobuf, JSON, XML, Piq.

New functionality (Piqi-RPC):

- Support for function definitions in the Piqi language, all the Piqi tools,
compilers, OCaml, Erlang and Protocol Buffer mappings.
- A new "piqi server" command that talks Piqi-RPC over Unix pipe and exposes
data conversion functionality.
- A new "piqi call" -- Piqi-RPC command-line client that interprets
command-line arguments as input parameters for remote functions and
communicates with Piqi-RPC servers via HTTP or Unix pipe.
- piqi-rpc -- an Erlang application containing runtime support libraries and
HTTP interface for Piqi-RPC.
- "piqic-erlang-rpc" -- a command-line Piqi compiler and server stubs
generator for Piqi-RPC/Erlang.
- A new "piqic expand" command. It is similar to "piqi expand" but also sets
piqic-specific fields, such as OCaml and Erlang names.


Piqi 0.5.4 (December 19, 2010)
==============================

Expand Down
53 changes: 30 additions & 23 deletions README
Expand Up @@ -4,33 +4,40 @@ OVERVIEW
Piqi is a set of languages and open-source tools for working with structured
data. It includes:

* A cross-language data serialization system compatible with Google
Protocol Buffers. It allows programs implemented in various languages to
exchange and persist data in a portable manner.

* High-level data representation (Piq) and data definition languages
(Piqi).

* Tools for validating, pretty-printing and converting data between
Piq, JSON and portable binary encoding.

As a data serialization system, Piqi follows a static approach, when high-level
data specification is used to generate static code for serializing and
deserializing data structures.

Piqi implements native support for OCaml and Erlang programming languages.
Connectivity with other languages is provided via Google Protocol Buffers.

In fact, Piqi was inspired by Google Protocol Buffers and specially designed to
be largely compatible with it. Like Protocol Buffers, Piqi relies on type
- A cross-language data serialization system compatible with Google Protocol
Buffers. It allows programs implemented in various languages to exchange
and persist data in a portable manner.

- Piq -- a human-friendly typed data representation language. It is designed
to be more convenient for representing, viewing and editing data than
JSON, XML, CSV, S-expressions and other formats.

- Piqi -- a powerful data definition language. It is specially designed to be
used with Piq, but also works as a schema language for other data formats
including JSON, XML and Protocol Buffers binary format. Tools for
validating, pretty-printing and converting data between Piq, JSON, XML and
Protocol Buffers binary format.

- Piqi-RPC -- an RPC-over-HTTP system for Erlang. It provides a simple way to
expose Erlang services via JSON, XML and Google Protocol Buffers over
HTTP.

As a data serialization system, Piqi implements native support for OCaml and
Erlang. Connectivity with other programming languages is provided via Google
Protocol Buffers. Overall, Piqi provides a more natural mapping to functional
programming languages compared to various serialization systems that were
originally designed for imperative or object-oriented languages.

Piqi was inspired by Google Protocol Buffers and specially designed to be
largely compatible with it. Like Protocol Buffers, Piqi relies on type
definitions and supports data schema evolution. The main difference is that Piqi
has a richer data model, high-level modules and a human-friendly data
representation language (Piq).
has a richer data model, high-level modules and a powerful data representation
language (Piq).

The combination of data representation (Piq) and data definition (Piqi)
languages is similar to the concept of "valid XML" (i.e. XML conforming to some
XML Schema). However, unlike XML, Piq has a concise, clean syntax and a data
model similar to those of high-level programming languages such as ML.
model similar to those of high-level programming languages.


FURTHER INFORMATION
Expand Down Expand Up @@ -69,7 +76,7 @@ FILES
piqilib/ Piqi common library
piqirun-ocaml/ Piqi runtime library for OCaml
piqi-erlang/ Piqi runtime library and Piqi tools bindings for Erlang
piqi-rpc/ an RPC over HTTP system for Erlang
piqi-rpc/ Piqi-RPC -- an RPC-over-HTTP system for Erlang
examples/ examples
tests/ tests for various piqi functionality; see tests/README
editors/ text editor plugins for .piq and .piqi files
Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
0.5.5-dev
0.5.5

0 comments on commit 3308f37

Please sign in to comment.