
三章信息管理.ppt
59页第三章 信息管理龚 斌山东大学计算机科学与技术学院山东省高性能计算中心元计算目录服务MDSMDS•Metacomputing Directory Service, MDS•是Globus提供的一个信息服务模块•主要任务是管理网格中的各种信息,包括信息的发现、注册、查询、修改、注销等•提供一套工具和API用于发现、发布和访问计算网格资源的信息MDS的版本•MDS1(Metacomputing Directory Service)–Centralized database–Globus 1.1.2 and earlier–Did not scale–Single point failure–LDAP based•MDS2(Monitoring and Discovery Service)–Distributed services–In Globus Toolkit 1.1.3 and GT 2.x–Two classes of server: GIIS and GRIS–LDAP based–Lazy caching presented scalability problemMDS的版本(续)•MDS3(Monitoring and Discovery System)–Even more distributed services–Based around OGSI standard–In Globus Toolkit 3.x•MDS4–Based around WSRF standards–In Globus Toolkit 4.x–More native components-(web UI, trigger service, ganglia, hawkeyeGlobus实现信息服务的假设前提•信息资源分布而且单个的资源容易发生故障 •系统的信息提供者数目众多•信息资源的类型和信息使用的类型都很多 MDS试图回答的问题•目前有那些资源可用?•当前网格的状况如何? •如何根据底层资源的配置来优化一个具体的应用?MDS设计需要考虑的方面•性能•扩展性和费用•一致性(Uniformity)•可表达性 •多信息源 •动态数据•灵活访问•安全•容易部署•分布式维护MDS的两类接口•交互接口•编程接口(每次启动程序时使用的处理器个数不同,动态变化)Globus信息服务的两个方面 •信息的使用(information retrieval)•信息的获取(discovery and monitoring)MDS的信息•静态的主机信息,如:操作系统版本、CPU类型、处理器数目;•动态的主机信息,如:平均负载,队列入口等;•存储系统信息,如:可用磁盘空间,全部磁盘空间,等;•通过Network Weather Service提供的网络信息,如:网络带宽,延迟等。
•平台类型和体系的指令集•操作系统的名称和版本•CPU信息——类型,CPU数目,版本,速度,缓存等等•内存——物理和虚拟内存大小,空闲空间等•网络接口信息——机器名和地址•文件系统概要——大小,空闲空间等等MDS在Globus协议集中的位置MDS-2 Implementation•Grid Information Service (GRIS)–Provides resource description–Modular content gateway•Grid Index Information Service (GIIS)–Provides aggregate directory–Hierarchical groups of resources•Lightweight Dir. Access Protocol (LDAP)–Standard with many client implementations–Used for GRIP (and GRRP currently)MDS的特点•MDS提供了一个虚拟组织,在这个组织内,参与到一个合作活动内的一组人能够互相之间共享资源,一个虚拟组织内的资源在一个统一的视图下收集和显示信息。
•GRIS提供了一个通用的方法来查询一个计算网格的当前配置、能力和状态的资源信息这样的服务包括host id,以及一些动态的信息如CPU和可用内存等•GIIS能够将一些任意的GRIS联系起来形成一个连续的系统映像,以供网格应用探究和查询例如,一个GIIS能够列出一个实验室联邦内的所有可用的计算资源,或者一个代理所拥有的所有的分布式数据存储系统MDS结构•每个资源运行一个标准的信息服务(GRIS),它使用LDAP进行通信,并提供关于资源的信息;•一个GIIS提供一个类似网络搜索引擎的缓存服务,每个资源通过一个GIIS进行注册,当缓存失效时,一个Client请求信息服务时,GIIS将从注册的资源出取出信息;•一个GIIS提供了一个在合作层的索引、搜索服务机制GIISGIISGRISGRISGRISGRISMDS的层次结构“Classic” MDS Architecture (MDS-1)•Resources push information into a central organization server via regular updates (globus-gram-reporter), where it can be retrieved by clients.•Regular updates don’t scale as the number of resources grow rapidly. Commercial LDAP servers are optimized for “read” requests, and can’t handle frequent “write” requests.•If organization server is unavailable, no information is available.LDAPOrganizationServerDirectory containsinfo from A and BResource Agram-reporterResource Bgram-reportergram-reporters periodicallyupdate LDAP server’s information.Client 1Client 2Client 3clients query organization serverfor current information.“Standard” MDS Architecture (MDS-2)•Resources run a standard information service (GRIS) which speaks LDAP and provides information about the resource (no searching).•GIIS provides a “caching” service much like a web search engine. Resources register with GIIS and GIIS pulls information from them when requested by a client and the cache as expired.•GIIS provides the collective-level indexing/searching function.GIISCache contains info from A and BResource AGRISGIIS requests information fromGRIS services as needed.Client 1Client 2Client 3Resource BGRISClients 1 and 2 request infodirectly from resources.Client 3 uses GIIS for searchingcollective information.MDS-2 Service Architecture•Dynamic Registration via Reg. Protocol (GRRP)•Resource Inquiry via Info. Protocol (GRIP)–Co-located with resource on network•Resource Discovery (via GRIP or other)–Using GRIP allows resource/directory hierarchydiscovery (GRIP?)lookup (GRIP)registration (GRRP)VO-specific Aggregate Directoriesstandard Resource Description servicesRRRRAA?两个方面相对分离的好处好处•可以支持多种发现与监测策略•可以在多种具体的实现因素之间进行平衡,而不需要修改组成网格的资源与服务如何实现分离?•Core providers–http://www.globus.org/mds/DefaultGRISProviders.html.•generic providers–http://www.globus.org/mds/TestSuite.html.•Custom Information Providers–http://www.globus.org/mds/creating_new_providers.pdf用户1GRISIPIPIPGRIP资源A如何实现分离?用户2GRISIPIPIPGRIP资源AGIISGIISGIISGRIS资源BGRRPGRRPGRRPGlobus提供的不同查询方式如何提高性能?•关键:Cache用户GIIS命中返回数据YNGRIS命中Y返回数据NIP返回数据如何判断cache命中•有需要的数据•在cache time-to-live (cache TTL) 规定的时间内CACHE TTL与GRIS注册频率的关系•GRIS每Q个时间单位重新注册一次•GRIS注册信息的TTL与Q的关系?–TTL<=Q 后果是什么?–TTL>Q? 后果是什么?信息的组织层次:目录信息树DITGRIS•GRIS框架被实现为一个OpenLDAP服务后台,可作为一个可插入的特定的信息服务。
每个MDS的资源能够运行一个本地的GRIS•一个GRIS能够来自其他系统的关于本地机或者其他资源的网格信息他能够通过GIIS进行注册,以便后者将信息传给他人•一个GRIS能够认证和转换来自客户端的查询,将查询进行分派,根据查询的类型分别给予那些关心的信息提供者,最终所有的查询结果被集中返回给客户端•GRIS通过良好定义的API和信息提供者进行通信提供者定义的实现了GRIS API的子过程能够帮助GRIS配置指定信息提供者产生的信息类型GRIS•为了确保GRIS的操作不被干扰,提高反应速度,增强调度的灵活性,每个提供者会缓存一次的查询结果,以便降低提供者被激活的次数缓存的有效时间(TTL)作为提供者的局部配置•由每个提供者返回的结果将会被GRIS进行过滤,以除去那些不满足客户端存储空间以及其他限制的对象这个过滤功能由GRIS完成而不是信息提供者自身完成,这样就保证了:–简单的信息提供者不需要重复实现这一功能;–提供者可以给出一个超过了请求客户端缓存要求的结果的超集GIIS•MDS提供了一个建造聚合目录的框架——GIIS,并提供了这个框架的一个实例从而实现了一个能够提供等级结构的简单的聚合目录。
这个简单的目录能够接受来自子GRIS和GIIS实例的注册信息,并将这些信息联合成一个统一的信息空间客户端的搜索能够查到所有子GRIS上的信息•GIIS能够通过一个简单的命令获取多个GRIS上的信息一个GIIS能够为一个场所或者多场所的合作建立一个组织范围的信息服务器•GIIS框架包括三个主要的组成部分:统一注册句柄、可插入的索引构造、可插入的搜索句柄和GRIS相比,GIIS被实现为一个OpenLDAP服务的特定目的的后端•OpenLDAP的前端解析注册信息,并将其送至后端来执行任何需要创建GIIS索引信息的动作 GRIS与GIIS的相似点•都依赖一个OpenLDAP前端进行协议处理、认证和结果过滤;•都使用同一个用于定制的API,能够共存于一个Server下;•为提供者和目录互操作使用相同的协议,不仅增强了互操作性,而且简化了实现与MDS的交互•和MDS交互的方式有两种:交互式或者进行编程–和MDS进行交互式的交互,需要在UNIX命令行下面敲入命令,这类使用适合于对系统的资源和状态的搜索–要和MDS进行编程交互,则需要在应用中插入程序的调用MDS-2.1 GRIS Providers•grid-info-cpu reports CPU/load info•grid-info-fs reports filesystem info•grid-info-mem reports RAM/VM info•grid-info-net reports NIC/net info •grid-info-os reports OS info •grid-info-platform reports arch. info •grid-info-merged merges all host info*•Extensible for other sources, e.g. GRAMMDS的使用•Grid-info-search–config file 指定配置文件–mdshost host(-h) 指定主机名,$GRID_INFO_HOST–mdsport port(-p) 指定服务器断口号,$GRID_INFO_PORT举例1•查询网格信息服务提供的所有对象 grid-info-search –h giis-demo.globus.org –p 8463 –b ‘Mds-vo-name=local, o=Grid’举例2 •查询网格索引信息服务的文件系统空间grid-info-search –x –h giis-demo.globus.org –p 8422 –b ‘Mds-vo-name=site, o=Grid’ Mds-Fs-freeMB举例3•查询网格索引信息服务的CPU数据grid-info-search – x –h giis-demo.globus.org –p 8422 –b ‘Mds-vo-name=local, o=Grid’ (&(objectclass=MdsCpu) (Mds-Hostn=lucky.mcs.anl.gov))’ Mds-CPu-model Mds-Cpu-speedMHZGlobus信息服务协议的特点•底层的查询与注册协议,使得单个的实体可以比较容易的结合到所定义的信息库中。
• 支持不同查询语言与发现机制的聚集目录•与其它协议的结合,可以支持高级服务与功能,比如代理、检测、容错以及错误恢复 Globus MDS功能总结•定义了为用户提供数据的方法–通过 LDAP协议以及一些特别的机制•可配置的信息提供组件GRIS –GRIS提供了查询网格资源当前配置、能力以及状态的方式–GRIS提供分布式的信息服务,回答关于某一特定信息资源的查询•可配置的聚类目录组件 GIIS –GIIS提供了组合任意GRIS服务的方式,可以提供一致的系统影像,用于网格应用的查找之中–GIIS为用来组织特定兴趣的资源提供机制•产生信息、发布信息、存储信息、查找信息、查询信息、显示信息 GT3的信息服务Accessing Grid Services•GT 3 provides an “index service” (as a higher level service) to access service data provided with grid service.•Service data can includes both hardware and software details of service. Index Service的功能•为服务数据提供者到服务实例的连接提供了一个接口。
•能将来自多个不同的服务数据提供者或其它的网格服务的服务数据有效的聚集起来,并能提供一种有效的对服务数据的查询过程•实现网格服务的注册•动态的服务数据产生及网格节点索引 Index Service的机制•服务组的管理机制•服务的注册机制•服务数据的管理机制•服务数据的预定通知机制•服务数据的查询机制Service Registry从本质上讲,服务注册就是将一个服务组记为另一个服务组的成员服务具体实现的过程如下:RegistryrequestCreate indexService instanceInstance (EntryType)Servicegroupentry locatorContentMember locatorGSHContent•服务激活(activate)时自动发出注册请求•配置方法:–增加RegistryPublishProvider–指明注册配置文件,即服务的content
Service Data managementSubscription/NotificationThe purpose of notification is to deliver interesting messages from a notification source to a notification sink.A notification source is a Grid service instance that implements the NotificationSource portType, and is the sender of notification messages. A source MAY be able to send notification messages to any number of sinks. A notification sink is a Grid service instance that receives notification messages from any number of sources. A sink MUST implement the NotificationSink portType, which allows it to receive notification messagesA notification message is an XML element sent from a notification source to a notification sink. The XML type of that element is determined by the subscription expression.Subscription/Notification1.addListener: This call subscribes the calling client to a particular SDE (which is specified in the call) 2.notifyChange: Whenever a change happens, the MathService instance will ask the SDE to notify its subscribers. 3.deliverNotification: The SDE notifies the subscribers that a change had happenedService data search查询某一服务数据,必须给出拥有服务数据的服务,服务的命名空间,服务数据元素名,若还有其它的条件限制,则需采取Xpath的表达方式。
//gsdl:entry[gsdl:content/prop:propertiesDetail/prop:state="ACTIVE"]xmlns:gsdl=http://www.gridforum.org/namespaces/2003/03/OGSI xmlns:prop=http://ogsa.globus.org/types/properties GT3 Index ServiceFrom “Grid Computing” by J. Joseph and C. Fellenstein, page 340.Service Data•Information about service provided in service data elements (SDEs) as part of the GWSDL file.•The GWSDL file defines service interface (see assignment 2), and SDEs are added to this.Types of Service Data Elements•State Information -- results, previous results, run time information, …•Service Metadata -- system data, supported interfaces, cost of using service, ...More Information•“The Globus Toolkit 3 Programmer’s Tutorial” by Borja Sotomayor, 2004, Chapter 5 and Chapter 6.http://www-unix.globus.org/toolkit/Gives sample code.。
