Andrew Powell

Into The Mind of A Solutions Architect

Andrew Powell

Announcing FlexServerLib, The BlazeDS Extension Project

November 12, 2008 · 11 Comments

A while back, at 360|Flex San Jose, I gave a presentation titled "Implementing BlazeDS". I've been interested in BlazeDS a lot since Adobe announced it way back in early 2008. Being open-source, BlazeDS is open to extension and customization. Until now, only dpHibernate has really taken advantage of what can be done when you extend BlazeDS. At 360|Flex, Mike Nimer and I got to talking about how we could integrate some of the things we really like from ColdFusion into BlazeDS / Flex. We considered creating a Flex server that hooked into Mule, the OS ESB, but ultimately decided that Adobe's established presence in the server-side space with BlazeDS / LCDS was enough to guide us in a direction for extending the server-side capabilities of Flex. So Mike and I decided, after a bit of discussion, to create FlexServerLib.

So, what is FlexServerLib? FlexServerLib is an open-source project that aims to extend BlazeDS with custom message adapters, endpoints, and services. We will provide, in addition to each piece of server-side functionality, a corresponding SWC to implement the service on the Flex client.

We chose the name FlexServerLib because we really wanted the same mindset to FlexServerLib as there is to FlexLib. FlexLib is the goto point for AS3/MXML components and is strongly community driven. We want the same thing, the same community atmosphere for FlexServerLib. And, if you're wondering, we ran the name by Doug to get his blessing before settling on it.

Through the course of discussion at 360|Flex, we came across another collaborator: Chris Scott. Chris is really strong in the Flex to Java and Flex to ColdFusion department, plus he's released his own Flex framework: Swiz. Let's just say he knows his stuff. We are leaning on him to integrate the Spring Framework into our adapters to make them simple to use. Spring abstracts out a bunch of configuration headaches when dealing with these enterprise services, so it only makes sense to include it in our adapters. Chris is working on the Spring implementation for our first adapters, the JMSAdapter (Spring configurable), and the MailAdapter. Going forward, a lot of the work Chris is doing will set the groundwork for our pattern of how our adapters work. We're very lucky to have him on board with this project.

This announcement however, is not all fluff and no stuff. We already have something ready to give to the community. The first piece we wanted to deliver was a messaging interface for sending mail; i.e. We wanted to create the BlazeDS/Flex equivalent of CFMAIL. Well, we have a custom messaging adapter (MailAdapter) and the corresponding SWC that will let you send email from your Flex application without any additional server-side code. Now, sending a mail message from Flex is as easy as MessageSender.sendMail(messgae:MailMessage). This is only the tip of the mail iceberg, however. The plan is to evolve this custom adapter into a complete POP3/IMAP interface for Flex. The first piece though is just getting mail to send, and we have that today. We will also be breaking out a RPC component to do the sending of mail only.

So, where are we going with this? We have a few things on our radar to implement, but no real timetable to do it as we all have day jobs which require attention. First up is RTMP. We are planning on implementing RTMP (engineered from Red5's example) into the BlazeDS MessageBroker servlet (or maybe we can get Adobe to just do this and save us the pain). Like I said earlier, we also plan on fleshing out the MailAdapter to support full blown IMAP and POP3 messaging. Another big announcement is that, as a part of creating FlexServerLib, Mike is planning on rolling dpHibernate into FlexServerLib. So, right away, we'll have dpHibernate, a JMSAdapter, and a MailAdapter available as part of FlexServerLib.

I really think that BlazeDS is somewhat overlooked when it comes to building Flex applications. We are aiming to bring more functionality, relevant functionality (think porting cool ColdFusion functionality to BlazeDS), to BlazeDS and enabling powerful applications for Flex developers, while reducing the amount of server-side development. All that has to be done, server-side, for most components of FlexServerLib is to configure the adapter's settings in messaging-config.xml or remoting-config.xml, and include the relevant jars in your BlazeDS deployment. It's as easy as that.

We've already started to recruit contributors as well. Our first two contributors, outside of the core project leadership are Brian O'Connor and Ivan Latysh. Brian is another member of the Universal Mind team and brings a great deal of experience with LCDS and BlazeDS to the table. Ivan has actually contributed to BlazeDS (an EJB adapter), but that contribution has been put off a version by Adobe. I saw this as an opportunity and asked Ivan if he'd like to add his contribution to FlexServerLib. He gladly accepted our request and will be adding it to the repository soon.

What would any open-source project be without sponsorship? Well, we have two firms sponsoring the project. They are, in no particular order, Digital Primates and Universal Mind. These two firms are the only ones that are going to be able to provide you with any project-approved professional services you would need in regards to support and advanced development around FlexServerLib. We also have a third sponsor: JetBrains, the makers of IntelliJ IDEA, the absolute BEST Java (and now Flex) IDE around. JetBrains has kindly donated IntelliJ licenses to the contributors of FlexServerLib. All the more reason for you to become a contributor, a free IntelliJ license to use on your FlexServerLib work.

This project is being hosted at Google Code, and the SVN repository is already open and ready for you to take up. Feel free to drop any of emails or questions in the comments and we'll try to answer as best we can. Contributions, questions, and the like are all welcome. Feel free to sign up for one of the mailing lists, download the code, give us feedback on what we hope will be a great community resource.

Tags: Java · ColdFusion · Flex · General · JMS · Spring · Universal Mind · Hibernate · AIR · WebNext

11 responses so far ↓

  • 1 Joe Rinehart // Nov 12, 2008 at 3:50 PM

    This is absolutely great news. My Java may not be up-to-snuff for helping out with developing adapters, but if you need testers or just people to help spread the word, I'd be happy to help out.<br /><br />I _do_ have what could form the foundation for an adapter that may be handy: it allows dispatching of Swiz events to concurrent clients from either a client or a server-side class. It wouldn't be rocket science to make this an interface that'd work with Cairngorm (or other front controllers). It's in Groovy, though.
  • 2 Andrew Powell // Nov 12, 2008 at 3:54 PM

    @Joe thanks. Anything you are willing to do, we are willing to have you do. Maybe we can work on translating your Groovy to straight-up Java if you want to get it in the project.
  • 3 Ben Clinkinbeard // Nov 12, 2008 at 4:02 PM

    While my feeble mind is not up to the task of contributing (yet?) I am really excited to see and learn more about this project. dpHibernate kicks major ass and I am sure the rest of the components will too. Nice work guys!
  • 4 Andrew Powell // Nov 12, 2008 at 4:14 PM

    @Ben Brian and I will school you in the ways of the Java developer. One day grasshopper, one day.
  • 5 Ryan Campbell // Nov 12, 2008 at 4:47 PM

    Dude! I would love to contribute to this project. I still has some patches for dpHibernate, have a custom tomcat valve that gets authentication working with glassfish and having been thinking for a long time I really want to write an adaptor to handle data paging. Count me in as a contributor once I'm back from Mexico in December :)
  • 6 Andrew Powell // Nov 12, 2008 at 5:20 PM

    @Ryan we'd be more than happy to have you contribute your patches for dpHibernate. The other stuff you've got sounds like a great fit too. <br /><br />Go ahead and email me with your google code account name and I'll add you in. You will get the IntelliJ license after your first commit is done.
  • 7 Igor Costa // Nov 13, 2008 at 8:21 PM

    Sounds a good project in the corner. Hope the RTMP could be implemented and the EJB3 of GraniteDS too into the BlazeDS.<br /><br />Regards<br />Good Luck
  • 8 Rodrigo Pereira Fraga // Nov 18, 2008 at 6:30 PM

    Really cool!!!!!<br /><br />I'm very interesting to help on development!<br /><br />Remoting Destinations by @Annotations (I already implemented only by Spring at this time).<br /><br />JBoss Seam integration...<br /><br />dpHibernate is cool, but I think that needs things to optimize (LazyLoading!!).<br /><br />And many other things...<br /><br />Congratulations!<br /><br />\o/
  • 9 Chris Scott // Nov 18, 2008 at 11:31 PM

    @Rodrigo Pereira Fraga, I've also thought a lot about annotation driven remote destinations, but never really pursued it. Could be something to talk about for sure. <br /><br />Lazy loading is kind of dpHibernate's point! Unless I am not sure getting what you are getting at.
  • 10 Alex // Jan 14, 2009 at 5:50 PM

    Does someone know how to get EJB3 to work with Flex; I am getting simple EJB3 entities back successfully, however with cascading entities, I am encoutering the lazy loading issue.<br />I am using JBoss which implements EJB3 via hibernate; hence I thought dpHibernate would work but no such luck.<br />Any help would be appreciated.
  • 11 Andrew Powell // Jan 26, 2009 at 10:41 AM

    re: Alex if you check out the SVN repo for FlexServerLib, there is an EJB3 connector

Leave a Comment