Archive

Posts Tagged ‘THINK’

鸟瞰淘宝开放平台

November 12th, 2009 Bali No comments

概述

Taobao Open Platform(TOP),淘宝开放平台,是淘宝将一些(不是全部)数据(店铺,商品等)通过编程接口开放给开发者。说简单点是这样,一般我们大家都是在网页里面点点点,来装修店铺,买卖东西的,是人肉通过鼠标和键盘完成的。TOP API,可以帮助大家用程序来完成同样的事情。

目标

该文主要回答一下几个问题:

1) 淘宝为什么开放平台?对于开发者意味着什么?

2) 开放了些什么东东?

3) 如何写一个简单的基于开放平台应用?

淘宝开放的缘由

Taobao经过几年的发展,已经成为国内X2C的头块品牌。它发起并完善了广大的网商,用户,以及与之相关的支付,物流,信用等系统。现在基本无人不淘宝。我的一位同事,所有的东西基本上都在taobao上买,还有一位朋友一大爱好就是周末在taobao上买东西。

但淘宝已经差不多到了不得不开放的地步。在内部,大的卖家渴望走出去,店主渴望以某种方式在300w个网店中脱颖而出,各种购买方式层出不穷,团购、限时拍卖等;在外部,社区、sns、购物搜索已经开始直接或间接涉足X2C市场。面对这么多元化的需求,淘宝自己去满足,肯定会力不从心;视而不见,那会引起积怨,累计到一定程度,必然有后来者取而代之。那怎么办?简单。既然这个钱,我不想赚,那就帮别人去赚,但你们得围绕着我来玩。开放应运而生。如果要看fancy版本的同样解释,请看博文:

小前端、大后台 路鹏(淘宝副总裁)

业务方向

现在淘宝主推三大业务方向:独立网店、社区电子商务化、第三方开发的工具海。

· 淘宝不讳言独立网店,真是很令人佩服。独立网店的样品工程就是优衣库,基本思路就是网站的域名和UI是独立网店的,其他的东西都是淘宝的,比如用户、支付、商品信息等。ShopEx在这方面是淘宝的合作伙伴。

· 社区电子商务化。简单来说,就是在bbs(如天涯)和sns(如人人网)中通过TOP API展示淘宝上商品,一但成交,大家分钱。

· 工具海。做垂直行业的商家管理工具,卖给旺铺卖家。

当然还有其他。参考:TOP业务方向

盈利模式

光炒概念,没有盈利模式的事情,我一向是只看不碰。那大多只是烧钱者的游戏,一般人玩儿不起。淘宝开放还是有比较清楚的变现模式的(包括但不限于):

· 淘宝客佣金。淘宝客是按成交计费的,CPA模式。而且API中允许用户加入一些自定义数据,用于确定购买行为过程中的贡献方,使得分享利润成为可能。以前写过篇文章,就提到分享利润的一个应用

· 插件分成。插件分为店铺管理插件和淘江湖SNS平台插件。前者是方便管理店铺用的,后者偏重娱乐性,概念类似Facebook的应用

· 软件销售。C/S模式,或者ShopEx独立网店大多属于这种模式。

· 传统广告。比如你调用淘宝API生成网页,加Google AdSense进入,也是可以的。

参考:TOP盈利模式

API

参考:TOP API文档

API/角色

六个基本角色,权限从低到高依次为:公开查询应用、买家应用、卖家应用、商家应用、高级应用、专业应用。较高角色的权限包含较低角色的权限。

还有三个独立角色,社区应用、媒体应用、淘宝客应用。相互独立,与六个基本角色不存在依赖关系。

API/分类

API操作的对象,有如下11种:用户,产品,类目,商品,交易,评价,物流,店铺,淘宝客,淘江湖(v=2.0),图片空间。

API基本的命名规则是<namespace>.<object>.<action>,如taobao.item.get用于获取单个商品的详细信息。

API/如何进行API调用

基于REST协议的API。调用接口地址是:

测试环境地址:http://gw.api.tbsandbox.com/router/rest

正式环境地址:http://gw.api.taobao.com/router/rest

TOP会给每个应用分配app_keyapp_secret,相当于该应用的用户名和密码。API调用传入的参数分为系统参数(每个API都需要,且格式相同)和API专有参数(随API不同而不同)两类。系统参数中,app_key由系统分配所得,session通过下列方法获得,而sign是根据签名规则生成,其实就是通过一个hash函数完成了加密和校验的双重功能。这和Facebook的那一套东西很像。

参考:TOP API系统级参数定义 How Facebook Authenticates Your Application

Demo

TOP开放的是基于RESTAPI,和编程语言无关的。下面用Java语言为例,写个hello world

不用TOP Java SDKdemohttp://open.taobao.com/demo/javaDemo.zip

TOP SDKdemo: http://wiki.open.taobao.com/index.php/FAQ

注意:SDK给的其实Java源文件,需要copy到源文件的目录下,进行编译。

Win7那些事儿(3) – Hesitate to reinstall?

November 7th, 2009 Bali No comments

I am lazy, as many folks are. One of compelling reasons for personal user not installing Win7 is as following,

“Win7 requires a clean install, which mean I will lost 2 days to back to full productivity. I have to reinstall my applications one by one, and set setting, and restore my data.”

If you agree with above claim. This post is for you. Read along.

1 Introduction

MyApps is a suite of technologies which allow users easily manage and distribute all their Windows applications in most convenient way than before. MyAapps is the name.

2 Problem

Have you ever hesitated rebuilding your dev machine to clean up an instability issue after looking at installed about 200 programs?

Have you ever help new members in your team setup and configure his development environment per strict team-acorss guidelines?

Have you ever had to exit setup dialog to install bunch of prerequisites?

Do you have to remember a long list of license key or file?

You may notice that existing processes that maintain applications and their settings in users’ computer are painful and time-consuming. The explosive growth of applications makes users be tired of finding software, waiting for download, playing with options, accepting defaults, inputting license key or file, clicking through and waiting reboot, especially when they are forced to repeat similar steps again and again. MyApps are technologies which change the way people distribute, access and manage various applications in their computer.

3 Solution

3.1 Unique Values

The unique values MyApps offer can be expressed as followings.

  • Easy installation – Users can install any application with one click.
  • App bag support – App list is a list of applications with customized options. Rebuild becomes never easier. You can kick off the installation of hundreds of applications within minutes, and go away to have a cup of coffee.
  • App bag sharing – You can share your application list to your team member or friends, and they can easily repro your environment.
  • Automatic dependency management – MyApps is aware of app dependency and will install all dependent apps for users automatically.
  • License management – do not need save license key/file locally any more. MyApps does that for users.

3.2 Core Scenarios

Key scenarios that MyApps addresses include:

  • One-stop installFrank needs building his dev machine containing about 120 various apps as the first dev of team COOL5. He logs onto MyApps site and set his preferences (e.g., install all apps onto D:\frankapps\) as the first time visitor. He browses/search the software and put them into MyCart of MyApps site. Finally, he accepts all EULAs and clicks Install, and then goes away for half-day training. When he returns, he finds that his computer is installed with latest software and ready to go.
  • Dependency awareness and license handling – .NET 3.5 is required by one of Frank’s selected app – SpeedLaunch, and is installed automatically along with SpeedLaunch. MyApps is also smart enough to handle license at the background for Frank.
  • Share app bagFrank starts customizing his apps. Frank points a debugging tool to an internal team testing DB. The setting is uploaded to public section in CuteInstall site. Frank sets font size to 12 in his VS2008 and uploads this to the private section. Finally Frank published his current app bag as “COOL5_dev_bag” in the MyApps site.
  • No need re-invent the wheelJoanne, the second dev of COOl5 team, install all apps same with Frank by clicking the link in his onboard email:

http://MyApps/install.aspx?bid=COOL5_dev_bag

Joanne also finds out that the debugging tool points to the team testing DB.

  • Easy repro – Months later, Frank has to rebuild his computer to clean out certain instability issues although he is facing tight schedule. Frank logs onto CuteInstall site and with his account and clicks “Restore to latest” button before he leaves office. The second day, Frank gets a fresh working machine with all his favorite private settings (e.g., font is 12 in VS2008) and continue working for his deadline without any delay.
  • Software shopping Sara, a regular computer user, logs onto a MyApps technology enabled online software shop with her Live ID. She decides to buy Office2007 and pays the bill using PayPal. After clicking “Install”, Office2007 is delivered/installed/Configured to her computer through a CDN network within 1/2 hour. She is very happy because she no long needs wait for DVD delivered by UPS again.

3.3 Value Proposition

For customers, the value propostion is pretty obvious if you look at the above scenarios carefully. It save man hours in every application installation and migration, increase productivity and improve across-team capabilities to meet business goals.

For Microsoft, it is also a “must have”. MyApps makes Windows platform more accessible and easy to manage. MyApps technologies bright customers’ unique values by leveraging our Windows platform leadership and global presence of Live platform. It also provides special value to our S+S strategy. More and more people turn to web app mostly because web app is:

  1. Easy available
  2. No download(s) and installation(s) required
  3. Your settings always go with you

MyApps technologies solve above 3 problems altogether. Software installation and maintenance are no longer headache for users. As a result, this ensures the success of Microsoft S+S strategy and strengthens our long term value. It is beneficial to the whole industry and any and every software users.

4 Logical Architecture

The diagram below shows the logical architecture of MyApps platform.

Arch of MyApps

Arch of MyApps

Two innovative concepts MyApps introduces are as follows:

  • Split of static and dynamic bits of apps which will be stored in App bits DB and App settings/bags DB respectively
  • App release description script

To achieve these goals, MyApps technology contains a suite of software component and standard.

  • MRT (MyApps Releasing Toolkit) – software vendors use this tool to write installer code. MRT is based on WSI.
  • MP (MyApps Portal) – it is centralized place which stores all configurable settings of all apps. And it is also responsible for managing software installation, licensing and user configurations.
  • MC (MyApps Client) – MC will be running on software users side to manage installation and settings.

Next we will discuss components one by one.

4.1 MyApps Releasing Toolkit

Every software release should provide a XML file like below.

<?xml version=1.0 encoding=utf-8?>

<App>

<Name>Microsoft.OfficeLabs.PeerMail</Name>

<Version>1.1.0.0</Version>

<DependencyManagement>

<Dependency>

<App>

<Name>Microsoft.DotNet</Name>

<Version>2.0</Version>

</App>

<App>

<Name>Microsoft.Office.Outlook</Name>

<Version>12.0.6213.1000</Version>

</App>

</Dependency>

</DependencyManagement>

<InstallSteps>

<step_by_step_install_guide_by_XML></step_by_step_install_guide_by_XML>

</InstallSteps>

</App>

This file makes sure that (1) the app gets globally unique name with Name and Version, (2) Dependency is clearly defined, (3) InstallSteps will reuse certain tasks pre-defined by MRT. The tasks sample provided by MRT will be to create folder, register COM component, start certain services, copy files, etc. MRT will read this file and generate releasing package.

4.2 MyApps Portal

MyApps Portal is the only place where users browse, search, install, configure, manage and share their apps across all their computers.

4.3 MyApps Client

MyApps will be running in software users as ActiveX IE plugin. Every app defines its config DB as following:

<?xml version=1.0 encoding=utf-8?>

<Configs>

<Section1>

<Property Key=key1 Value=value1 />

<Property Key=key2 Value=value2 />

</Section1>

<Section2>

<Property Key=key3 Value=value3 />

<Property Key=key4 Value=value4 />

</Section2>

</Configs>

We can use lightweight DB component(e.g., SQLite, or SQL Express) to achieve that.

5 Go TO Market Strategy

Business model would be software licensing.

MyApps is not just for resintalling the whole software stack. It actually allows users to maintain streamlined application and settings across the computer overtime. I will probably to start a project in CodePlex for this.

Acknowledgment: MyApps is inspired by Maven for Java, RubyGems for Ruby, CAPN for Perl, YUM for Linux, etc. I am actually surprised that Windows don’t have this till today. Ninite is likely, but far from solving the problem entirely.

Win7哪些事儿(2) – 盗版

October 27th, 2009 Bali 2 comments

win7是否会被盗版,已经不是一个问题,而是何时会出来的问题,以及蔓延到何种程度的问题。在xp时代,我所认识的朋友中,家用电脑基本是D版。公司用的版本中,有些是很遵纪守法(占极少数,多数是外企);有些就打擦边球,买5个license,500个人用;有些就肆无忌惮地用D版,其中有些还是国内数一数二的企业。以我的技术背景来说(可以称得上资深),目前没有affordable的100%阻止盗版的技术手段。

为什么windows被盗版得如此厉害?

这是由windows本身的特殊性决定的。

  1. 每个用电脑的人都需要操作系统,市场需求广阔。
  2. windows属于consumer software,使用软件的最终个体是,不是企业(比如Oracle,大家没事不会把家里电费多少钱存Oracle里面吧),使得打击盗版的代价很高,微软总不能和数亿人一个个去法院打官司吧。
  3. 一张光盘就把用户的问题解决了。装好之后,不需要别的东西。Windows update?我不更新总行了吧。有病毒我认栽,重装大法可以解决一切病毒。
  4. 盗版虽然有技术门槛,但也无外乎几个晚上的事情。
  5. 有利益驱动。天下熙熙攘攘,皆为利来利往。学雷锋做好事的事情,固然有,但至少要把肚皮填饱吧。盗版已经有完整的产业链条,每个月十几万,几十万,虽然不多,养活三五个人还是很轻松的。要知道这和微软的高管的收入差不多了哦,而且轻松,一本万利,不用看脸色。

SAP也是软件,为什么没大听说,有盗版?这东西给了你也没用啊,软件媒体只是解决了部分问题,后面的咨询、实施才是重要部分。大家应该明白了吧。很多开源软件就走这条路,把软件白送你,甚至code给你都没用,因为它只解决了部分问题,或部分解决了问题。

10年前的盗版

win95是个非常成功的产品,那时候大家都觉得微软的股票价格,如果不到火星,也能到月球。紧接着win98出来时候,在中国市场定价是1998元。1998元到时在中国什么概念呢?我97年到上海读书,每个月的生活费是约400元,上海的出租车司机每个月大概赚2000多元。要知道上海可以中国经济最大的城市,想想看1998元对于大家来讲是什么概念。而盗版价格多少呢?全国统一价5块钱。

“如果有10%的利润让人疯狂,有50%让人不顾一切,有100%的利润可以挺而走险,有300%的利润,可以践踏人间一切法律。”   — 马克思

你会不心动?想好再说。

盗版的市场推广做得是最好的,比世界第一大品牌可口可乐还好。大家都说它好,而且垂手可及。任何一个小店,一个小摊,酒店大堂沙发后的小架子,都有。forever warranty, 随时包换。初来乍到,我当时不知道在哪里可以买到正版,甚至不知道软件还有盗版正版之分。买电脑是去百脑汇,商家把一大堆东西装在一起的。品牌?我要那东西干嘛,反正是拿回家用的,省千把块银子才是王道。现在的微软软件可以在Amazon等网店买到了,这也是不到一年的事情。

忽视巨大的市场10年后,客户的”消费习惯”,就被培养成”软件可以在门口小摊5块钱买到”。现在重新回头来,再让他一朝一夕改变习惯,谈何容易。一个女孩,如果没有男朋友,少女怀春,你去穷追不舍的话,成不成看能耐和缘分了;如果人家正和男朋友如胶似漆,你要硬撬,难度可想而知。毕竟并非人人都是李泽楷啊。这就是先入优势。

价格,渠道,营销都落于明显弱势,必败。

解惑之道

盗版是非一日之功形成,所以解决起来也要慢慢来。

  1. 降价。从win7提供的东西来说,499起步我觉得合理;但和盗版比起来,价钱还是有些偏高了。优化(price * number of sold copy),找到一个合理的价格。是否有个弹性价格?买的人越多,价格越低?先买的人在年底退钱?呵呵。甚至于低版本是不是可以送呢?让人家姑娘先给你个了解你的机会再说。
  2. 改变盈利模式。微软是个纯的软件公司,如果你的软件被盗了,就什么都没了。是不是可以加些不易被盗的东西,如服务,品牌等。
  3. 渠道建设。让用户随时想要,随时就有。中国移动的通信费用(尤其短信),不可谓不贵啊。但一个春节大家就发50亿条短信拜年。渠道真好!想要马上就有,交钱收货全部自动化。
  4. 被”正版”(实非万不得已,不要采用)。走渠道(如PC厂商),政府,公司,甚至居委会,让你在接触PC前,里面已经装好正版windows了。认为不可能吗?那或许你还不知道绿坝的故事。

盗版之盛,微软有些郁闷,但他不在乎,只是赚多赚少的问题。最大的受害者是中国的软件业和软件从业者。比如金山软件做WPS,词霸辛辛苦苦多少年,一直不死不活,最后上市靠的还是游戏,岂不是莫大的讽刺。还有很多聪明的脑袋为微软这样的公司打工,知道被under-evaluated,但从经济学角度来说,更好的选择很少。都是盗版惹得祸啊。

Categories: Chinese - 中文 Tags: ,

Win7那些事儿(1) – 喜欢的理由

October 25th, 2009 Bali 2 comments

Win7上了周五晚上的天天向上。我还特意去看了看。一如的搞笑风格,涵哥的反应还是那么快。在总部的路边采访,涵哥很受伤,安慰一下。也难为了那位兄弟,04年高中毕业就去了美国,不认识涵哥也可以解释嘛。高中的时候哪有空去看湖南台的娱乐节目,中国小朋友的悲哀呀。迈克*纳什,Windows开发组的老大,本来真是没听说过,估计这种位子的人,不下100个吧。感兴趣的同学们可以去看看土豆视频

我如此真切地为这家公司感到骄傲,这是第一次。微软并非是perfect,nothing to improve。也有些产品真的是很囧。Win7真是个了不起的产品。如此说话,可能有王婆卖瓜之嫌。诚然,我也是Vista的用户,但仅仅是一小时。用了一小时就被我卸了。我喜欢快的系统,不要启动一下也老慢;我喜欢用大内存的机器,但喜欢用内存小的程序,一起来就用掉差不多1G,这可不行。以前曾经用过16G的内存,但也会为32M的内存而斤斤计较好久,也许就是那时候留下的心理障碍。

用Win7真的有点爱不释手的感觉。每个人喜欢一样东西可能都有不同的理由。我的理由如下:

(1) 安装方便。整个安装过程,大约只有不到10个画面,历时大约30分钟,一个干净的系统就装好了。一个小细节就是,安装过程中分为明显的三个步骤。做什么事情的时候,安安静静,不会出来一大堆信息出来让你不知所措。你正在拷贝/AFAFDASD_folder/ERTART#$%_文件/到一个路径,用户安装的时候会关心吗?给我装好就行了,把细节隐藏起来。

(2) 占内存小。这点我超喜欢。崭新安装好后,系统大约占用700M内存。

(3) 搜索。程序装了大一堆后,不需要在program中找了,记住程序名,搜索就行了。比如word,windows key -> word -> 回车,5个键,word就打开了。当然搜索文档,肯定也可以啦。

(4) 半屏显示。拖动一个窗口,到左边或右边的屏幕边缘,它就会占用半个屏幕,dock在那里。参考资料,写东西的时候很方便,不用ALT + tab来回切换了。你可以试试看,拖住一个窗口,然后晃动,看看发生什么:)

(5) theme。可以到官方theme网站download很多好看的桌面背景。现在我的桌面上一个图标都没有了,不舍得放啊。

Amazon.cn上家庭普通版399大元。看看上面留言,话题还是离不开正版与盗版。现在问我用正版还是用D版,显然没意义。但客观地来说,要回答这个问题,还真是有些费思量。要说399贵吗?看看win7提供的这么多东西,真是觉得很值。用过的都知道。另开一文专门讨论盗版的问题。

(send from my Win7)

11/6/2009 update

很多人不太清楚win7几个版本之间的区别,其实我也不太懂。在微软商店找到个链接,大家可以一起扫扫盲,区别还是不小的。

http://store.microsoft.com/Windows7/Compare

Harry’s Bing Talk

September 27th, 2009 Bali No comments

前段时间沈向洋(Harry Shum)同学来演讲了。以前只闻其声,不见其人。果然如很多技术出身的人一样,也算是扔到人堆就找不到的那种人,看上去没什么特色。上海人,在上海还有很多亲戚,呵呵。讲了几点比较有趣的东西,摘录如下:

(1)搜索的算法其实大家都差不多了,现在关于搜索结果质量的提高都是来源于数据的。如果你的数据越多,那么你的搜索结果越精确,那么用的人越多,你的数据就越多。这是一个正反馈,关键是看如何开始。微软在搜索市场的份额小于10%,那么数据就自然少了。不过沈同学说,他们有办法得到数据,但是不会告诉我们。:-) 。大胆猜测,会不会是在IE加了什么插件,然后记录人们使用搜索引擎的行为来得到数据呢,或者是MSIT内部的数据?不得而知,全是不负责任猜想。

(2)Bing本来不叫Bing,叫kooloo(?),以后七改八改改成了Bing。

(3)微软主要的关注市场是en_US,对于中文等的搜索投入有限,当然我们有专门的中文团队。

(4)令沈同学很担心的一个东西就是Google Adsense(可怜我申请了很多次,也没申请到…:( ),它相当于一个个小的sensor,把人们如何使用网络的行为都记录下来,便于Google进行分析。更别提,Google在这里面赚了多少银子呢。他对AdSense推崇备至,认为这是互联网时代最伟大的发明之一。确实如此,更具针对性的广告。其实技术很早就有了,具备商务头脑的人才会想到这种主意吧。

(5)还有人问到cost/query,沈同学没有正面回答,但感觉上,我们在这方面处于劣势,而且差距貌似还不小。有一次和同事谈起Google为什么这么重视性能优化,有点钻牛角尖的感觉。如果把性能提高10%都会受到广泛的尊重。我觉得这和两家公司的商业模式有关。Google写的程序都跑在自己的硬件上,而且都是那种很一般的硬件,不会奢侈到去买那种32颗CPU的服务器,同样的硬件如果能够干活的越多,那他的成本就越少啊。微软就不同的,微软只卖软件。这个软件跑到客户的服务器上,跑快一点跑慢一点不要紧。而且说不定跑慢一点更符合微软的利益呢。想想大家耳熟能详的WINTEL联盟,多年来推出产品的节奏呼应得多好呀。微软全球大概有10多万员工,每个人都会用的Exchange服务器,SharePoint服务器,加到一起大约有几百台吧。这对于网络应用来说还算是小case。微软很重视design和planning。软件design得一层又一层,很简单的功能就需要很复杂的design。好处就是扩展容易些,能够cover尽可能多的客户。又比如Azure,它是windows 2008上面又加了一层虚拟化层(号称这一层会失掉10%~15的性能),然后一个物理机器一分为二,上面跑两个虚拟机。好处有很多,比如便于管理和维护,但牺牲的就是性能。

(6)还有人问,为什么一定要做搜索呢?我们永远不大可能做到第一的。沈同学用了一个来自SteveB的笑话加以回答:每年Steve都会去某个产品组,和该产品组的老大和核心成员们待一段时间,仔细探讨在这个领域的问题。某一年Steve去了SQL Server组。在见面会上的QA环节,有一个人就问:Why don’t we simply quit search market? We will never be the market leader. Steve笑了笑说,我知道微软有一个产品组,它自从诞生以来就一直落后于Oracle,它就是SQL Server。

Google做老大不要紧,如果Yahoo或者其他人能和他竞争,完全没有问题。微软可以袖手旁观,专心做他的软件,互不相关。但问题是现在Yahoo的搜索一年不如一年,那Google长得太大就太危险了。那微软就一定要挺身而出了。这是正义无关,完全是出于自身利益的考虑。正如微软的open source策略是anyone but RedHat,和SUSE打得火热。这和千百年来中国古代中原政权(比如明代)对于游牧民族的政策何等相似——你们互相打仗可以的,但如果发现要抱团的苗头,就马上发兵把强一点的势力打下去一点,但是也不打死,继续维持这个平衡。

Categories: Chinese - 中文 Tags: