解析微服务架构(一):什么是微服务

解析微服务架构系列文章将分几篇描述微服务的定义、特点、应用场景、企业集成架构的演进以及微服务转型思路和技术决策考虑等内容,并以IBM技术为例介绍如何实现微服务架构转型。

Read More

证书及管理工具

什么是证书?为什么要使用证书?

   对数据进行签名(加密)是我们在网络中最常见的安全操作。签名有双重作用,作用一就是保证数据的完整性,证明数据并非伪造,而且在传输的过程中没有被篡改,作用二就是防止数据的发布者否认其发布了该数据。

Read More

Hugo blog by GO

Hugo works flexibly with many formats, and is ideal for blogs, docs, portfolios and much more. Hugo’s speed fosters creativity—it makes building a website fun again.

Hugo is designed for speed and performance. Great care has been taken to ensure build time with Hugo is as short as possible. We’re talking milliseconds to build your entire site—for most setups!

Hugo is designed to work the way you do. Organize your content however you want with any URL structure. Group your content using your own indexes and categories. Define your own metadata in any format: YAML, TOML or JSON. Best of all, Hugo handles all these variations with virtually no configuration. Hugo just works.

Read More

NodeJS & npm & nvm

Today it’s hard to imagine any serious Web development without NodeJS. Even though Gradle plugins performing frontend related tasks exist, they usually lag behind the original libraries written for Node. Besides, we are going to use NodeJS only during development and installing it on production servers is completely unnecessary.

Read More

OkHttp Authenticator in Ktor

Ktor提供了多种认证机制,Basic,OAuth1a,OAuth2. 测试一种简单的认证机制BasicAuthentication,使用场景是 AppClient访问AppServer时,需要进行认证。通常是登记一个AppID,分配一个AppKey.客户端在请求中携带这一对字 符串,服务端用其与数据库中保存的认证串比对以进行核实。

Read More

Retrofit2 upload / download file

在ktor框架中,使用Retrofit+OkHttp库上传/下载文件时,由于对表单的封装有很多选项,必须进行正确的选择,才能实现功能。 网络上有许多人都遇到过这一个问题,也有很多人给出了形形色色的解决办法,好象不能有效解决问题,提问的人依然层出不究。 奇怪的是官方为什么没有给出一个正确的示例。

Read More

OkHttp, Retrofit, Gson

Gson组件配合OkHttp,Retrofit在网络访问对Json串进行转化时,与Moshi组件有区别。前者是在组件内容进行的, 后者是在组件外部进行的。从编码角度看,Moshi很简单;从代码的优雅度看,Gson更胜一筹。Moshi的TypeAdapter 写法简单明了,而Gson的TypeAdapter就要复杂得多。下面代码中,JodaTimeAdapter是Moshi写法,JodaTypeAdapter 是Gson写法。结合本文与上一文,对照一下两者的区别。

Read More

深入理解Java 8 Lambda (类库篇——Streams API,Collectors和并行)

自从lambda表达式成为Java语言的一部分之后,Java集合(Collections)API就面临着大幅变化。而 JSR 355(规定了 Java lambda 表达式的标准)的正式启用更是使得 Java 集合 API 变的过时不堪。尽管我们可以从头实现一个新的集合框架(比如“Collection II”),但取代现有的集合框架是一项非常艰难的工作,因为集合接口渗透了 Java 生态系统的每个角落,将它们一一换成新类库需要相当长的时间。因此,我们决定采取演化的策略(而非推倒重来)以改进集合 API:

Read More

Play Framework - The High Velocity Web Framework

The Play Framework combines productivity and performance making it easy to build scalable web applications with Java and Scala. Play is developer friendly with a “just hit refresh” workflow and built-in testing support. With Play, applications scale predictably due to a stateless and non-blocking architecture. By being RESTful by default, including assets compilers, JSON & WebSocket support, Play is a perfect fit for modern web & mobile applications.

Read More

WebUI - UIKit

UIKit - A lightweight and modular front-end framework for developing fast and powerful web interfaces.

Read More

网络支付解决方案

在基于互联网平台的电子交易中实现网上支付的主要解决方案有两种,即网上银行模式和第三方支付平台模式。 网上银行模式主要由企业向银行提出申请,直接通过网上银行实现网上支付与结算。第三方支付平台模式主要 指企业把网上支付业务外包给除银行以外的第三方支付企业实现网上支付与结算。

Read More

Fragment and Activity

Fragment 表示 Activity 中的行为或用户界面部分。您可以将多个片段组合在一个 Activity 中来构建多窗格 UI,以及在多个 Activity 中重复使用某个片段。您可以将片段视为 Activity 的模块化组成部分,它具有自己的生命周期,能接收自己的输入事件,并且您可以在 Activity 运行时添加或删除片段(有点像您可以在不同 Activity 中重复使用的“子 Activity”)。

Read More

Java Character Set Encoding

  • Java stores characters internally as UTF-16
  • Java uses translation tables to map between external encodings and UTF-16.
    • Map from external encoding to UTF-16 on input.
    • Map from UTF-16 to external encoding on output.
  • These translations can be lossy.
Read More

Gson - RegisterTypeAdapter

Gson is a Java library that can be used to convert Java Objects into their JSON representation. It can also be used to convert a JSON string to an equivalent Java object. Gson can work with arbitrary Java objects including pre-existing objects that you do not have source-code of.

Read More

Web App Based on Vert.x

Vert.x is not based on Servlets, which makes it a good choice for people without Java background, especially Web developers. The fact that Vert.x comes with an embedded Web server enables simple deployment and easy integration with frontend tools.

Read More

Authentication with Vert.x

Usually, there are several ways to authenticate a user, but here we’re going to use form-based authentication. In terms of Vert.x, it means that we will need to instantiate several built-in handlers, but most importantly we will need an AuthProvider.

Read More

HBase介绍

HBase – Hadoop Database,是一个高可靠性、高性能、面向列、可伸缩的分布式存储系统,利用HBase技术可在廉价PC Server上搭建起大规模结构化存储集群。

Read More

BigTable的运行原理

2006年的OSDI有两篇google的论文,分别是BigTable和Chubby。Chubby是一个分布式锁服务,基于Paxos算法;BigTable是一个用于管理结构化数据的分布式存储系统,构建在GFS、Chubby、SSTable等google技术之上。相当多的google应用使用了BigTable,比如Google Earth和Google Analytics,因此它和GFS、MapReduce并称为谷歌技术”三宝”。

Read More

需求管理规范

一,需求管理流程是部门之间工作协作规范,用于规范运营需求、产品功能、用户体验、业务流程、解决方案的提出、讨论和确定,使工作更有条理性,达到提高工作效率的目的。

Read More

服务-Service

Service 是一个可以在后台执行长时间运行操作而不使用用户界面的应用组件。服务可由其他应用组件启动,而且即使用户切换到其他应用,服务仍将在后台继续运行。 此外,组件可以绑定到服务,以与之进行交互,甚至是执行进程间通信 (IPC)。 例如,服务可以处理网络事务、播放音乐,执行文件 I/O 或与内容提供程序交互,而所有这一切均可在后台进行。

Read More

Service

A Service is an application component representing either an application’s desire to perform a longer-running operation while not interacting with the user or to supply functionality for other applications to use. Each service class must have a corresponding declaration in its package's AndroidManifest.xml. Services can be started with Context.startService() and Context.bindService().

Read More

Intent和Intent过滤器

Intent 是一个消息传递对象,您可以使用它从其他应用组件请求操作。尽管 Intent 可以通过多种方式促进组件之间的通信,但其基本用例主要包括以下三个:

Read More

ContentProvider

Content providers are one of the primary building blocks of Android applications, providing content to applications. They encapsulate data and provide it to applications through the single ContentResolver interface. A content provider is only required if you need to share data between multiple applications. For example, the contacts data is used by multiple applications and must be stored in a content provider. If you don’t need to share data amongst multiple applications you can use a database directly via SQLiteDatabase.

Read More

Activity

An activity is a single, focused thing that the user can do. Almost all activities interact with the user, so the Activity class takes care of creating a window for you in which you can place your UI with setContentView(View). While activities are often presented to the user as full-screen windows, they can also be used in other ways: as floating windows (via a theme with windowIsFloating set) or embedded inside of another activity (using ActivityGroup).

Read More

赤壁赋

壬戌之秋,七月既望,苏子与客泛舟游于赤壁之下。清风徐来,水波不兴。举酒属客,诵明月之诗,歌窈窕之章。少焉,月出于东山之上,徘徊于斗牛之间。白露横江,水光接天。纵一苇之所如,凌万顷之茫然。浩浩乎如冯虚御风,而不知其所止;飘飘乎如遗世独立,羽化而登仙。

Read More

install rvm on new mac -- to install jekyll 3.1.6

Jekyll is a simple, blog-aware, static site generator. It takes a template directory containing raw text files in various formats, runs it through a converter (like Markdown) and our Liquid renderer, and spits out a complete, ready-to-publish static website suitable for serving with your favorite web server. Jekyll also happens to be the engine behind GitHub Pages, which means you can use Jekyll to host your project’s page, blog, or website from GitHub’s servers for free.

Read More

大健康商业模式

大健康产业是医疗健康产业中比医疗行业更为广泛的行业,它没有医疗行业的门槛高,但比医疗行业的范围大,它需要特许资质, 面向的消费群体巨大,从业人员数量庞大。它不象医疗行业是患者的刚需,但它是健康人群的柔性需求。大健康消费不是高频消费, 但它是多频消费。

Read More

VR - 未来无所不在

也许在Google方面负责VR业务的副总裁Clay Bavor看来,完美本身并不是最重要的。他的确非常乐意去构建一个比肩真实的VR世界,而且他坚信Google能够做到;但是在执行过程中,Bavor的初衷却是希望每一个人都能用上VR。他也说不清楚为什么VR是如此的炫酷和激动人心,但是“用过之后就再也回不来了”。这也是就解释了为什么Google的VR计划首先是为了让更多的人们用上——其次才是完美。

Read More

投融资信息平台

建设一个投融资信息平台,面向全国优秀企业与风险投资机构、私募股权资本、银行、基金公司、政府与行业协会、外商,券商、法律等机构,知名经济学家、民营企业家,通过有针对性的项目展示、咨询与沟通,项目筛选、推荐、路演及洽谈安排,全方位、宽领域、多渠道利用外部资金,实现银行、优质资本与湘西优秀企业及优质项目的对接合作,达到互利共赢的结果。

Read More

本地生活类APP研究

本地生活圈是指人们居住、生活及活动的场所,通常指居民小区、村庄、乡镇等地理场所,人们居住在这样的场所中,从该场所获得日常生活的物质和服务,在该场所中发生社会交往。本地生活圈通常叫社区。 本地生活类APP是基于本地生活圈的社交、新闻、商务、娱乐等多方面需求的移动应用,移动应用技术为这类APP提供了技术基础,让人们随时随地、随心所欲地使用APP。

Read More

90后喜欢什么,需要什么

1、从内容阅读上看,现在的年轻人喜欢看有槽点,无节操,但是又不色情的东西。那什么是无节操但又不色情的呢?比如有个微博账号叫 “变态学教授无铭”,每天都发一些比较血腥、变态的动图展现在你面前,这些东西都是日常生活看不见的,虽然让人接受不了,但 90 后还是忍不住想去吐槽,转发调戏小伙伴们,让其他人也受不了。另外在光天化日之下调侃性,把性相关的内容说得很阳光很有趣,也是很讨喜的无节操。

Read More

fastweixin - 快速搭建微信公众平台服务器

  • 1.极其方便的实现微信公众平台服务端开发,2行代码完成服务器绑定,3行代码实现用户消息监听
  • 2.支持多种web架构,无论你的项目使用springmvc还是servlet以及其他一切框架,都可以完美集成,API高度一致,使用者对架构差别无感知
  • 3.完整封装微信消息收发报文,使用者无需研究理解微信提供的报文结构,入门极易
  • 4.封装了绝大部分微信接口,还在不断完善
Read More

Vert.x

Vert.x是一个运行在JVM上的多语言、非阻塞式、事件驱动的应用程序框架

Read More

Passport.js - Simple, unobtrusive authentication for Node.js

Passport is authentication middleware for Node.js. Extremely flexible and modular, Passport can be unobtrusively dropped in to any Express-based web application. A comprehensive set of strategies support authentication using a username and password, Facebook, Twitter, and more.

Read More

Pac4j Technical Components

pac4j is an easy and powerful Java security engine to authenticate users, get their profiles and manage authorizations in order to secure a Java web application. It provides a very comprehensive security model and implementation guidelines. It is based on Java 8 and available under the Apache 2 license.

Read More

OAuth1.0 - RFC5849

Internet Engineering Task Force (IETF) E. Hammer-Lahav, Ed. Request for Comments: 5849 April 2010 Category: Informational ISSN: 2070-1721

Read More

Authentication and Authorization

Authentication is any process by which you verify that someone is who they claim they are. Authorization is any process by which someone is allowed to be where they want to go, or to have information that they want to have.

Read More

KWF-Kotlin web framework

A practise framework, considering different situation and use cases, based on kotlin, a micro http framework wasabi, sql to object converter Sql2o, json to object converter ObjectMap, object to json converter tool fastjson, jdbc connection pool HikariCP, template engine Freemarker, Angular2, etc, for purpose of web app or rest api.

Read More

Redis build & install & play

Redis is an open source (BSD licensed), in-memory data structure store, used as database, cache and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs and geospatial indexes with radius queries. Redis has built-in replication, Lua scripting, LRU eviction, transactions and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster.

Read More

MongoDB and MongoChef

MongoDB allows Foursquare to seamlessly process and store all user check-ins, with hundreds of thousands of input/output operations per second.

Read More

nodejs npm 常用命令

npm是一个node包管理和分发工具,已经成为了非官方的发布node模块(包)的标准。有了npm,可以很快的找到特定服务要使用的包,进行下载、安装以及管理已经安装的包。

Read More

Install express

1,首先假定你已经安装了 Node.js,接下来为你的应用创建一个目录,然后进入此目录并将其作为当前工作目录。

$ mkdir myapp
$ cd myapp
Read More

Xcode:Concepts

1,Xcode Targets

A target specifies a product to build and contains the instructions for building the product from a set of files in a project or workspace. A target defines a single product; it organizes the inputs into the build system—the source files and instructions for processing those source files—required to build that product.

Read More

Audio - Realtek ALC AppleHDA [Guide]

1,New User/First Time/OS X Audio

1,Determine motherboard audio codec (Realtek ALCxxx)

Source: User Manual, specifications, website Supported: ALC885, 887, 888, 889, 892, 898 or 1150 Audio Codec is: ALCxxx

2,Recommended Audio Selections

Chameleon/Clover Injection Audio ID: 1 ALCxxx

Read More

Jetty

1,下载安装jetty

jetty主页:http://www.eclipse.org/jetty 目前的最新稳定版本:jetty-distribution-9.2.10.v20150310.tar.gz 下载解压后拷贝到 /opt/jetty/目录下。

Read More

OpenCart V2.0

1,Install OpenCart

(1) Upload all of the files and folders to your server from the “Upload” folder, place them in a folder under your web root;

(2) Rename config-dist.php to config.php and admin/config-dist.php to admin/config.php;

(3) For Linux/Unix make sure the following folders and files are writeable.

Read More

橘子洲

1,地理位置

橘子洲景区位于长沙市区的湘江之中(北纬N28°10′23.40″ 东经E112°57′18.36″),橘子洲大桥从上横跨而过,离长沙市中心1公里,桔子洲地形平坦,位于湘江水面中央;长达5公里,最宽处仅300余米,岛形狭长,形似长龙,属湘江水回环、泥沙淤沉堆积而成的江洲风景区。

Read More

Composer

1,Install Composer

$ curl -sS https://getcomposer.org/installer | php $ sudo mv composer.phar /usr/local/bin/composer

Read More

Ubuntu系统安装Ruby的三种方法

Ruby是一个开源的动态编程语言,它有优美的语法,可用于构建可伸缩的Web应用程序。ruby gems可以很好地增强Ruby开发者的开发效率。 要在Ubuntu系统上安装Ruby,有几种方法,每种方法都只需几步就能搞定。

Read More