Coder Social home page Coder Social logo

hdbe's Introduction

hdbe: Hierarchical DataBase Ensamble

hdbe is an application layer designed to ensamble independent databases in a hierarchical structure. The principle is very simple: Each server has a "local" funcionality associated to it. This funcionality is defined in te localtask.js file, and requires the implementation of the onInit, execute and catResponses methods. On the other side, each server has a set of children servers associated to it through a web service url. The server configuration is defined in the host.json file. #Example Supose you want to configure a two layer ensamble of mongodb databases. You want each database to work indenpently of the other, but you want to execute some queries in both databases at the same time. So lets call the first server A, and the second server B. In this case, B will be a child server of A. That means, that all the queries applied to the server A will be proxied to the server B too, but not the opposite. The host.json configuration for server B will be:

{ "port":3001, "name":"serverB", "children": [ ] }

That is a webservice listening on the port 3001, and having no children.

The host.json configuration for server A will be:

{ "port":3000, "name":"serverA", "children": [ { "name":"serverB", "url":"http://localhost:3001/", "host":"localhost", "port":3001, "path":"/", "user":null, "pass":null } ] }

That is a webservice listening at port 3000 and having the webservice B as children.

In this case, all the POST and GET request arriving to http://localhost:3000/ will be executed by the server A, by using the logic defined in the localtask.execute() method, while a copy of the request is sent to the server B. Once that localtask.execute() and all the children servers returns an answer to the request, the results are concatenated in the localtask.catResponses method and returned one level up in the hierarchy.

hdbe's People

Contributors

andcastillo avatar

Stargazers

Miguel Angel Asencio Hurtado avatar

Watchers

 avatar Miguel Angel Asencio Hurtado avatar Jefferson Javier Hernández Panqueba avatar otrobernal avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.