Code Monkey home page Code Monkey logo

terminator's Introduction

Terminator - Service Virtualization

Issue

In the development / testing of a complex system, we often encounter when development / test in the case of other service module dependencies. For example, a system has two modules A and B, A B module depends on the service provided by the module:

  1. B part of the function has not yet completed the development of lead A module development is blocked;

  2. B module and some bad data structure, you can not develop a self-test to all situations;

  3. A module for integration testing, wrote some automation use cases. However, due to uncontrollable B module, the module data B lead to frequent changes back to the data A module is also changed, and this time the module returns data-dependent B assertion will fail;

  4. B module is not their own maintenance team, often unstable, leading to the development environment of the whole system unstable.

Solutions

Service virtualization refers to an unstable virtual, unavailable, undeveloped full service. There are generally two methods:

  1. For common pile agreement can preset the request and returns the value of the corresponding matching conditions, so that the system can be used to replace the pile is not completed before the real service development;

  2. Recording Playback mode, the third-party services are available when the data recorded on the link, when unstable or unavailable, then replay the recorded data.

A major problem for which solutions I and II, the program focused on two issues three and four. Terminator (meaning: light and dark boundary line) to achieve the above two methods.

Terminator Each link can be viewed as a proxy that runs between the two services, now supports four modes of operation:

! [Function Summary] (WebContent / resources / images / function-summary.jpg)

TUNNEL: Tunnel mode, link service is responsible for receiving and forwarding data link, but is not stored, the equivalent of transparent state;

RECORD: Recording mode, link service requests and responses are stored on the link down, and the correspondence between the request to record responses;

REPLAY: Playback mode, direct link service returns a response was recorded when not connected to the rear end of the dependent services, when the request came when certain conditions are met;

STUB: Universal pile mode, link services can return results with pre-match rule, when the request came in line with pre-match rules that return results.

Overall architecture

! [Terminator Architecture] (WebContent / resources / images / intro / architecture.png)

  1. Network Communications: Socket mainly establish communication data transceiver link in the TCP layer, here is netty framework;

  2. Protocol codecs: main binary packet protocol data or resolve to turn the data into binary data protocol, netty itself provides HTTP, SSL / TLS, WebSockets, Google Protocol Buffer codecs, if the need to expand You can define your own protocol codec;

  3. Work mode processor: core of the system, recording playback now offers universal piles are implemented here. Here offers more expansion interface, you can achieve a new model based on customized requirements, such as the case of the back-end service goes down before the start of the recorded data. In addition to recording the playback mode, the signature class is a core component of its role is to identify a request for different systems may have different implementations; for generic pile pattern extraction class is a core component of his role is how to extract a request related to how to set the matching conditions for different systems (especially the agreement) may also have a different implementation. So these are the systems provide scalable interface.

  4. APIs: For convenience (such as continuous integration) of use, the system basically all functions are available through the REST API.

Configuration and Deployment

The terminator / src / database / {version} /terminator.sql executed in the MySQL database, {version} terminator.war corresponding version number; Modified terminator / src / conf / configuration.properties database configuration; (Optional) Modify the terminator / src / conf / configuration.properties in fileStorage.baseDir property, this is the recorded data storage location, data is generally produced larger disk space can be given a larger location. If you do not fill, default window system will be stored in the C: \ temp, linux system will be stored in the / tmp; Execute ant build.xml, terminator.war will generate a directory in the terminator; The terminator.war into any servlet container (eg tomcat) After starting, visit http: // IP: Port / terminator.

Manual and Development Guide

After the deployment is successful, you can access the "User's Guide" and the "Developer's Guide"

terminator's People

Contributors

chasezjj avatar h4ck3rm1k3 avatar yunemr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

terminator's Issues

Links in Readme are broken

Links in the Readme.md file are broken. There's also in the last line a suggestion to read "User's Guide" and the "Developer's Guide" but those are not links to documentation online, nor are there any wiki pages where you think these two might be hidden.

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.