Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Server \ QBit development of micro-services     - Rails 4.1.6 start being given Could not find a JavaScript runtime (Linux)

- Java 8 perspective annotation types (Programming)

- Share and show your code on GitHub (Linux)

- Learning OpenCV: (VS2010-openCV2.4.3-win7 configuration instructions) (Linux)

- Linux User Rights Study Notes (Linux)

- Vim Getting Started Tutorial (Linux)

- Ubuntu 14.10 / 14.04 / 12.04 How to install Kodi 14.0 RC3 (Linux)

- JavaScript, some conclusions about the implicit conversion (Programming)

- Kubernetes cluster deployment (Server)

- CentOS / RHEL 6 was repeated prohibited under the SNMP connection log (Server)

- Eclipse 3.7.2 can not start solving under Ubuntu 14.04 (Linux)

- JavaScript in null undefined summary (Linux)

- Jetty JNDI Development combat (Linux)

- Installation and use GAMIT / GLOBK Software (Linux)

- Java and Python use make way dictionary word search script (Programming)

- Github inventory objects Algorithm (Linux)

- Spring MVC Exception Handling (Programming)

- Oracle 11g upgrade PSU detailed steps (Database)

- Linux 10 useful examples of command-line completion (Linux)

- To share Internet access through NAT mode under Virtual Linux VMware Workstation (Linux)

  QBit development of micro-services
  Add Date : 2017-04-13      
  One, QBit library introduction

QBit is an open source responsive development library for building micro-services support JSON, HTTP, WebSocket and REST. QBit using reactive programming create a flexible REST, cloud-based WebSocket, Web services. QBit is SOA evolution for mobile and cloud computing. QBit is a small, lightweight micro-services development bank, provides discovery services, health services, responsive service status, type of event, as well as the usual reaction Java programming support.
QBit very small and fast.

Two, Gradle build file

group 'qbit-ex'
version '1.0-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'application'

mainClassName = "com.mammatustech.HelloWorldService"

compileJava {
    sourceCompatibility = 1.8

repositories {
    mavenCentral ()
    mavenLocal ()

dependencies {
    testCompile group: 'junit', name: 'junit', version: '4.11'
    compile group: 'io.advantageous.qbit', name: 'qbit-admin',
                                                 version: '0.9.0-M1'
    compile group: 'io.advantageous.qbit', name: 'qbit-vertx',
                                                 version: '0.9.0-M1'

Currently QBit micro-service library latest version to version 0.9.0.M2.

Third, write the sample code with QBit

package com.mammatustech;

import io.advantageous.qbit.admin.ManagedServiceBuilder;
import io.advantageous.qbit.annotation.RequestMapping;

@RequestMapping ( "/ Hello")
public class HelloWorldService {

    @RequestMapping ( "/ Hello")
    public String hello () {
        return "hello" + System.currentTimeMillis ();

    public static void main (final String ... args) {
        final ManagedServiceBuilder managedServiceBuilder =
                ManagedServiceBuilder.managedServiceBuilder ()
                                     .setRootURI ( "/ root");

        / * Start the service. * /
        managedServiceBuilder.addEndpointService (new HelloWorldService ())
                .getEndpointServerBuilder ()
                .build () startServer ().;

Fourth, run the code

# Gradle run
Fifth, with the curl test

$ Curl http: // localhost: 8080 / root / hello / hello
"Hello 1440742489358"
Six test with wrk

wrk is an open source HTTP benchmarking tool. When wrk run on a single multi-core CPU, it is possible to generate a significant load, which combines a multi-threaded design and extensible event notification system (such as epoll and kqueue).
wrk also offers an optional LuaJIT script that can be used to generate the implementation of the HTTP request, processes the response, as well as custom reports.
Home: https://github.com/wg/wrk

$ Wrk -d 5s -t 2 -c 1000 http: // localhost: 8080 / root / hello / hello
Running 5s test @ http: // localhost: 8080 / root / hello / hello
  2 threads and 1000 connections
  Thread Stats Avg Stdev Max +/- Stdev
    Latency 17.65ms 22.96ms 427.36ms 97.57%
    Req / Sec 33.33k 7.75k 43.10k 75.00%
  319154 requests in 5.06s, 28.00MB read
Requests / sec: 63083.97
Transfer / sec: 5.53MB
- Sublime Text 3 best features, plug-ins and settings (Linux)
- linux raid levels and concepts introduced (Linux)
- Linux md5sum verify file integrity (Linux)
- Ceph single / multi-node installation summary Powered by CentOS 6.x (Server)
- Linux raw socket (Programming)
- Java Access Control (Programming)
- CentOS 6.4 of cron scheduled task configuration (Linux)
- Linux, how to filter, split, and merge pcap file (Linux)
- RPM package management tools under Linux (Linux)
- CentOS yum install LAMP (Server)
- To install and deploy PHP environment under the CentOS (Server)
- Shell commonly commands (Linux)
- C language - Traverse pci device (Programming)
- Python format string (Programming)
- Some common Linux commands Study Notes (Linux)
- Ubuntu install code editor Sublime Text 3 (Linux)
- Linux network monitoring strategy (Linux)
- Android judgment toward camera pictures (Programming)
- Linux system Perl Lite netstat (Linux)
- Ubuntu Tutorial: E: Failed to get lock / var / lib / apt / lists / lock - open (Linux)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.