tac-infrastructure

Tangram App Container

License

License

GroupId

GroupId

com.alibaba
ArtifactId

ArtifactId

tac-infrastructure
Last Version

Last Version

0.0.4
Release Date

Release Date

Type

Type

jar
Description

Description

tac-infrastructure
Tangram App Container
Project URL

Project URL

http://maven.apache.org
Project Organization

Project Organization

Alibaba Group

Download tac-infrastructure

How to add to project

<!-- https://jarcasting.com/artifacts/com.alibaba/tac-infrastructure/ -->
<dependency>
    <groupId>com.alibaba</groupId>
    <artifactId>tac-infrastructure</artifactId>
    <version>0.0.4</version>
</dependency>
// https://jarcasting.com/artifacts/com.alibaba/tac-infrastructure/
implementation 'com.alibaba:tac-infrastructure:0.0.4'
// https://jarcasting.com/artifacts/com.alibaba/tac-infrastructure/
implementation ("com.alibaba:tac-infrastructure:0.0.4")
'com.alibaba:tac-infrastructure:jar:0.0.4'
<dependency org="com.alibaba" name="tac-infrastructure" rev="0.0.4">
  <artifact name="tac-infrastructure" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.alibaba', module='tac-infrastructure', version='0.0.4')
)
libraryDependencies += "com.alibaba" % "tac-infrastructure" % "0.0.4"
[com.alibaba/tac-infrastructure "0.0.4"]

Dependencies

compile (11)

Group / Artifact Type Version
org.springframework.boot : spring-boot-starter-web jar 1.4.7.RELEASE
org.springframework.boot : spring-boot-starter-cache jar 1.4.7.RELEASE
org.springframework.boot : spring-boot-starter-data-redis jar 1.4.7.RELEASE
org.springframework.boot : spring-boot-starter-logging jar 1.4.7.RELEASE
ch.qos.logback : logback-classic jar 1.1.11
org.aspectj : aspectjweaver jar 1.9.0
org.apache.zookeeper : zookeeper jar 3.4.9
com.alibaba : tac-sdk jar 0.0.4
org.asynchttpclient : async-http-client jar 2.2.0
org.gitlab4j : gitlab4j-api jar 4.8.9
org.eclipse.jgit : org.eclipse.jgit jar 4.5.0.201609210915-r

test (1)

Group / Artifact Type Version
org.springframework.boot : spring-boot-starter-test jar 1.4.7.RELEASE

Project Modules

There are no modules declared in this project.

中文文档

TAC

What is TAC ?

  • The TAC (Tiny API Cloud) is a server-side solution with tangram. Of course, it also supports the use of secession from tangram; TAC is not a platform, nor a framework, but a development model.

Features

  • Quick publish;
  • Without deploy;
  • Flexible modification
  • Quickly add data sources
  • Client developers directly participate in server-side logic;

Why TAC?

Before TAC

  • Before the birth of TAC, the development mode of most app server-side on Tmall app was like this. Take the home page as an example:
    • Client and server developer discuss the interface data types, fields;
    • The server developer provides a mock interface with parallel development at both ends.
    • Test, deploy, release.
  • The disadvantage of this model is that since the page relies on various data sources, publishing is a long process. If the field is modified, the entire application will be recompiled and packaged. The deployment process is too long; different pages are deployed in different applications. unable to share data source

After TAC

  • TAC access to various commonly used data sources;
  • Clients submit source code directly on TAC, compile, test, and publish;
  • Client development does not require the participation of server-side developer, eliminating the need for communication.
  • Server-side developer focus on developing business logic;

tac develop progress

Quick Start

Install redis

Run container

java -jar tac-container.jar

Run console

java -jar tac-console.jar --admin
  • open console when succes
http://localhost:7001/#/tacMs/list

Code Develop

        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>tac-sdk</artifactId>
            <version>${project.version}</version>
        </dependency>
  • Write your code
public class HelloWorldTac implements TacHandler<Object> {

    /**
     * 引入日志服务
     */
    private TacLogger tacLogger = TacInfrasFactory.getLogger();

    /**
     * 编写一个实现TacHandler接口的类
     *
     * @param context
     * @return
     * @throws Exception
     */

    @Override
    public TacResult<Object> execute(Context context) throws Exception {

        // 执行逻辑
        tacLogger.info("Hello World");

        Map<String, Object> data = new HashMap<>();
        data.put("name", "hellotac");
        data.put("platform", "iPhone");
        data.put("clientVersion", "7.0.2");
        data.put("userName", "tac-userName");
        return TacResult.newResult(data);
    }
}

compile and package

cd tac-dev-source
java -jar tac-console.jar --package --msCode=helloworld

Pre-Publish

  • Pre-Publish

  • Test-Pre-Publish

Online-Publish

  • online check
curl  http://localhost:8001/api/tac/execute/helloworld -s|json
  • Result
{
  "success": true,
  "msgCode": null,
  "msgInfo": null,
  "data": {
    "helloworld": {
      "data": {
        "name": "hellotac",
        "clientVersion": "7.0.2",
        "userName": "tac-userName",
        "platform": "iPhone"
      },
      "success": true,
      "msCode": "helloworld"
    }
  },
  "hasMore": null,
  "ip": "127.0.0.1"
}

The start params config

Add your own datasource

Use with gitlab

com.alibaba

Alibaba

Alibaba Open Source

Versions

Version
0.0.4