Joyce is a highly scalable event-driven Cloud Native Data Hub.

Overview

Joyce

Joyce Release
Documentation Release
Libraries Build

Component docker latest version Build
Import Gateway sourcesense/joyce-import-gateway Docker Image Version (latest semver) Import Engine Build
Joyce Kafka Connect sourcesense/joyce-kafka-connect Docker Image Version (latest semver) Kafka Connect Build
Mongodb Sink sourcesense/joyce-mongodb-sink Docker Image Version (latest semver) Mongodb Sink Build
Rest sourcesense/joyce-api Docker Image Version (latest semver) API Docker Release

Introduction

Joyce is a highly scalable event-driven Cloud Native Data Hub.

Ok! Wait, what? Joyce allows you to ingest data from (almost) any source and expose the ingested data as standard APIs (REST, event notification) automatically. In order to specify to Joyce which data we want to pick from the incoming data stream and how APIs will look like you need to describe the expected behaviour with a DSL based on json-schema.

From a high level perspective Joyce performs 4 tasks:

  • acquire content produced from different sources.
  • transform the raw content with a DSL (a schema)
  • store it somewhere (to a sink)
  • serve the result of this process with an automatic REST API.

Documentation

Documentation is available here

Getting Started

cd joyce-compose
docker-compose up -d

This will startup:

  • a single node kafka instance persisted under data directory
  • a single node zookeeper instance persisted under data directory
  • a single node mongodb instance persisted under data directory
  • AKHQ to monitor kafka topics exposed at localhost:6680
  • joyce-import-gateway exposing it's API at localhost:6651
  • joyce-mongodb-sink to store processed content to mongodb
  • joyce-api exposed at localhost:6650 to consume processed content.

Save a schema

First of all we have to store a schema that tells the system how to project the content we import inside Joyce.

A schema is an enhanced json-schema with keywords that tells how to transform/project a content.

For a complete documentation on schema go here

You can write a schema in json or yaml.

Let's try to save one.

cat > import-user.yaml  <<- "EOF"
$schema: https://joyce.sourcesense.com/v1/schema
$metadata:
  subtype: import
  namespace: default
  name: user
  description: A test schema
  development: true
  uid: code
  collection: users
type: object
properties:
  code:
    type: integer
    $path: $.user_id
  name:
    type: string
    $path: $.first_name
  surname:
    type: string
    $path: $.last_name
  full_name:
    type: string
    $script: 
      language: python
      code: "'_'.join([source['first_name'].upper(), source['last_name'].upper()])"
  email:
    type: string
  email_checks:
    type: object
    $rest:
      url: "https://api.eva.pingutil.com/email?email={{email}}"
      method: GET
      headers:
        Content-Type: application/json
      vars:
        email: "$.email"
      extract: "$.data"
    properties:
      valid:
        type: boolean
        $path: $.valid_syntax
      disposable:
        type: boolean
      spam:
        type: boolean
  kind:
    type: string
    $fixed: "SimpleUser"
EOF

Now we have to save the schema to import-gateway component:

curl -X POST -H "Content-Type: application/x-yaml" --data-binary @import-user.yaml http://localhost:6651/api/schema

Now your schema is ready to be used by the api, you can check it by going to http://localhost:6651/api/schema/import/default/user.

Configure API

If you go to http://localhost:6650/docs you'll see a swagger interface with no resources, that's why resource derives from schema and must be configured to be exposed.

create a file schemas.json with this content:

cat > schemas.json  <<- "EOF"
{   
    "schemas": {
        "test-users": {
            "source": "http://import-gateway:6651/api/schema/import/default/user"
        }
    }
}
EOF

Edit the docker compose to expose the file as a volume:

  rest:
     image: sourcesense/joyce-rest:latest
     ports:
       - "6650:6650"
     environment:
       - MONGO_URI=mongodb://user:password@mongodb:27017/joyce
+      - SCHEMAS_SOURCE=/opt/schemas.json
+    volumes:
+      - ./schemas.json:/opt/schemas.json
     links:
       - mongodb
       - import-gateway

Now restart the api to load the schema:

docker-compose stop rest
docker-compose up -d rest

Check again swagger http://localhost:6650/docs and you'll see your resource.

Import documents

Now you are ready to store content to the import-gateway:

curl -0 -v "http://localhost:6651/api/import" \
-H 'Content-Type: application/json; charset=utf-8' \
-H "accept: application/json; charset=utf-8" \
-H "X-Joyce-Schema-Id: joyce://schema/import/default.user" "http://localhost:6651/api/import" \
--data-binary @- << EOF
{
    "user_id": 1337,
    "first_name": "Jon",
    "last_name": "Snow",
    "email": "[email protected]",
    "state": "Westeros"
}
EOF

Your content should be transformed soon and can be retrieved using the api

curl http://localhost:6650/api/test-users

If anything goes wrong, notification of errors and success during processing are published on the joyce_notification topic on kafka, you can inspect easily by using akhq on localhost:6680.

You might also like...

A high availability shopping(ecommerce) system using SpringBoot, Spring Cloud, Eureka Server, Spring Cloud Gateway, resillience4j, Kafka, Redis and MySQL.

A high availability shopping(ecommerce) system using SpringBoot, Spring Cloud, Eureka Server, Spring Cloud Gateway, resillience4j, Kafka, Redis and MySQL.

High-availability-shopping-system A high availability shopping(ecommerce) system using SpringBoot, Spring Cloud, Eureka Server, Spring Cloud Gateway,

Oct 26, 2022

DsMask - Scalable data masking sample code

DsMask - Scalable data masking sample code

This repository contains the sample code, which shows a way to implement complex policy-based data masking on IBM DataStage platform, using masking algorithms coming with IBM InfoSphere Optim.

Feb 4, 2022

Cloud Native and Low Code Platform to create FullStack web Admin applications in minutes

Cloud Native and Low Code Platform to create FullStack web Admin applications in minutes

Cloud Native and Low Code Platform to create FullStack web Admin applications in minutes ✨ Features & Technologies REST API generator Low Code CRUD &

Dec 26, 2022

Cloud native multi-runtime microservice framework

Cloud native multi-runtime microservice framework

Femas: Cloud native multi-runtime microservice framework The repository address has been transferred to PolarisMesh English | 简体中文 Introduction abilit

Sep 5, 2022

PolarDB-X is a cloud native distributed SQL Database designed for high concurrency, massive storage, complex querying scenarios.

PolarDB-X is a cloud native distributed SQL Database designed for high concurrency, massive storage, complex querying scenarios.

中文文档 What is PolarDB-X ? PolarDB-X is a cloud native distributed SQL Database designed for high concurrency, massive storage and complex querying scen

Dec 31, 2022

A fast, light and cloud native OAuth 2.0 authorization microservices based on light-4j

A fast, light weight and cloud native OAuth 2.0 Server based on microservices architecture built on top of light-4j and light-rest-4j frameworks. Stac

Dec 17, 2022

An advanced and highly optimized Java library to build framework

An advanced and highly optimized Java library to build framework

An advanced and highly optimized Java library to build frameworks: it's useful for scanning class paths, generating classes at runtime, facilitating the use of reflection, scanning the filesystem, executing stringified source code and much more...

Dec 21, 2022

A joint research effort for building highly optimized Reactive-Streams compliant operators.

reactive-streams-commons A joint research effort for building highly optimized Reactive-Streams compliant operators. Current implementors include RxJa

Dec 23, 2022

A compact and highly efficient workflow and Business Process Management (BPM) platform for developers, system admins and business users.

Flowable (V6) Maven Central: Docker Images: License: Homepage: https://www.flowable.org/ flowable / flowəb(ə)l / a compact and highly efficient workfl

Jan 7, 2023
Releases(v1.3)
Owner
Sourcesense
Speed up your business transformation
Sourcesense
A cloud-native, serverless, scalable, cheap key-value store

Sleeper Introduction Sleeper is a serverless, cloud-native, log-structured merge tree based, scalable key-value store. It is designed to allow the ing

GCHQ 21 Dec 26, 2022
WaterHub - BungeeCord Hub System

How to use: 1. Stop your server. 2. Download and drag the plugin .jar file into your plugins folder. 3. Start your server to generate config files. 4.

RDProject 3 May 9, 2022
Server grouping /hub and /lobby command

BungeeHub Server grouping /hub and /lobby command This plugin only needs to be installed in BungeeCord/Waterfall. There is currently no development pl

Bing's Plugins 2 Dec 12, 2022
You want to go to a cafe but don't know where to go. Let cafe hub support you. Ok let's go

cafe-hub You want to go to a cafe but don't know where to go. Let cafe hub support you. Ok let's go Architecture: Domain Driven Design (DDD) LDM Insta

Khoa 1 Nov 12, 2022
The goal of this project is to play with Spring Cloud Stream Event Routing and CloudEvents

The goal of this project is to play with Spring Cloud Stream Event Routing and CloudEvents. For it, we will implement a producer and consumer of news & alert events.

Ivan Franchin 6 Oct 28, 2022
循序渐进,学习Spring Boot、Spring Boot & Shiro、Spring Batch、Spring Cloud、Spring Cloud Alibaba、Spring Security & Spring Security OAuth2,博客Spring系列源码:https://mrbird.cc

Spring 系列教程 该仓库为个人博客https://mrbird.cc中Spring系列源码,包含Spring Boot、Spring Boot & Shiro、Spring Cloud,Spring Boot & Spring Security & Spring Security OAuth2

mrbird 24.8k Jan 6, 2023
一个涵盖六个专栏:Spring Boot 2.X、Spring Cloud、Spring Cloud Alibaba、Dubbo、分布式消息队列、分布式事务的仓库。希望胖友小手一抖,右上角来个 Star,感恩 1024

友情提示:因为提供了 50000+ 行示例代码,所以艿艿默认注释了所有 Maven Module。 胖友可以根据自己的需要,修改 pom.xml 即可。 一个涵盖六个主流技术栈的正经仓库: 《Spring Boot 专栏》 《Spring Cloud Alibaba 专栏》 《Spring Clou

芋道源码 15.7k Dec 31, 2022
一套涵盖大部分核心组件使用的Spring Cloud教程,包括Spring Cloud Alibaba及分布式事务Seata,基于Spring Cloud Greenwich及SpringBoot 2.1.7。22篇文章,篇篇精华,32个Demo,涵盖大部分应用场景。

springcloud-learning 简介 一套涵盖大部分核心组件使用的Spring Cloud教程,包括Spring Cloud Alibaba及分布式事务Seata,基于Spring Cloud Greenwich及SpringBoot 2.1.7。22篇文章,篇篇精华,32个Demo,涵盖

macro 5.6k Dec 30, 2022
Demo microservice architecture with Spring ,Spring Cloud Gateway , Spring Cloud config server , Eureuka , keycloak and Docker.

spring-microservice Demo microservice architecture with Spring ,Spring Cloud Gateway , Spring Cloud config server , Eureuka , keycloak and Docker. Arc

null 4 Sep 13, 2022
A spring cloud infrastructure provides various of commonly used cloud components and auto-configurations for high project consistency

A spring cloud infrastructure provides various of commonly used cloud components and auto-configurations for high project consistency.

Project-Hephaestus 2 Feb 8, 2022