English 中文(简体)
• 登记在册的缓冲和先进的裂痕?
原标题:scribe with protocol buffer and advanced thrift?

我在此有两个问题:

问题1:

rift能提供内部功能吗? (见下例)

——如果能够的话,能够轻松地利用这种功能?

此处为“座标接口”(pp/if/reg.thrift)。 但是,它的信息领域只能是显而易见的,我认为它不够灵活。

#!/usr/local/bin/thrift --cpp --php

##  Copyright (c) 2007-2008 Facebook
...
...
## See accompanying file LICENSE or visit the Scribe site at:
## http://developers.facebook.com/scribe/

include "fb303/if/fb303.thrift"

namespace cpp scribe.thrift

enum ResultCode
{
  OK,
  TRY_LATER
}

struct LogEntry
{
  1:  string category,
  2:  string message
}

service scribe extends fb303.FacebookService
{
  ResultCode Log(1: list<LogEntry> messages);
}

如果我能做以下事情的话,那将是巨大的(我甚至不知道,如果rift裂本身能够根据其文件-但议定书缓冲提供内部功能的话)。

enum ResultCode
{
  OK,
  TRY_LATER
}

struct MyLogStructure {
  1: string field_name;
  2: string value;
}

struct LogEntry
{
  1:  string category,
  2:  MyLogStructure message
}

service scribe extends fb303.FacebookService
{
  ResultCode Log(1: list<LogEntry> messages);
}

问题2:

纽约总部 能否将礼宾缓冲用作内部数据代表? (没有太多的法典修改)

纽约总部 如果对上述问题的回答是“否”,谷歌是否公开源头实施?

问题回答

是的,裂痕可以包括其他障碍,你的定义(下文重述):

enum ResultCode { OK, TRY_LATER }

struct MyLogStructure {
  1: string field_name;
  2: string value;
}

struct LogEntry {
  1: string category,
  2: MyLogStructure message 
}

service scribe extends fb303.FacebookService {
  ResultCode Log(1: list messages);
}

如果你重新界定了像这种 Sc子的接口,那么你可能不得不根据内部的<条码>中的信息,修改其代码,处理你的新类型。

当然,你可以总是把你的<代码>My CarloStructure的字句放在序号上,并完全避免这一问题。

无,我不会想象一下,假想会很容易地利用《议定书》Buffers作为其内部数据代表。 太平洋共同体秘书处的所有法典都是从这些定义中产生的,你可以重新界定<代码>。 记录处理任意物体的方法(例如,《议定书》Buffers物体)但与上文一样困难。

对我的了解,谷歌没有开放源头,也没有从雅虎/哈多普获得任何分配的伐木系统。





相关问题
Best logging approach for composite app?

I am creating a Composite WPF (Prism) app with several different projects (Shell, modules, and so on). I am getting ready to implement logging, using Log4Net. It seems there are two ways to set up the ...

How to make logging.debug work on Appengine?

I m having a tough time getting the logging on Appengine working. the statement import logging is flagged as an unrecognized import in my PyDev Appengine project. I suspected that this was just an ...

How to validate Java logging properties files?

I have a basic facility for allowing users to remotely apply changes to the logging files in my application. Some logs are configured using java.util.logging properties files, and some are configured ...

Logging SAS scripts

I ve been developing a lot of Java, PHP and Python. All of which offer great logging packages (Log4J, Log or logging respectively). This is a great help when debugging applications. Especially if the ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

热门标签