Blogs : Archives
|
|
| < LGPL for Java, but with Apache's blessing | Improved RIFE in-depth session movie > |
|
Update: RIFE 1.0 has been announced on The ServerSide and a nice discussion is going on there, join us! After four years of development and seventy releases, we finally consider RIFE to be feature-complete. The project has come a long way over the years and the goals have been constantly re-evaluated against production projects and newly introduced technologies. RIFE is now running on sites with 300000 daily page views, it is used for critical systems in a leading telephony company and has scaled down to embedded usage in mobile phones. We have also developed several other open-source projects with it like a forum (Bamboo), a blog (Elephant), an information bot (Drone), and a to-do list tracker (Bla-bla List). Below are the highlights:
You can also read the full changelog for more details. Congratulations and many thanks to everyone who contributed to make this milestone happen. Greatly improved documentationWe spent a lot of time writing javadocs for those early core parts that never had any. Not everything is documented yet, but most of it is done and we will continue increasing the documented source code ratio. The official site is now http://rifers.org. It has been properly designed, contains a lot of additional information and provides the basis for building a vibrant RIFE community. Backwards incompatible changesSince version 1.0 marks a stability milestone, we went over most of the sources to identify parts that would benefit from permanent consistency changes. These are the parts that changed:
Content syndicationRSS 2.0 and Atom 0.3 are now natively supported and can be generated in real-time. The data can be provided in a streaming fashion, which makes the memory footprint very low. To provide feed entries, you have to implement
the For example: public class DemoEntryProvider implements EntryProvider
{
private Calendar mCalendar = null;
public SimpleEntryProvider()
{
mCalendar = GregorianCalendar.getInstance();
mCalendar.set(2005, Calendar.JANUARY, 1, 0, 0, 0);
mCalendar.set(Calendar.AM_PM, Calendar.AM);
}
public Feed getFeedDescriptor(ElementSupport element)
{
Feed feed = new Feed();
feed
.title("feed_title")
.author("feed_author")
.copyright("feed_copyright")
.description("feed_description")
.language("feed_language")
.link("feed_link")
.publishedDate(mCalendar.getTime());
return feed;
}
public void provideEntries(ElementSupport element, EntryProcessor processor)
{
for (int i = 0; i < 10; i++)
{
mCalendar.set(Calendar.HOUR, i+1);
Entry entry = new Entry();
entry
.author("entry_author"+(i+1))
.content("entry_content"+(i+1))
.link("entry_link"+(i+1))
.publishedDate(mCalendar.getTime())
.title("entry_title"+(i+1));
processor.setEntry(entry);
}
}
}All that's now left to do is to register an element in your site
structure that is aware of this <element file="rife/feed/feedprovider.xml" id="RSS" url="/rss">
<property name="feedtype">rss_2.0</property>
<property name="classname">my.pakkage.DemoEntryProvider</property>
</element>CallbacksCallbacks are
hooks that are being called when beans are manipulated through the
We use this for example in Bamboo to update the message and topic counts each time a message is saved or deleted, like this: public class Message extends Validation<ConstrainedBean, ConstrainedProperty> implements CallbacksProvider<Message>
{
...
public Callbacks<Message> getCallbacks()
{
return new AbstractCallbacks<Message>() {
private Datasource mDatasource = ...;
private MessageQueryManager mMessages = MessageQueryManagerFactory.getInstance(mDatasource);
private Message mDeletedMessage = null;
public boolean afterSave(Message object, boolean success)
{
if (success)
{
mMessages.updateCachedObjectCounts(object);
}
return true;
}
public boolean beforeDelete(int objectId)
{
mDeletedMessage = mMessages.getMessage(objectId);
return true;
}
public boolean afterDelete(int objectId, boolean success)
{
if (success)
{
mMessages.updateCachedObjectCounts(mDeletedMessage);
}
return true;
}
};
}
...
}SOAP improvementsAxis 1.1 used to be the SOAP framework that was integrated with RIFE. The integration was very hackish to say the least since there were no easily replaceable and reusable parts that could be used with another servlet-like gateway in front of it. Since Axis 1.1 doesn't work with Java 5.0, we really had to remove it and either support version 1.2 or use another solution. We decided to move over to XFire and made creating SOAP elements even easier thanks to it. All that's needed to setup a SOAP webservice in RIFE with XFire now are two properties, like this: <element extends="rife/soap/xfire.xml">
<property name="home-class">com.uwyn.rife.engine.testwebservices.soap.xfire.Echo</property>
<property name="home-api">com.uwyn.rife.engine.testwebservices.soap.xfire.EchoApi</property>
</element>The Java source code is very simple: public class Echo implements EchoApi
{
public String echo(String value)
{
return "I got : '"+value+"'";
}
}
public interface EchoApi
{
public String echo(String value);
}SOAP services now also support the Attachment and HTML support for mail queueThe More production configuration parametersWe added a number of additional configuration parameters that are intended for production environments:
Is When it's
Instead of showing a 503 status code, you can provide a relative or absolute URL in this parameter that will cause the visitor to be redirected to a page that can give a user-friendly message (ie. site is restarting, thanks for your patience, ...).
By default, URLs with the following suffixes will be accessed
directly and are not subject to the behaviour that's configured
through
By providing items for the configuration list you can reconfigure these suffixes. |
|||
Comments |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Add a new comment |
|||
| Comments on this blog entry have been closed. |
| < LGPL for Java, but with Apache's blessing | Improved RIFE in-depth session movie > |


