Code Monkey home page Code Monkey logo

server's People

Contributors

alexilyushkin avatar

Stargazers

 avatar

Watchers

 avatar

server's Issues

Add Protocol interface

The task of #1

Develop Protocol interface. The interface is an abstraction over concrete application level protocol (such as HTTP, FTP, SMTP i.e.).

Add ProcessingModel interface

The task of #1

Develop ProcessingModel interface. The interface is an abstraction over concrete request processing model (such as Sequential processing, Process per request, Thread per request and i.e.).

Mockup:

interface ProcessingModel {
    fun process(runnable: Runnable)
}

Add the main entry point of the library API

The goal of the library is providing the ability to create flexible, maintainable, interface oriented application server architecture to user.

The entry point of the library should looks like TcpServer class that has the only start() method.
It should also have dependencies representing interfaces that are abstractions over the protocol and request processing model.

Mockup:

class TcpServer(
    private val serverSocket: ServerSocket,
    private val protocol: Protocol,
    private val processingModel: ProcessingModel
) : Server

Linked tasks:
Add ProcessingModel interface - #2
Add Protocol interface - #3
Add Server interface and TcpServer implementation - #7

Add direct processing model

  1. Add an implementation of ProcessingModel interface,
    that should to run in the same thread Runnable provided as argument to execute(Runnable) method call.
  2. Add unit tests for created class.

Add "Thread per request" processing model

  1. Add an implementation of ProcessingModel interface,
    that should to run in new thread Runnable provided as argument to execute(Runnable) method call.
  2. Add unit tests for created class.

Add Server interface and TcpServer implementation

  1. Add Server interface, that should has only one method - start().
    All implementations of this interface should to start accept incoming requests.

Mockup:

interface Server {
    fun start()
}
  1. Add the interface implementation - TcpServer.
    It should be typical TCP server realization but with configurable application
    layer protocol and configurable processing model.
    Add tests for new class.

Mockup:

class TcpServer(
    private val serverSocket: ServerSocket,
    private val protocol: Protocol,
    private val processingModel: ProcessingModel
) : Server

The task of #1

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.