OMG--IDL(Interface Definition Language)
OMG--IDL(Interface Definition Language)
- 1 概述
- 2 内容
- 缩写
- IDL 语法和语义概述
- 词法约定
- ISO Latin-1的字母字符如下表
- 十进制数字字符
- 图形字符
- 格式化字符
- Tokens
- 注释
- 标识符
- 冲突规则
- 转义标识符
- 关键字
- IDL识别的其他字符
- 字面量
- 预处理
- IDL 语法
- 构建块核心数据类型
- 构建任何块
- 构建块基本接口
- 构建块完整接口
- 构建块数据类型
- 构建块CORBA实现--接口
- 构建块CORBA实现--数据类型
- 构建块组件--基本
- 构建块组件--homes
- 构建块CCM实现
- 构建块组件--端口和连接器
- 构建模板模块
- 构建块扩展数据类型
- 构建块匿名类型
- 构建块注释
- 构建模块之间的关系
- 3 补充
- 3.1 OMG介绍
- 3.2 CORBA
- XML-RPC / SOAP
- REST
- CORBA 和 gRPC 比较
- 3.3 EBNF(扩展巴科斯范式)
- 参考
1 概述
如下介绍,OMG组织定义的IDL(Interface Definition Language)。
- Version: 4.2
- OMG Document Number: formal/18-01-05
- Release Date: March 2018
- Standard Document URL: http://www.omg.org/spec/IDL/4.2/
2 内容
缩写
Acronym | Meaning |
---|---|
ASCII | American Standard Code for Information Interchange |
BIPM | Bureau International des Poids et Mesures |
CCM | CORBA Component Model |
CORBA | Common Object Request Broker Architecture |
DDS | Data Distribution Service |
EBNF | Extended Backus Naur Form |
IDL | Interface Definition Language |
ISO | International Organization for Standardization |
LwCCM | Lightweight CCM |
OMG | Object Management Group |
ORB | Object Request Broker |
XTypes | eXtensible and dynamic topic Types (for DDS) |
IDL 语法和语义概述
- OMG IDL是一种语言,它允许对客户端对象可能使用的接口进行明确的规范(服务器)对象实现提供了所有需要的相关结构,如异常和数据类型。数据需要类型来指定接口操作的参数和返回值。
- IDL是一种纯粹的描述性语言。
- 包含用 IDL 编写的规范的源文件应具有“.idl”扩展名。
列出了EBNF格式中使用的符号及其含义:
词法约定
词法约定在IDL规范中定义令牌(tokens)并描述注释、标识符、关键字和字面值——整数、字符、浮点常量和字符串字面值。
IDL使用ASCII字符集,除了字符串文字和字符文字,它们使用ISO Latin-1 (8859-1)字符集。ISO Latin-1字符集分为字母(字母)数字、图形字符、字符空格(空白)字符和格式化字符。
ISO Latin-1的字母字符如下表
十进制数字字符
图形字符
格式化字符
Tokens
有五种tokens:标识符、关键字、文字、操作符和其他分隔符。
注释
字符/开始一个注释,注释以字符/结束。这些注释不能嵌套。
字符//开始一个注释,该注释在它们出现的行结束。
标识符
标识符是由ASCII字母、数字和下划线(_)字符组成的任意长序列。第一个字符必须是ASCII字母字符。所有字符都是重要的。IDL标识符不区分大小写。但是,对定义的所有引用必须使用与定义相同的大小写发生。这允许对区分大小写的语言进行自然映射。
冲突规则
- 大写字母和小写字母被视为相同的字母。
- 在每个作用域中,IDL标识符只有一个名称空间。使用相同的标识符用于常量和接口,例如,会产生编译错误。
module M {typedef long Foo;const long thing = 1;interface thing { // Error: reuse of identifier thingvoid doit (in Foo foo // Error: Foo and foo collide…); // … and refer to different thingsreadonly attribute long Attribute; // Error: Attribute collides with keyword…// … attribute};
};
转义标识符
- 和所有语言一样,IDL使用一些保留字,称为关键字。
- 随着IDL的发展,添加到IDL语言中的新关键字可能会无意中与中使用的标识符冲突现有的IDL和使用该IDL的程序。修复这些冲突不仅需要修改IDL,还需要依赖于该IDL的编程语言代码也必须更改。的语言映射规则重命名的IDL标识符将导致映射的标识符名称(例如,方法名称)被更改。
- 为了尽量减少工作量,用户可以在词法上通过在an前面加上下划线(_)来“转义”标识符标识符。这是一个纯粹的词法约定,只关闭关键字检查。结果标识符紧随其后标识符处理的其他规则。例如,标识符_AnIdentifier被当作AnIdentifier来处理。
module M {interface thing {attribute boolean abstract; // Error: abstract collides with keyword abstractattribute boolean _abstract; // OK: abstract is an identifier};
};
关键字
module M {typedef Long Foo; // Error: keyword is long not Longtypedef boolean BOOLEAN; // Error: BOOLEAN collides with the keyword…// …boolean;
};
IDL识别的其他字符
- 标点符号
- 记号
字面量
- Integer
- Character
- Floating-point
- String
- Fixed-point
转义字符
字符串是以空结尾的字符序列。如果字符串由非宽字符组成,则为字符串类型;如果字符串由宽字符组成,则为wstring(宽字符串)类型。
const string S1 = "Hello";
const wstring S2 = L"Hello";
预处理
IDL应按照ISO/IEC 14882:2003中预处理器的规范进行预处理。预处理器可以作为单独的进程实现,也可以内置于IDL编译器中。
IDL 语法
格式良好的IDL规范的语法是用扩展巴科斯范式表示的规则来描述的(EBNF)。
构建块核心数据类型
The following set of rules form the building block:
(1) <specification> ::= <definition>+
(2) <definition> ::= <module_dcl> ";"| <const_dcl> ";"| <type_dcl> ";"
(3) <module_dcl> ::= "module" <identifier> "{" <definition>+ "}"
(4) <scoped_name> ::= <identifier>| "::" <identifier>| <scoped_name> "::" <identifier>
(5) <const_dcl> ::= "const" <const_type> <identifier> "=" <const_expr>
(6) <const_type> ::= <integer_type>| <floating_pt_type>| <fixed_pt_const_type>| <char_type>| <wide_char_type>| <boolean_type>| <octet_type>| <string_type>| <wide_string_type>| <scoped_name>
(7) <const_expr> ::= <or_expr>
(8) <or_expr> ::= <xor_expr>| <or_expr> "|" <xor_expr>
(9) <xor_expr> ::= <and_expr>| <xor_expr> "^" <and_expr>
(10) <and_expr> ::= <shift_expr>| <and_expr> "&" <shift_expr>
(11) <shift_expr> ::= <add_expr>| <shift_expr> ">>" <add_expr>| <shift_expr> "<<" <add_expr>
(12) <add_expr> ::= <mult_expr>| <add_expr> "+" <mult_expr>| <add_expr> "-" <mult_expr>
(13) <mult_expr> ::= <unary_expr>| <mult_expr> "*" <unary_expr>| <mult_expr> "/" <unary_expr>| <mult_expr> "%" <unary_expr>
(14) <unary_expr> ::= <unary_operator> <primary_expr>| <primary_expr>
(15) <unary_operator> ::= "-"| "+"| "~"
(16) <primary_expr> ::= <scoped_name>| <literal>| "(" <const_expr>")"
(17) <literal> ::= <integer_literal>| <floating_pt_literal>| <fixed_pt_literal>| <character_literal>| <wide_character_literal>| <boolean_literal>| <string_literal>| <wide_string_literal>
(18) <boolean_literal> ::= "TRUE"| "FALSE"
(19) <positive_int_const> ::= <const_expr>
(20) <type_dcl> ::= <constr_type_dcl>| <native_dcl> | <typedef_dcl>
(21) <type_spec> ::= <simple_type_spec>
(22) <simple_type_spec> ::= <base_type_spec>| <scoped_name>
(23) <base_type_spec> ::= <integer_type>| <floating_pt_type>| <char_type>| <wide_char_type>| <boolean_type>| <octet_type>
(24) <floating_pt_type> ::="float"| "double"| "long" "double"
(25) <integer_type> ::= <signed_int>| <unsigned_int>
(26) <signed_int> ::= <signed_short_int>| <signed_long_int>| <signed_longlong_int>
(27) <signed_short_int> ::="short"
(28) <signed_long_int> ::="long"
(29) <signed_longlong_int> ::="long""long"
(30) <unsigned_int> ::= <unsigned_short_int>| <unsigned_long_int>| <unsigned_longlong_int>
(31) <unsigned_short_int> ::="unsigned""short"
(32) <unsigned_long_int> ::="unsigned""long"
(33) <unsigned_longlong_int> ::="unsigned""long""long"
(34) <char_type> ::="char"
(35) <wide_char_type> ::="wchar"
(36) <boolean_type> ::="boolean"
(37) <octet_type> ::="octet"
(38) <template_type_spec> ::= <sequence_type>| <string_type>| <wide_string_type>| <fixed_pt_type>
(39) <sequence_type> ::= "sequence" "<" <type_spec> "," <positive_int_const> ">"| "sequence" "<" <type_spec> ">"
(40) <string_type> ::= "string" "<" <positive_int_const> ">"| "string"
(41) <wide_string_type> ::= "wstring" "<" <positive_int_const> ">"| "wstring"
(42) <fixed_pt_type> ::= "fixed" "<" <positive_int_const> "," <positive_int_const> ">"
(43) <fixed_pt_const_type> ::= "fixed"
(44) <constr_type_dcl> ::= <struct_dcl>| <union_dcl>| <enum_dcl>
(45) <struct_dcl> ::= <struct_def>| <struct_forward_dcl>
(46) <struct_def> ::= "struct" <identifier> "{" <member>+ "}"
(47) <member> ::= <type_spec> <declarators> ";"
(48) <struct_forward_dcl> ::= "struct" <identifier>
(49) <union_dcl> ::= <union_def>| <union_forward_dcl>
(50) <union_def> ::= "union" <identifier> "switch" "(" <switch_type_spec> ")""{" <switch_body> "}"
(51) <switch_type_spec> ::= <integer_type>| <char_type>| <boolean_type>| <scoped_name>
(52) <switch_body> ::= <case>+
(53) <case> ::= <case_label>+ <element_spec> ";"
(54) <case_label> ::= "case" <const_expr> ":"| "default" ":"
(55) <element_spec> ::= <type_spec> <declarator>
(56) <union_forward_dcl> ::= "union" <identifier>
(57) <enum_dcl> ::= "enum" <identifier>"{" <enumerator> { "," <enumerator> } * "}"
(58) <enumerator> ::= <identifier>
(59) <array_declarator> ::= <identifier> <fixed_array_size>+
(60) <fixed_array_size> ::= "[" <positive_int_const> "]"
(61) <native_dcl> ::= "native" <simple_declarator>
(62) <simple_declarator> ::= <identifier>
(63) <typedef_dcl> ::= "typedef" <type_declarator>
(64) <type_declarator> ::= { <simple_type_spec>| <template_type_spec>| <constr_type_dcl>} <any_declarators>
(65) <any_declarators> ::= <any_declarator> { "," <any_declarator> }*
(66) <any_declarator> ::= <simple_declarator>| <array_declarator>
(67) <declarators> ::= <declarator> { "," <declarator> }*
(68) <declarator> ::= <simple_declarator>
构建任何块
(69) <base_type_spec> ::+ <any_type>
(70) <any_type> ::= "any"
构建块基本接口
(71) <definition> ::+ <except_dcl> ";"
| <interface_dcl> ";"
(72) <except_dcl> ::= "exception" <identifier> "{" <member>* "}"
(73) <interface_dcl> ::= <interface_def>| <interface_forward_dcl>
(74) <interface_def> ::= <interface_header> "{" <interface_body> "}"
(75) <interface_forward_dcl> ::= <interface_kind> <identifier>
(76) <interface_header> ::= <interface_kind> <identifier>[ <interface_inheritance_spec> ]
(77) <interface_kind> ::= "interface"
(78) <interface_inheritance_spec>::= ":" <interface_name> { "," <interface_name> }*
(79) <interface_name> ::= <scoped_name>
(80) <interface_body> ::= <export>*
(81) <export> ::= <op_dcl> ";"| <attr_dcl> ";"
(82) <op_dcl> ::= <op_type_spec> <identifier> "(" [ <parameter_dcls> ] ")" [ <raises_expr> ]
(83) <op_type_spec> ::= <type_spec>| "void"
(84) <parameter_dcls> ::= <param_dcl> { "," <param_dcl> } *
(85) <param_dcl> ::= <param_attribute> <type_spec> <simple_declarator>
(86) <param_attribute> ::= "in"| "out"| "inout"
(87) <raises_expr> ::= "raises" "(" <scoped_name> { "," <scoped_name> } * ")"
(88) <attr_dcl> ::= <readonly_attr_spec>| <attr_spec>
(89) <readonly_attr_spec> ::= "readonly" "attribute" <type_spec> <readonly_attr_declarator>
(90) <readonly_attr_declarator>::= <simple_declarator> <raises_expr>| <simple_declarator> { "," <simple_declarator> }*
(91) <attr_spec> ::= "attribute" <type_spec> <attr_declarator>
(92) <attr_declarator> ::= <simple_declarator> <attr_raises_expr>| <simple_declarator> { "," <simple_declarator> }*
(93) <attr_raises_expr> ::= <get_excep_expr> [ <set_excep_expr> ]| <set_excep_expr>
(94) <get_excep_expr> ::= "getraises" <exception_list>
(95) <set_excep_expr> ::= "setraises" <exception_list>
(96) <exception_list> ::= "(" <scoped_name> { "," <scoped_name> } * ")"
构建块完整接口
(97) <export> ::+ <type_dcl> ";"| <const_dcl> ";"| <except_dcl> ";"
构建块数据类型
(98) <definition> ::+ <value_dcl> ";"
(99) <value_dcl> ::= <value_def>| <value_forward_dcl>
(100) <value_def> ::= <value_header> "{" <value_element>* "}"
(101) <value_header> ::= <value_kind> <identifier> [ <value_inheritance_spec> ]
(102) <value_kind> ::= "valuetype"
(103) <value_inheritance_spec>::= [ ":" <value_name> ] [ "supports" <interface_name> ]
(104) <value_name> ::= <scoped_name>
(105) <value_element> ::= <export>| <state_member>| <init_dcl>
(106) <state_member> ::= ( "public" | "private" ) <type_spec> <declarators> ";"
(107) <init_dcl> ::= "factory" <identifier> "(" [ <init_param_dcls> ] ")" [ <raises_expr> ] ";"
(108) <init_param_dcls> ::= <init_param_dcl> { "," <init_param_dcl>}*
(109) <init_param_dcl> ::= "in" <type_spec> <simple_declarator>
(110) <value_forward_dcl> ::= <value_kind> <identifier>
构建块CORBA实现–接口
(113) <type_id_dcl> ::= "typeid" <scoped_name> <string_literal>
(114) <type_prefix_dcl> ::= "typeprefix" <scoped_name> <string_literal>
(115) <import_dcl> ::= "import" <imported_scope>
(116) <imported_scope> ::= <scoped_name> | <string_literal>
(117) <base_type_spec> ::+ <object_type>
(118) <object_type> ::= "Object"
(119) <interface_kind> ::+ "local" "interface"
(120) <op_oneway_dcl> ::= "oneway" "void" <identifier> "(" [ <in_parameter_dcls> ] ")"
(121) <in_parameter_dcls> ::= <in_param_dcl> { "," <in_param_dcl> } *
(122) <in_param_dcl> ::= "in" <type_spec> <simple_declarator>
(123) <op_with_context> ::= {<op_dcl> | <op_oneway_dcl>} <context_expr>
(124) <context_expr> ::= "context" "(" <string_literal> { "," <string_literal>* } ")"
构建块CORBA实现–数据类型
(125) <value_dcl> ::+ <value_box_def>| <value_abs_def>
(126) <value_box_def> ::= "valuetype" <identifier> <type_spec>
(127) <value_abs_def> ::= "abstract" "valuetype" <identifier> [ <value_inheritance_spec> ]"{" <export>* "}"
(128) <value_kind> ::+ "custom" "valuetype"
(129) <interface_kind> ::+ "abstract" "interface"
(130) <value_inheritance_spec>::+ ":" ["truncatable"] <value_name> { "," <value_name> }*[ "supports" <interface_name> { "," <interface_name> }* ]
(131) <base_type_spec> ::+ <value_base_type>
(132) <value_base_type> ::= "ValueBase"
构建块组件–基本
(133) <definition> ::+ <component_dcl> ";"
(134) <component_dcl> ::= <component_def>| <component_forward_dcl>
(135) <component_forward_dcl>::= "component" <identifier>
(136) <component_def> ::= <component_header> "{" <component_body> "}"
(137) <component_header> ::= "component" <identifier> [ <component_inheritance_spec> ]
(138) <component_inheritance_spec>::= ":" <scoped_name>
(139) <component_body> ::= <component_export>*
(140) <component_export> ::= <provides_dcl> ";"| <uses_dcl> ";"| <attr_dcl> ";"
(141) <provides_dcl> ::= "provides" <interface_type> <identifier>
(142) <interface_type> ::= <scoped_name>
(143) <uses_dcl> ::= "uses" <interface_type> <identifier>
构建块组件–homes
(144) <definition> ::+ <home_dcl> ";"
(145) <home_dcl> ::= <home_header> "{" <home_body> "}"
(146) <home_header> ::= "home" <identifier> [ <home_inheritance_spec> ]"manages" <scoped_name>
(147) <home_inheritance_spec> ::= ":" <scoped_name>
(148) <home_body> ::= <home_export>*
(149) <home_export> ::= <export>| <factory_dcl> ";"
(150) <factory_dcl> ::= "factory" <identifier> "(" [ <factory_param_dcls> ] ")" [ <raises_expr> ]
(151) <factory_param_dcls> ::= <factory_param_dcl> {"," <factory_param_dcl>}*
(152) <factory_param_dcl> ::= "in" <type_spec> <simple_declarator>
构建块CCM实现
(153) <definition> ::+ <event_dcl> ";"
(154) <component_header> ::+ "component" <identifier> [ <component_inheritance_spec> ]<supported_interface_spec>
(155) <supported_interface_spec>::= "supports" <scoped_name> { "," <scoped_name> }*
(156) <component_export> ::+ <emits_dcl> ";"| <publishes_dcl> ";"| <consumes_dcl> ";"
(157) <interface_type> ::+ "Object"
(158) <uses_dcl> ::+ "uses" "multiple" <interface_type> <identifier>
(159) <emits_dcl> ::= "emits" <scoped_name> <identifier>
(160) <publishes_dcl> ::= "publishes" <scoped_name> <identifier>
(161) <consumes_dcl> ::= "consumes" <scoped_name> <identifier>
(162) <home_header> ::+ "home" <identifier> [ <home_inheritance_spec> ][ <supported_interface_spec> ]"manages" <scoped_name> [ <primary_key_spec> ]
(163) <primary_key_spec> ::= "primarykey" <scoped_name>
(164) <home_export> ::+ <finder_dcl> ";"
(165) <finder_dcl> ::= "finder" <identifier> "(" [ <init_param_dcls> ] ")" [ <raises_expr> ]
(166) <event_dcl> ::= ( <event_def>| <event_abs_def>| <event_forward_dcl> )
(167) <event_forward_dcl> ::= [ "abstract" ] "eventtype" <identifier>
(168) <event_abs_def> ::= "abstract" "eventtype" <identifier> [ <value_inheritance_spec> ]"{" <export>* "}"
(169) <event_def> ::= <event_header> "{" <value_element> * "}"
(170) <event_header> ::= [ "custom" ] "eventtype" <identifier> [ <value_inheritance_spec> ]
构建块组件–端口和连接器
(171) <definition> ::+ <porttype_dcl> ";"| <connector_dcl> ";"
(172) <porttype_dcl> ::= <porttype_def>| <porttype_forward_dcl>
(173) <porttype_forward_dcl> ::= "porttype" <identifier>
(174) <porttype_def> ::= "porttype" <identifier> "{" <port_body> "}"
(175) <port_body> ::= <port_ref> <port_export>*
(176) <port_ref> ::= <provides_dcl> ";"| <uses_dcl> ";"| <port_dcl> ";"
(177) <port_export> ::= <port_ref>| <attr_dcl> ";"
(178) <port_dcl> ::= {"port" | "mirrorport"} <scoped_name> <identifier>
(179) <component_export> ::+ <port_dcl> ";"
(180) <connector_dcl> ::= <connector_header> "{" <connector_export>+ "}"
(181) <connector_header> ::= "connector" <identifier> [ <connector_inherit_spec> ]
(182) <connector_inherit_spec> ::= ":" <scoped_name>
(183) <connector_export> ::= <port_ref>| <attr_dcl> ";"
构建模板模块
(184) <definition> ::+ <template_module_dcl> ";"| <template_module_inst> ";"
(185) <template_module_dcl> ::= "module" <identifier> "<" <formal_parameters> ">""{" <tpl_definition> +"}"
(186) <formal_parameters> ::= <formal_parameter> {"," <formal_parameter>}*
(187) <formal_parameter> ::= <formal_parameter_type> <identifier>
(188) <formal_parameter_type> ::= "typename" | "interface" | "valuetype" | "eventtype"| "struct" | "union" | "exception" | "enum" | "sequence"| "const" <const_type>| <sequence_type>
(189) <tpl_definition> ::= <definition>| <template_module_ref> ";"
(190) <template_module_inst> ::= "module" <scoped_name> "<" <actual_parameters> ">" <identifier>
(191) <actual_parameters> ::= <actual_parameter> { "," <actual_parameter>}*
(192) <actual_parameter> ::= <type_spec>| <const_expr>
(193) <template_module_ref> ::= "alias" <scoped_name> "<" <formal_parameter_names> ">" <identifier>
(194) <formal_parameter_names>::= <identifier> { "," <identifier>}
构建块扩展数据类型
(195) <struct_def> ::+ "struct" <identifier> ":" <scoped_name> "{" <member>* "}"| "struct" <identifier> "{" "}"
(196) <switch_type_spec> ::+ <wide_char_type>| <octet_type>
(197) <template_type_spec> ::+ <map_type>
(198) <constr_type_dcl> ::+ <bitset_dcl>| <bitmask_dcl>
(199) <map_type> ::= "map" "<" <type_spec> "," <type_spec> "," <positive_int_const> ">"| "map" "<" <type_spec> "," <type_spec> ">"
(200) <bitset_dcl> ::= "bitset" <identifier> [":" <scoped_name>] "{" <bitfield>* "}"
(201) <bitfield> ::= <bitfield_spec> <identifier>* ";"
(202) <bitfield_spec> ::= "bitfield" "<" <positive_int_const> ">"| "bitfield" "<" <positive_int_const> "," <destination_type> ">"
(203) <destination_type> ::= <boolean_type> | <octet_type> | <integer_type>
(204) <bitmask_dcl> ::= "bitmask" <identifier> "{" <bit_value> { "," <bit_value> }* "}"
(205) <bit_value> ::= <identifier>
(206) <signed_int> ::+ <signed_tiny_int>
(207) <unsigned_int> ::+ <unsigned_tiny_int>
(208) <signed_tiny_int> ::= “int8”
(209) <unsigned_tiny_int> ::= “uint8”
(210) <signed_short_int> ::+ “int16”
(211) <signed_long_int> ::+ “int32”
(212) <signed_longlong_int> ::+ “int64”
(213) <unsigned_short_int> ::+ “uint16”
(214) <unsigned_long_int> ::+ “uint32”
(215) <unsigned_longlong_int> ::+ “uint64”
构建块匿名类型
(216) <type_spec> ::+ <template_type_spec>
(217) <declarator> ::+ <array_declarator>
构建块注释
(218) <definition> ::+ <annotation_dcl> " ;"
(219) <annotation_dcl> ::= <annotation_header> "{" <annotation_body> "}"
(220) <annotation_header> ::= "@annotation" <identifier>
(221) <annotation_body> ::= { <annotation_member>| <enum_dcl> ";"| <const_dcl> ";"| <typedef_dcl> ";" }*
(222) <annotation_member> ::= <annotation_member_type> <simple_declarator>[ "default" <const_expr> ] ";"
(223) <annotation_member_type>::= <const_type> | <any_const_type> | <scoped_name>
(224) <any_const_type> ::= "any"
(225) <annotation_appl> ::= "@" <scoped_name> [ "(" <annotation_appl_params> ")" ]
(226) <annotation_appl_params>::= <const_expr>| <annotation_appl_param> { "," <annotation_appl_param> }*
(227) <annotation_appl_param>::= <identifier> "=" <const_expr>
构建模块之间的关系
即使构建块被设计得尽可能独立,它们也被一些依赖关系联系在一起。
3 补充
3.1 OMG介绍
OMG成立于1989年,是一个开放的会员制、非盈利的计算机行业标准联盟。为可互操作、可便携和可复用的分布式、异构环境下的企业应用程序,制定和维护计算机行业规范。会员包括资讯科技供应商、终端用户、政府机构和学术界。
OMG的成员公司按照成熟、开放的流程编写、采用和维护其规范。OMG的规范实现模型驱动架构(MDA),通过对企业的全生命周期方法最大化ROI集成,包括多种操作系统、编程语言、中间件和网络基础设施,以及软件开发环境。
详见:http://www.omg.org/
3.2 CORBA
- CORBA,Common Object Request Broker Architecture,公共对象请求代理体系结构。由OMG组织制订的一种标准的面向对象应用程序体系规范。或者说 CORBA体系结构是OMG为解决分布式处理环境(DCE)中,硬件和软件系统的互连而提出的一种解决方案。
- 现在CORBA用的已经很少了,基本上只有一些大的电信项目还在用,现在同类的解决方案中WebService是比较流行的。
XML-RPC / SOAP
XML-RPC发表于1998年,由UserLand Software(UserLand Software)的Dave Winer及Microsoft共同发表。后来在新的功能不断被引入下,这个标准慢慢演变成为今日的SOAP协议。
REST
REST是当今最为流行的API。因为大量的Web应用采用REST作为其API的选择。REST是 Representational State Transfer 的缩写。是Roy Thomas Fielding博士于2000年在他的博士论文中提出来的一种万维网软件架构风格。
CORBA 和 gRPC 比较
CORBA 和 gRPC 二者的设计,都是为了使客户端相信服务器在同一台机器。客户机在桩(Stub)上调用一个方法(method),调用过程由底层协议透明地处理。
3.3 EBNF(扩展巴科斯范式)
- 扩展巴科斯-瑙尔范式(Extended Backus–Naur Form,EBNF)是一种用于描述计算机编程语言等正式语言的与上下文无关语法的元语法(metasyntax)符号表示法。简而言之,它是一种描述语言的语言。它是基本巴科斯范式(BNF)元语法符号表示法的一种扩展。
- 最初由尼克劳斯·维尔特开发,最常用的EBNF变体由标准是 ISO-14977 所定义。
EBNF的基本语法形式如下,这个形式也被叫做production:
左式(LeftHandSide) = 右式(RightHandSide).
标准ISO/IEC 14977 所定义的符号:
参考
1、OMG–IDL-4.2-PDF
2、wiki-扩展巴克斯-诺尔范式
3、CORBA的简单介绍及HelloWorld
4、扩展巴科斯范式(EBNF)简介
5、架构师该如何为应用选择合适的API
6、远程通信协议:从 CORBA 到 gRPC
相关文章:

OMG--IDL(Interface Definition Language)
OMG--IDL(Interface Definition Language) 1 概述2 内容缩写IDL 语法和语义概述词法约定ISO Latin-1的字母字符如下表十进制数字字符图形字符格式化字符Tokens注释标识符冲突规则转义标识符关键字IDL识别的其他字符字面量 预处理IDL 语法构建块核心数据类…...
英语学习:M开头
machine 机器 mad 发疯的,生气的 madam 女士,夫人 madame 夫人 magazine 杂志 magic 有魔力的 maid 女仆,侍女 mail 邮递 mailbox 邮箱 mainland 大陆 major 较大的,主要的 majority 大多数 male 雄的 man 人类 man…...

【计算机组成原理与体系结构】控制器
目录 一、CPU的功能与基本结构 二、指令周期的数据流 三、数据通路 四、硬布线控制器 五、微程序控制器 六、微指令 一、CPU的功能与基本结构 运算器基本结构 控制器基本结构 CPU的基本结构 二、指令周期的数据流 取址周期 间址周期 中断周期 指令周期流程 三、数据通路 …...
结构化命令
章节目录: 一、使用 if-then 语句二、if-then-else 语句三、嵌套 if 语句四、test 命令4.1 数值比较4.2 字符串比较4.3 文件比较 五、复合条件测试六、if-then 的高级特性6.1 使用单括号6.2 使用双括号6.3 使用双方括号 七、case 命令八、结束语 本章内容࿱…...

Java Web实训项目:西蒙购物网
文章目录 一、创建数据库和表1、创建数据库2、创建用户表3、创建类别表4、创建商品表5、创建订单表 二、创建Simonshop项目1、创建web项目2、修改Artifacts名称:simonshop3、重新部署项目4、编辑首页5、启动应用,查看效果 三、创建实体类1、用户实体类2、…...

ChatGPT Prompt 提示词设计技巧必知必会
本文内容整理自图灵社区直播《朱立成:ChatGPT Prompt提示词技巧必知必会》。 朱立成,图灵社区《ChatGPT即学即用》视频课程作者,软件工程师,对新事物充满好奇,关注ChatGPT应用。2001年毕业于浙江大学,从事软…...

尚硅谷-云尚办公-项目复盘
尚硅谷-云尚办公-项目复盘 资料地址本文介绍问题汇总问题1.knife4j无法下载 视频4问题2.dev等含义 视频5问题3.wrapper继承/实现图 视频8问题4.修改统一返回结果 视频11问题5.修改后新增也变修改 视频29问题6.redis中key值乱码 视频55-60问题7.RangeError: Maximum call stack …...

nacos升级到2.0.3(单机模式)
前提:https://github.com/alibaba/spring-cloud-alibaba/wiki/版本说明 Spring Cloud AlibabaSpring CloudSpring BootNacos2.2.7.RELEASESpring Cloud Hoxton.SR122.3.12.RELEASE2.0.3 一、pom.xml文件 <parent><groupId>org.springframework.boot&…...

Koa学习3:用户添加、错误处理
模型 在src目录下创建model目录,用来存放模型 创建用户模型 user.model.js 注意: UUID类型是无法自增的,将id设置为UUID类型时只需要为其指定默认值即可 // 数据类型 const { DataTypes } require(sequelize); // 导入已经连接了数据库…...

网络安全入门学习第十五课——PHP基础
文章目录 一、WEB技术1、什么是web2、B/S架构3、C/S架构 二、PHP概述1、PHP是什么2、PHP受欢迎的原因3、基于MVC模式的PHP框架4、常用编译工具5、PHP环境搭建6、开发工具 三、PHP基本语法格式1、标记2、输出语句3、注释4、标识符 四、数据与运算1、常量1.1、常量定义1.2、预定义…...

电子科技大学 数学专业-功不唐捐,玉汝于成
电子科技大学 数学专业 功不唐捐,玉汝于成 1.本科背景 本科是坐落于湖南湘潭的湖南科技大学,专业为网络工程专业,因热爱数学专业,所以决定跨考数学专业。 本科专业课平均成绩85,排名10/104。CET 4 474分,…...
Android10.0 iptables用IOemNetd实现删除子链功能的实现
1.前言 在10.0的系统rom定制化开发中,在system中netd网络这块的产品需要中,会要求设置屏蔽ip地址之内的功能, liunx中iptables命令也是比较重要的,接下来就来在IOemNetd这块实现删除创建子链的相关功能 2. iptables用IOemNetd实现删除创建子链功能的实现的核心类 syste…...

OpenGL光照之光照贴图
文章目录 漫反射贴图镜面光贴图放射光贴图代码 每个物体都拥有自己独特的材质从而对光照做出不同的反应的方法。这样子能够很容易在一个光照的场景中给每个物体一个独特的外观,但是这仍不能对一个物体的视觉输出提供足够多的灵活性。 我们将整个物体的材质定义为一个…...

2018~2019 学年第二学期《信息安全》考试试题(B 卷)
北京信息科技大学 2018 ~2019 学年第 2 学期 《信息安全》课程期末考试试卷 B 课程所在学院:计算机学院 适用专业班级:计科 1601-06,重修 考试形式:(闭卷) 一. 选择题(本题满分 10 分,共含 10 道小题,每小题 1 分) 网络中存在的安全漏洞主…...
LeetCode-C#-0002.两数相加
0.声明 该题目来源于LeetCode 如有侵权,立马删除。 解法不唯一,如有新解法可一同讨论。 1.题目 0002两数相加 给你两个非空的链表,表示两个非负的整数,它们每位数字都是按照逆序的方式存储的,并且每个节点只能存储一…...

访问修饰符private,default,protected,public访问等级区别
private:private是最严格的访问修饰符,它将成员声明为私有的。私有成员只能在声明它们的类内部访问,其他类无法直接访问私有成员。这样可以确保数据的封装性和安全性。 default(默认):如果没有明确指定访问…...

阿里云(Linux)安装Docker教程
首先安装docker,需要找到帮助文档,那肯定是我们的官网: Install Docker Engine on CentOS | Docker Documentation 找到对应的位置,这里是安装在CentOS中,版本需要Ce…...
Linux C编程基础:获取时间
1.前言 对于linux下的编程,无论是用户态还是内核态,时间获取都是经常需要使用到的。以下分别从用户态和内核态整理了几个常用的时间获取接口,供编写代码时快速查阅。 2.用户态获取时间 2.1 clock_gettime() #include <time.h>int c…...
Spring核心注解
1、Bean注解 作用:用于把当前方法的返回值作为bean对象存入spring的ioc容器中位置: 一般出现在方法上面属性: name:用于指定bean的id。当不写时,默认值是当前方法的名称细节:当我们使用注解配置方法时,如果方法有参数,…...

哈希表原理,以及unordered_set/和unordered_map的封装和迭代器的实现
哈希表 unordered系列unordered_set和unordered_map的使用哈希哈希概念哈希冲突哈希函数闭散列开散列哈希表的扩容哈希表源码(开散列和闭散列) 封装unordered_set/和unordered_map,以及实现迭代器节点定义unordered_set定义unordered_map定义…...
Java 8 Stream API 入门到实践详解
一、告别 for 循环! 传统痛点: Java 8 之前,集合操作离不开冗长的 for 循环和匿名类。例如,过滤列表中的偶数: List<Integer> list Arrays.asList(1, 2, 3, 4, 5); List<Integer> evens new ArrayList…...

MongoDB学习和应用(高效的非关系型数据库)
一丶 MongoDB简介 对于社交类软件的功能,我们需要对它的功能特点进行分析: 数据量会随着用户数增大而增大读多写少价值较低非好友看不到其动态信息地理位置的查询… 针对以上特点进行分析各大存储工具: mysql:关系型数据库&am…...
解决本地部署 SmolVLM2 大语言模型运行 flash-attn 报错
出现的问题 安装 flash-attn 会一直卡在 build 那一步或者运行报错 解决办法 是因为你安装的 flash-attn 版本没有对应上,所以报错,到 https://github.com/Dao-AILab/flash-attention/releases 下载对应版本,cu、torch、cp 的版本一定要对…...

k8s业务程序联调工具-KtConnect
概述 原理 工具作用是建立了一个从本地到集群的单向VPN,根据VPN原理,打通两个内网必然需要借助一个公共中继节点,ktconnect工具巧妙的利用k8s原生的portforward能力,简化了建立连接的过程,apiserver间接起到了中继节…...
基于Java Swing的电子通讯录设计与实现:附系统托盘功能代码详解
JAVASQL电子通讯录带系统托盘 一、系统概述 本电子通讯录系统采用Java Swing开发桌面应用,结合SQLite数据库实现联系人管理功能,并集成系统托盘功能提升用户体验。系统支持联系人的增删改查、分组管理、搜索过滤等功能,同时可以最小化到系统…...
JavaScript基础-API 和 Web API
在学习JavaScript的过程中,理解API(应用程序接口)和Web API的概念及其应用是非常重要的。这些工具极大地扩展了JavaScript的功能,使得开发者能够创建出功能丰富、交互性强的Web应用程序。本文将深入探讨JavaScript中的API与Web AP…...

云原生安全实战:API网关Kong的鉴权与限流详解
🔥「炎码工坊」技术弹药已装填! 点击关注 → 解锁工业级干货【工具实测|项目避坑|源码燃烧指南】 一、基础概念 1. API网关(API Gateway) API网关是微服务架构中的核心组件,负责统一管理所有API的流量入口。它像一座…...
Kafka主题运维全指南:从基础配置到故障处理
#作者:张桐瑞 文章目录 主题日常管理1. 修改主题分区。2. 修改主题级别参数。3. 变更副本数。4. 修改主题限速。5.主题分区迁移。6. 常见主题错误处理常见错误1:主题删除失败。常见错误2:__consumer_offsets占用太多的磁盘。 主题日常管理 …...

Windows电脑能装鸿蒙吗_Windows电脑体验鸿蒙电脑操作系统教程
鸿蒙电脑版操作系统来了,很多小伙伴想体验鸿蒙电脑版操作系统,可惜,鸿蒙系统并不支持你正在使用的传统的电脑来安装。不过可以通过可以使用华为官方提供的虚拟机,来体验大家心心念念的鸿蒙系统啦!注意:虚拟…...
在Spring Boot中集成RabbitMQ的完整指南
前言 在现代微服务架构中,消息队列(Message Queue)是实现异步通信、解耦系统组件的重要工具。RabbitMQ 是一个流行的消息中间件,支持多种消息协议,具有高可靠性和可扩展性。 本博客将详细介绍如何在 Spring Boot 项目…...