The Fliox DemoHub is a Web server application to demonstrate the features of the JSON Fliox .NET library.
In short
JSON Fliox is .NET library supporting simple and efficient access to NoSQL databases via C# or Web clients.
For a simple setup the server is also the database storing records (entities) in-memory or in the file-system.
This enables running the server without any configuration or installation of a third party DBMS (database management system).
TL;DR
DemoHub on AWS - EC2: t2-micro, us-east-1
The key class when running a HTTP server using Fliox Hub is DemoClient.cs.
This class provide two fundamental functionalities:
- It is a database client providing type-safe access to its containers, commands and messages
- It defines a database schema by declaring its containers, commands and messages.
The schema is used by host for record validation and exposing the schema in various formats:
JSON Schema, OpenAPI, GraphQL, HTML, Typescript, C# & Kotlin.
The main features of a HTTP Fliox Hub are:
- provide JSON based Web APIs - RESTful, HTTP & WebSocket Batch - to access key-value or document databases.
- assign a database schema to each database
- aim for optimal request performance regarding low latency and high throughput
- enable simple and efficient TDD as database access can be tested with in-memory or file-system databases
- host a single-page Web App to browse database containers / tables and execute domain specific commands See Hub Explorer
- enables access to administrative databases via Web APIs and the Hub Explorer:
cluster
listing the databases and their containers exposed by the servermonitor
to get monitoring information like requests & tasks executed by users & clientsuser_db
to explore or change user access rights
- provide a REST API described by an OpenAPI specification and host Swagger UI to explore the API
- provide a GraphQL API and host GraphiQL to explore the API
- Fliox Hub is designed as a library - not a framework.
This enable seamless integration in any ASP.NET application by a single route. e.g."/fliox/{*path}"
📂 Client
┣ 📄 DemoClient.cs 1. is a database client
┃ 2. is a database schema for a Hub
┣ 📄 Models.cs contain entity types & command models (DTO's)
📂 Hub
┣ 📄 DemoCommands.cs implement DemoHub API (database commands) by utilizing DemoClient instances
┣ 📄 FakeUtils.cs utilize https://github.com/bchavez/Bogus to generate fake records
┣ 📄 Program.cs bootstrapping & configuration of host > dotnet run
┣ 📄 Startup.cs ASP.NET 8 configuration and host integration
📂 Test
┣ 📄 DemoTests.cs unit tests > dotnet test
┗ 📄 Trial.cs small samples > dotnet run