Archive for September, 2007

Next Page »

GigaSpaces XAP infoQ article

September 25th, 2007

InfoQ published an interview with GigaSpaces on our XAP 6.0 edition http://www.infoq.com/news/2007/09/gigaspaces
This is a very through overview on our last release, which describes many of the areas we’ve been focusing on.

OSGI in my future

September 21st, 2007

I ran across this little discussion regarding the future of Spring and OSGI. Seems the whole management of services, scaling of applications thing is getting some attention.

I am warming up to Spring (hmm that is a great book/article title!) and now with the integration of low-latency, high-throughput service-oriented applications managed via an OSGI-based infrastructure, the world of distributed programming is getting more interesting.

Seems I am going to have to delve into OSGI next.

Another acronym for my collection.

Cheers,

Owen.

DemoKit — here are the files I used when recording the last version of the projectcreator screencast

September 11th, 2007

If you want to look carefully through the templates and scripts I used for the screencast demo, you can download them in a jar file (it is really a zip) from here



Cheers,



Owen.

Revamped the screencast to include a scrollbar and pause button!

September 11th, 2007

Hi all,

In light of the new features described in my last post and the fact that the earlier screencast was nigh unusable due to it being not pause-able, I have created a newer one that shows the generation of projects with the original scripts and default style templates, and then with the new Custom Properties combined with Custom Templates.

It is my hope this will encourage more successful use of this tool and of the OpenSpaces platform.

Note that the webcast moves very quickly so you may want to ready the pause button to catch all the details.

Yes you can!

You can watch the webcast by clicking the following link: projectcreator_tutorial_noSound

Remember: project-creator is *not* supported by GigaSpaces, but OpenSpaces and GigaSpaces are.

Owen.

Project Creator Version .03

September 11th, 2007

(My good friend Toby Found a BUG (NPE) I have since fixed it and added one more trick)

You may download the latest jar from any of the links referring to it.

Such as this one here


(I only have the latest copy available and all links point to the same one)


Note the src.jar is similarly updated and can be found here



Added features:

For those of you who want to add additional files and get really fancy - and in anticipation of supporting Spring Remoting with at least one specified Interface and a possible DAO etc… I have added the ability to do two more things with project creator. (these will no doubt again be improved upon, but for now they suffice to allow me to extend the available use-cases this tool will support)


The Two Added Features:



  1. First Feature: (Pretty Cool and useable)
    Specify the existence of a properties file called customTokens.properties and specify its directory. You specify the flag and also the relative or absolute directory containing customTokens.properties file

    example:
    -customTokens ./extraStuffGoesHere


    example:
    -customTokens c:/tmp/wrk/extraStuffGoesHere

    The contents of that properties file is a series of named tokens and their replacement values.

    NB: The tokens must all begin with @




    example:






    # the use of this file allows you to add arbitrary name-value pairs which will

    # act as replacement tokens within the massaged (template) files.

    # the massaged (template) files are limited to:

    # whatever you provide as args to :

    # -setServiceTemplateName

    # -setPUTemplateName

    # -customTemplateFileNameList (comma-separated list of files found in the -templateDir)

    # as well as the always generated:

    # build.xml

    # the sometimes generated:

    # dataObject.javasrc

    # and the various files generated by the intellij and eclipse handlers

    #to avoid name conflicts it is advised to use a prefix such as @username.THETOKEN

    # Where username is the prefix and token is the thing you care about

    # note that in your template files you will have to provide the complete matching token

    @owen.description=/* A really wild ride baby! */

    @owen.methodsig= public static void doIt(){

    @owen.attribute1=someContent

    @owen.property1=SomeContent



  2. Second Feature: (Kinda ugly and less than simple to get correct)
    Specify the existence of additional files to be used as templates (The astute will notice this was hinted at in the comments within the example customTokens.properties file above)


    It is important to note that there are several expected conditions within the project creator to enable this to work:




    1. You must specify the flag -customTemplateFileNameList followed by a comma-delimited string containing the filenames of the extra template files you wish to include


      example:
      -customTemplateFileNameList Message.javasrc_custom,readme.txt

    2. If adding additional java source files as templates: You must also specify the flag -customPackageDir and supply a single valid package into which they will *all* be placed


      example:
      -customPackageDir com.test.common.interfaces

    3. The package declaration of each of the additional java source templates should also contain this value as either hard-coded or using the following expected token: @customPackageDir
    4. The filename given to the java source template must contain the string: “javasrc” somewhere


      example:
      -customTemplateFileNameList ServiceInterface.myjavasrc_secondVersion

    5. The Resulting java Class or interface will be created using the first-half of the given template filename


      example:
      ServiceInterface.myjavasrc_secondVersion becomes ServiceInterface.java

    6. As a result of the above, the Class or Interface name specified within the java template must match the first-half of the given template filename


      example:
      public interface ServiceInterface extends Serializable{

    7. Non-Java Files specified as part of -customTemplateFileNameList will be saved into the project root directory and will be given the exact same name as provided template filename


      example:
      readme.txt becomes readme.txt and is placed in the root directory of the project





      Again, the primary reason for adding such additional functionality is for me to be able to offer additional templates and examples of such things as Spring Remoting using OpenSpaces and the use of DAO decoupling - not to mention adding additional monitoring services and their associated datatypes that will store their discovered values using the space.

      If you find this additional (restrained) flexibility useful for your purposes as well –great! But feel free to ignore it as well.

      Finally, an example of a script that uses all the above-described features:

      (latest args made available in this release are in bold)




      _____________________________________

      Example Script: createCustomStuff.cmd

      _____________________________________

      rem Personal Settings (these change according to each machine environment)

      set JAR_FILE_LOCATION=./project-creator.jar

      set OUTPUT_DIRECTORY=D:\demoProjectCreator\out

      set JAVA_HOME=c:\java\jdk1.5.0_07

      if “%JSHOMEDIR%.” == “.” set JSHOMEDIR=c:\GigaSpacesXAP6.0

      rem Script-specific Configuration Settings:

      set PROJECT_NAME=Worker

      if “%IDE%.” == “.” set IDE=-eclipse

      set SERVICE_TEMPLATE_NAME=service.javasrc_myversion

      set PU_TEMPLATE_NAME=pu.xmlsrc

      set TEMPLATE_DIR_ARG=-templateDir ./dummytemplates

      rem the following points project-creator to

      rem the directory containing customTokens.properties :

      set CUSTOM_TOKENS_ARG=-customTokens ./dummytemplates

      rem the following tells project-creator that the additional

      rem template files specified will exist in the -templateDir



      set CUSTOM_TEMPLATES_ARG=-customTemplateFileNameList Message.javasrc_custom

      set CUSTOM_PACKAGE_DIR_ARG=-customPackageDir com.test.common



      rem General Options

      rem elect to overwrite existing projects with same name:

      set OVERWRITE_OPTION=-overwrite

      call %JAVA_HOME%\bin\java -jar %JAR_FILE_LOCATION% %IDE% %OVERWRITE_OPTION% -project %PROJECT_NAME% -out %OUTPUT_DIRECTORY% -setServiceTemplateName %SERVICE_TEMPLATE_NAME% -setPUTemplateName %PU_TEMPLATE_NAME% -gigaHome %JSHOMEDIR% %TEMPLATE_DIR_ARG% %CUSTOM_TOKENS_ARG% %CUSTOM_TEMPLATES_ARG% %CUSTOM_PACKAGE_DIR_ARG%

      _____________________________________

      End Of Example Script: createCustomStuff.cmd

      _____________________________________



      Cheers,

      Owen.

      Next Page »