Seanox XMEX - XML-Micro-Exchange (Free Web Service)

The origin of the project is the desire for an easily accessible place for data exchange on the Internet.Inspired by JSON-Storages the idea of a feature-rich equivalent based on XML, XPath and XSLT was born. The focus should be on a public, volatile and short-term data exchange for (static) web-applications and IoT.

Just exchange data without an own server landscape.
Just exchange data without knowing and managing all clients.

XML-Micro-Exchange is a RESTful volatile NoSQL stateless micro datasource for the Internet. It is designed for easy communication and data exchange of web-applications and for IoT or for other Internet-based modules and components. The XML based datasource is volatile and lives through continuous use and expires through inactivity. They are designed for active and near real-time data exchange but not as a real-time capable long-term storage. Compared to a JSON storage, this datasource supports more dynamics, partial data access, data transformation, and volatile short-term storage.

Why all this?

Static web-applications on different clients want to communicate with each other, e.g. for games, chats and collaboration.

Smart sensors want to share their data and smart devices want to access this data and also exchange data with each other.

Clients can establish dynamically volatile networks.

In this communication are all participants.
No one is a server or master, all are equal and no one has to know the other.
All meet without obligation.

Features

RESTful

The REST API supports the HTTP methods OPTIONS, GET, POST, PUT, PATCH, DELETE.

XPath

XPath axes and functions are used for access, navigation and addressing of targets in the data source and it is an integral part of the URI with dynamic and functional effects.

Multible axes and targets

An XPath axis can address several elements and attributes simultaneously, which can be changed with one call.

XPath Functions

PUT and PATCH support XML structures and static values (text), as well as XPath functions that allow dynamic values.

Data Query

Data can be queried in the form of XML structure or substructure if the XPath notation represents an axis, otherwise the XPath is interpreted as an XPath function and responded with the result as text. Thus XPath provides a dynamic syntax for queries.

Data Transformation

The POST method supports data transformation via XSLT. Similar to GET, data can be queried and then transformed with an XSLT template transmitted via POST.

JSON Support

All requests can be responded by the service in JSON format.

Security

This aspect was deliberately considered and implemented here only in a very rudimentary form. The storage(-key) with a length of 1 - 64 characters and the individual root element can be regarded as secret. In addition, HTTPS is supported but without client certificate authorization.

API

HTTP is used. The URI typically contains a noticeable separator to divide it into context path and XPath. For the API only the XPath is relevant.

https://xmex.seanox.com/xmex!xpath(-function)
<-------------------------->|<-------------->
        Context Path              XPath
    

In some cases, the XPath syntax may not be supported as a URI by the client or provider. In these cases, the XPath can alternatively be used as a query string or hexadecimal or Base64 encoded.

https://xmex.seanox.com/xmex!count(//items[@id<0])
https://xmex.seanox.com/xmex!count(%2F%2Fitems[@id<0])
https://xmex.seanox.com/xmex!0x636F756E74282F2F6974656D735B4069643C305D29
https://xmex.seanox.com/xmex!Base64:Y291bnQoLy9pdGVtc1tAaWQ8MF0p
    

The request supports the following additional headers:

Storage                    Storage identifier optional with name of the root element
Accept-Effects             Controls the content of Storage Effects header
    

Also the reponse has additional headers:

Connection-Unique          Unique ID created by the API to mark client owner data
Storage                    Storage identifier without the name of the root element
Storage-Revision           Current revision of the storage
Storage-Space              Capacity of the storage (total/used in bytes)
Storage-Last-Modified      Timestamp (RFC822) of the last access
Storage-Expiration         Timestamp (RFC822) when the storage will expire
Storage-Expiration-Time    Idle time in milliseconds until storage expires
Storage-Effects            For PUT/PATCH/DELETE, UUIDs directly affected by the request
Execution-Time             Duration of request processing in milliseconds
Error                      Unique error number from the logging with status 500
Message                    Detailed error message with status 400 / 422
    

Notice about response code 404: This always refers to the storage, but never to an addressed target in the storage.
If a target does not exist, requests are responded to with code 204.

Usage

  1. The storage must be opened by OPTIONS.
    This can be done by any client, even if the storage already exists. The response then contains the header Connection-Unique. This is unique across all storages and can be used by the client to identify its own data in the storage. But this is optional and Connection-Unique is neither assigned to the client nor to the connection, it is just a unique value.

  2. The client should always proceed as if it were using storage alone and created the schema it needs.
    The creation of the schema is done with PUT. Relative and conditional axes should be used as targets. This ensures that no duplicates are created or data is overwritten.
             e.g. PUT /books[not(book[@title='A Modern Utopia'])]::last
    This approach made transactions unnecessary.

  3. Now the client can use the storage.

  4. Closing or terminating the storage is not possible and required.
    The storage expires automatically due to inactivity. The duration of use and expiration time of the storage is contained in the response in the headers Storage-Last-Modified, Storage-Expiration, Storage-Expiration-Time.

Free XML-Micro-Exchange

Before using, you must read, understand and agree to Terms of Service and Privacy Policy.

https://xmex.seanox.com/xmex!

65536 Storages x 64 kB
Please do not get confused, the API is online.
Requests without storage identifier are responded with status 400.

It is a small server (1 Core, 512 MB, 10 GB SSD) in a big datacenter -- but apparently enough.
Sponsors are always welcome.
The project needs a good and simple domain and if possible more power.
It costs about 5 Euro per month for 65536 x 1024 kB with double CPU cores and double memory.

Documentation

Manual

Getting Started

OpenAPI GUI

OpenAPI YAML

Examples

Example Multiplayer Snake (Online)

Sources

Open Source

Project on GitHub

About Seanox Software Solutions

Seanox Software Solutions was founded in 2000 as a non-commercial open-source recreational project and it is still that way today. It is pure passion for software development.