CenitHub: Introduction

33
CenitHub Open Source Social Platform for Data & Business Integration

Transcript of CenitHub: Introduction

CenitHubOpen Source Social Platform for Data & Business Integration

Index● Introduccion

● Data Specifications

● Populate Cenit

● Router Logic

CenitHubINTRODUCTION

What we do?!CenitHub solution is an Open Source and Social Platform as a Service for Data and Business Integration. It allows the automation of operational process, connecting legacy apps and internet services. It also offers an ERP & CRM workspace empowered with B2B features. !The zenith (es: cenit) is an imaginary point directly "above" a particular location, on the imaginary celestial sphere.

General Features● 100% Open Source and community friendly.

● Router Logic for redirect documents to different endpoints.

● Powerful design with simple abstractions: Data Type, Webhook, Flow, Event, Connection,

Transform and Validator.

● Support exchange multiple formats XML, JSON, EDI( X12, EDIFACT, etc.).

● Load validators: XSD, JSON Schema, EDI grammars, regular expressions.

● Powerful transformations tools to translate several formats in others.

● Full stack HTTP RESTful API, and building client libraries for Ruby and Python.

● Social networking features to shared integration settings, named shared collections.

● Export and import shared collections as a github repo and a ruby gem.

● Pre-built integrations to internet services ready to use out the box.

Frameworks and tools● Ruby on Rails

● Mongoid

● Mongoid and Mongoff

● RailsAdmin for build the admin panel.

● RabbitMQ for internal pipeline for exchange messages

CenitHubDATA DEFINITIONS

Data definitions● Schemas

● Data Types

● Library

Data TypesCeni t -hub can process ob jec ts tha t are Data

representations of real-world commerce information such

as orders, shipments, and products. All communication

involves sending and/or requesting objects. Can use one of

the next formats: JSON, XML or EDI.

Registration Data TypeProvides the option for load dynamically Data Type

specifications, using different Schema Specification.

● JSON Schema

● XML Schema

● EDI Grammar

Add Product Data Type

Product Schema

Now is possible add Product Data

Loaded Products

Schema LibraryThrough a Library should be possible Load a complete Collection of Schemas that will cover many of the uses that it will see commonly in specific Business Domain.

CenitHubCENIT POPULATIONS

How can Cenit-hub receive Data?● API ● Using a request Webhook for receive data (trigger by

CenitHub) ● Manually using Cenit interface.

CenitHubROUTER LOGIC

Router Logic● Connections

● Connection Roles

● Events

● Flows

● Webhooks

Event

● The first time the hub receives an object: o object:created (Order:created, inventory:created)

● Each time a real change is received: o object:updated (product: updated, customer:updated)

● Event builder – custom

Event Webhook Integration

Order:created /add_order OpenERP

Shipment:confirm /update_shipment Spree

Trigger Flows

Default Events

● The first time the hub receives an object: o object:created

▪ Product:created, Order:created

● Each time a real change is received:

o object:updated

▪ product: updated, customer:updated

Custom Events

● It is possible create custom event.

● Allows to create event queries

● Multiples queries

● reusing rails_admin interface for filters

WebhooksThe webhook are the final step in a flow, implemented like a request HTTP to an endpoint, for sent or receive data.

Is recommend the use:

● the prefix add and update for webhooks that send objects,

● and get for webhooks that receive object.

Webhooks-Objects● Order

o add_order

o update_order

o get_orders

● Customer o add_customer

o update_customer

o get_customers

● Product

○ add_product

○ update_product

○ get_products

● Foo

○ add_foo

○ update_foo

○ get_foo

In the request session is possible add an schema to validate the flow document. Then has the option for save as an object of specific data-type. Finally you can decide trigger events associated with the object saved. The data-type could be same or different that has the flow. !In the response session has the same options. Add an schema validation, save an object and trigger events. !

Webhooks-Request/Response

FlowsDefine how data is routed between endpoints and all Integrations in order to automate your operations. The relevant Flows will be triggered by Cenit based on the Events that you define for your connection.

Flow: Transformations● Is possible apply different kinds of transformation

o Double brackets format. o XLS Transformation to a Flow. o Action View handlers

● Is possible test a transformation in a Flow, for that all the data type have data sample.

!!!XSLT (Extensible Stylesheet Language Transformations) is a language for transforming XML documents into other XML documents or other objects.

Transformation: Double brackets format● {{fields}} Any field represented in the JSON data may be retrieved by

referencing the field name inside double brackets. { "sms":{ "from": "+13018416788", "message": "Thanks you! {{order.shipping_address.firstname}}. Your order {{order.id}} has been placed" "phone": "{{order.shipping_address.phone}}" } } ● Utility functions {{ fields | function }} !

escape, encodeURI, truncate, format, replace, default, trim, upper, lower, append, prepend, join… Double brackets Transformation

!Charts

Multi-Tenant: Shared DB & Shared Schema

A Multi-Tenant Data Architecture application is one that can be used by multiple

entities concurrently.

All tenants share the same database and schema. There is a main tenant-table,

where all other tables have a foreign key pointing to.

Cenit references● main repo: https://github.com/openjaf/cenit

● website www.cenitsaas.com ● google user group: [email protected] ● email: [email protected]