Wednesday, July 26, 2006

OSCON 06 Day 3 - Morning Keynotes and Sessions

Keynotes

Of the morning keynote speakers, Tim O'Reilly had the most interesting and thought-provoking stuff to share. His talk keyed around 5 points that are he thinks are shaping the Open Source landscape today.

  1. Architectures of Participation (aka. Web2.0)


  2. "When the best leader leads, the people say 'We did it ourselves!'"
    - Lao Tzu
    This is about leveraging your community to make your product richer, like Amazon reviews, or Craigslist content.
  3. Open Source Licenses are Obsolete

  4. Maybe a little overstated in its statement, what Tim is saying is that Open Source licenses become irrelevant if the code is changed and run on web server somewhere, and it never redistributed. The community needs to create a similar definition for Open Services.
  5. Asymetric Competition

  6. While big companies have lots of money to throw at problems, it's the small companies that create out-of-the-box solutions that blind-side the big guys. Craigslist, with 20 employees, is #8 the top 10 Web compnies in terms of hits, and is < 1% the size of any of it's listmates.
  7. Operations as Advantage


  8. "Being on someone's platform is becoming the same as being hosted on their infrastructure
    - Missed attribution to a MS employee
  9. Open Data

  10. This, I think is the biggest of them. On an obvious level, it's about mashups. If people can get to your data (via APIs) they can do amazing things that you never dreamed of. On another level, it's about your own data, and where it lives, and who owns it, and how easy it is to get out. If it's on your hard drive, it's yours. If it's on comany X's servers, who really owns it and what happens if comany X blows up, or gets bought, or whatever. What happens to your data then?


Random links from Tim's talk

  • Seaside - A web app framework in Squeak Smalltalk

  • Ning - A build-your-own-webapp for the masses

  • OpenFount Web2.0 app service that creates 2.0ishness via GWT and uses Amazon S3 for storage.

  • StumbleUpon - A new way of discovering web sites.




Session 1
Metaprogramming Java with HiveMind and Javassist
Howard Lewis Ship
hlship@gmail.com

Metaprogramming - Writing programs to write programs. Traditionally at compiletime: lexx, yacc, XDoclet (javadoc-style comments that affect program build), AspectJ.

Solution 1: Source Code Generation - Generate more source code at build time (XDoclet, ejbc) Awkward to write test to code that may not exists. Has a more complex build cycle.

Solution 2: Aspect-Oriented Programming - Metaprogramming with AspectJ: weave your code in with ohter code in an "aspect". Cotrol how inital code and aspect code works together. It changes your classes at build-time by adding method calls interspersed with your code.

Runtime Metaprogramming: Leave existing classes alone, and create new classes at runtime. Factories use configuraiton to create new classes and instantiate them. Done by Annotations.

HiveMind: Inversion-of-control container, much like Spring. Provides lifecycle to services: injection of dependencies, notification of lifecycle events. Driven by XML configuration. AOL via interceptors wrap implementations.

Javassist: APO library: Locat classes into memory as CtClass, modify them: add, remove, change, convert into Class objects. Don't have to learn bytecode ... Java-like syntax. (Part of JBoss)

HiveMind wrappers: Doesn't change existing classes, lots of proxies. ClassFactory is a simplified API wrapper around ClassFactory. Create new ClassFab instance, and add constructior, interfaces, fields to that instance.

Metaprogramming and Design Patterns - meta makes it easy to build code that implements useful design patterns easily (and more extisibly) on the fly.

-Bill



Session 2
Embedding a Database in the Browser
David Van Couvering
Database Technology Group - Sun Microsystems
david.vancouvering@sun.com

A database? In a browser? Why?
This is useful because....: the mobile user, keep personal data off the server, and it provides a fast local web cache.

What do you need to make this work: Java, embedable, small-footprint, standards compliant, secure, and provide automatic crash recovery.

Why a database? Standard, portable API (ODBC), ACID semantics, flexible data model, powerful query capability, and works with lots of tools, using existing skills.

What is Apache Derby? 100% Java Open Source relational database, http://db.apache.org/derby. 2M jar, with options to get it down to 500k.

Is this AJAX? Well, not really. All data is stored in the local derby implementation. Maybe LJAX?

To actually use this, your code has to be cert signed (to get acces to the local filesystem for the local databae). Can self-sign or get a real cert from the usual places. Your code then needs to be wrapped in a PrivilegedAction block.

Mapping Data to Fields: Java API with XML abstraction, call JDBC from Javascript, Java Persistance API, dojo storage abstraction,

Essentially: SQL results -> XML -> js into DOM fields.

You can even run this off of a USB stick. The derby format is portable and can be ready by any derby.jar. You can encrypt databases for security.

Alternate solutions: mozStorage (browser specific, intended for internal Mozilla use), dojo.storage (with Flash)

Future Directions: Web server in browser, Synchronization, Implement a dojo StorageProvider.

-Bill

Tags:

No comments: