Coder Social home page Coder Social logo

daca-core's Introduction

DACA

DACA, short for declaractive application connectivity adapter, is a light weighted declaractive framework for standard and proprietary application protocol connecting. This framework is developed in a non-invasive and reactive pattern, providing a full life cycle, seperated management of the connections.

Licensing

Apache License, ver. 2.0

Compatibility

Java 1.8

Quick start

A basic deploying of DACA include 4 components, the Codebook, Routinebook, AconnManager, and NioServer:

Codebook codebook;
Routinebook routinebook;
NioServer server;
AconnManager manager = new AconnManager(maxconn, codebook, routinebook);
manager.bind(server);
manager.start();
nioserver.start();

where AconnManager controls the life cycles of all application connections (Aconns).

Interaction between the Aconn and the application layer can be done by implementing the message, state, event listeners:

connManager.setMessageListener(new MessageListener() {
    @Override
    public FullMessage onUplink(String addr, FullMessage rxMsg, FlowSpec spec) {
        //app service called and return the aconn a message according to spec 
        return newMsg;
    }

    @Override
    public FullMessage onDownlink(String addr, FullMessage txMsg, FlowSpec spec) {
        //app service called and return the aconn a message according to spec 
        return newMsg;
    }
};
connManager.setEventListener(new EventListener() {
    @Override
    public void onTimeout(String addr) {
    }
    @Override
    public void onFinish(String addr, Procedure proc) {
    }
};
connManager.setEventListener(new StateListener() {
    @Override
    public void onStateChanged(String addr, int state) {
    }
};

For Procedure, Routine, and other concepts, please read http://daca.issc.xyz/docs

Samples and demos

Codbook and routinebook samples are provided in the resources/spec

Documentation

Read the complete documentation to understand the design principles of stateful flow modeling, codebook and routinebook design on http://daca.issc.xyz (under development)

daca-core's People

Contributors

lingfliu avatar

Watchers

 avatar  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.