什么是RSS

RSS(Rich Site Summary或者RDF Site Summary)是一种用于网站内容集成的技术。这种最初源自浏览器“新闻频道”的技术,现在却在企业门户(portal)、企业应用集成(EAI)等方面得到了更加宽广的用武之地。

————————————————

What is RSS?
By Mark Pilgrim

RSS is a format for syndicating news and the content of news-like sites, including major news sites like Wired, news-oriented community sites like Slashdot, and personal weblogs. But it's not just for news. Pretty much anything that can be broken down into discrete items can be syndicated via RSS: the "recent changes" page of a wiki, a changelog of CVS checkins, even the revision history of a book. Once information about each item is in RSS format, an RSS-aware program can check the feed for changes and react to the changes in an appropriate way.

RSS-aware programs called news aggregators are popular in the weblogging community. Many weblogs make content available in RSS. A news aggregator can help you keep up with all your favorite weblogs by checking their RSS feeds and displaying new items from each of them.

A brief history

But coders beware. The name "RSS" is an umbrella term for a format that spans several different versions of at least two different (but parallel) formats. The original RSS, version 0.90, was designed by Netscape as a format for building portals of headlines to mainstream news sites. It was deemed overly complex for its goals; a simpler version, 0.91, was proposed and subsequently dropped when Netscape lost interest in the portal-making business. But 0.91 was picked up by another vendor, UserLand Software, which intended to use it as the basis of its weblogging products and other web-based writing software.

In the meantime, a third, non-commercial group split off and designed a new format based on what they perceived as the original guiding principles of RSS 0.90 (before it got simplified into 0.91). This format, which is based on RDF, is called RSS 1.0. But UserLand was not involved in designing this new format, and, as an advocate of simplifying 0.90, it was not happy when RSS 1.0 was announced. Instead of accepting RSS 1.0, UserLand continued to evolve the 0.9x branch, through versions 0.92, 0.93, 0.94, and finally 2.0.

What a mess.

So which one do I use?

That's 7 -- count 'em, 7! -- different formats, all called "RSS". As a coder of RSS-aware programs, you'll need to be liberal enough to handle all the variations. But as a content producer who wants to make your content available via syndication, which format should you choose?

RSS versions and recommendations
Version Owner Pros Status Recommendation
0.90 Netscape   Obsoleted by 1.0 Don't use
0.91 UserLand Drop dead simple Officially obsoleted by 2.0, but still quite popular Use for basic syndication. Easy migration path to 2.0 if you need more flexibility
0.92, 0.93, 0.94 UserLand Allows richer metadata than 0.91 Obsoleted by 2.0 Use 2.0 instead
1.0 RSS-DEV Working Group RDF-based, extensibility via modules, not controlled by a single vendor Stable core, active module development Use for RDF-based applications or if you need advanced RDF-specific modules
2.0 UserLand Extensibility via modules, easy migration path from 0.9x branch Stable core, active module development Use for general-purpose, metadata-rich syndication

What does RSS look like?

Imagine you want to write a program that reads RSS feeds, so that you can publish headlines on your site, build your own portal or homegrown news aggregator, or whatever. What does an RSS feed look like? That depends on which version of RSS you're talking about. Here's a sample RSS 0.91 feed (adapted from XML.com's RSS feed):

<rss version="0.91">
  <channel>
    <title>XML.com</title>
    <link>http://www.xml.com/</link>
    <description>XML.com features a rich mix of information and services for the XML community.</description>
    <language>en-us</language>
    <item>
      <title>Normalizing XML, Part 2</title>
      <link>http://www.xml.com/pub/a/2002/12/04/normalizing.html</link>
      <description>In this second and final look at applying relational normalization techniqu

阅读终点,创作起航,您可以撰写心得或摘录文章要点写篇博文。去创作
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
### 回答1: RSS (Resident Set Size) 在 Linux 进程中代表该进程使用的物理内存大小。这个值包括该进程使用的代码段、数据段、栈以及共享库占用的内存。这个值不包括该进程使用的缓存或交换空间。 ### 回答2: 在Linux进程中,RSS代表Resident Set Size,即进程的驻留集大小。驻留集是指进程在物理内存中实际驻留的部分。进程的驻留集由操作系统动态分配和管理,包括进程当前使用的代码和数据以及相关的堆栈空间。RSS的单位是字节。 对于一个运行中的进程,其虚拟内存空间可能比实际分配的物理内存空间要大得多。这是因为Linux采用了虚拟内存技术,通过将进程的虚拟内存映射到物理内存或磁盘上的交换空间,实现了更高效的内存管理。 RSS是衡量一个进程实际占用的内存大小的指标。通过查看进程的RSS,我们可以了解到该进程在当前时刻所占用的物理内存空间,从而评估进程的内存使用情况。如果一个进程的RSS过大,可能会导致系统内存不足,从而影响系统的性能和稳定性。因此,合理地管理和优化进程的内存占用,可以提高系统的运行效率。 通过使用工具如ps命令和top命令,可以方便地查看进程的RSS。同时,可以使用一些性能分析工具如valgrind、perf等来深入分析进程的内存使用情况,帮助开发人员定位内存泄漏和性能问题。 ### 回答3: 在Linux进程中,RSS代表Resident Set Size,即驻留集大小。驻留集大小是指一个进程当前在内存中的实际消耗的物理内存大小。 操作系统为每个进程提供有限的物理内存资源,而进程执行时所需的内存可能会随着时间和运行状态的变化而变化。RSS用于衡量当前进程实际占用的物理内存数量,它包括进程的代码、数据、堆栈和动态链接库等在内存中的部分。 进程的RSS大小会受到多种因素的影响,例如进程的代码大小、所申请的堆内存大小、使用的共享库数量等。当进程运行时,如果需要更多的内存,操作系统会根据内存分配算法进行内存分配,直到达到进程的RSS上限。而过大的RSS大小可能导致系统性能下降,因为内存紧张时,操作系统可能会将部分进程的内存内容交换到磁盘上的交换空间中,从而导致额外的磁盘I/O操作。 系统管理员、开发人员和性能分析师可以通过监控进程的RSS大小来了解进程的内存使用情况,从而进行优化和调整。例如,当发现进程的RSS过大时,可以考虑优化代码、减少内存分配或使用共享库等方法来降低内存消耗。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

gigix

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值