Loading ...
Sorry, an error occurred while loading the content.

RE: [xml-dbms] Execution framework - Streams & V2 Alpha3 lookover

Expand Messages
  • adam flinton
    ... Good. I thought it was an Oops . ... I ll have a look. If noone else steps in then OK given I ve got a starfire + Oracle to play with here ..(you
    Message 1 of 5 , Jun 13, 2002
    • 0 Attachment
      > adam flinton wrote:
      >
      > > 1) First off some queries re V2:
      > >
      > > The Abstract class
      > org.xmlmiddleware.xmldbms.datahandlers.DataHandlerBase is
      > > not visible outside of it's package thus is causing
      > problemo's with the
      > > Handlers e.g.:
      > >
      > > public class OracleHandler
      > > extends DataHandlerBase
      >
      > Oops.
      >
      > I've made DataHandlerBase and all its protected
      > variables/methods public
      > and checked it into the CVS tree.
      >

      Good. I thought it was an "Oops" <G>.


      > Please note that OracleHandler is not yet implemented. Any
      > chance we can
      > get you to write the code? :)
      >

      I'll have a look. If noone else steps in then OK given I've got a starfire +
      Oracle to play with here <G>..(you should see how fast X-Windows is <VBG>) +
      Oracle 8.1 & DB2 7.2 on this laptop....I'll try to do a DB2 one as well.


      > > 2) I've been running through ideas re an XML execution framework....
      > >
      > > I am coming down to the idea of either passing strings or Streams.
      >
      > Great minds think alike. I took the BaseURL code out of 2.0 because it
      > was just too complex and hacky. In its place, I was thinking about
      > replacing it with extended versions of Reader and Writer (or
      > InputStream
      > and OutputStream), the only difference being the addition of an
      > initialize(Properties) method.
      >

      Again similar thought patterns...


      > This would allow people to read/write stuff from whereever they wanted
      > -- files, URLs, JMS, etc., often just by implementing a thin
      > layer over
      > existing Readers/Writers (InputStreams/OutputStreams).
      >

      Yup.

      > However, I was probably going to keep around the string-based methods,
      > as these are very useful in many cases.
      >

      See below.

      > > Things like Xalan & the various parsers all use
      > it......so...& you can
      > > happily chain streams which is kinda what we're up to....
      >
      > Yes.
      >
      > > Can you compare streams like you can compare Strings? I ask
      > this as it
      > > should be easily possible to Store DOMS which are used
      > repetitively so as to
      > > avoid repetitive parsing of the same stream.
      >
      > You can't. You could compare two stream objects for identity, but that
      > would only tell you about the objects themselves, not the underlying
      > stream. For example, if I built two different FileStreams
      > over the same
      > file, these would return false for the equals method.
      >
      > > Can you store a stream in a hashtable?
      >
      > Again, yes, but you are storing the stream object itself, not the
      > underlying data, so I doubt this would work for what you
      > wanted, such as
      > reuse.
      >
      > The other problem here is that streams tend to be read-once or
      > write-once. That is, you read/write the underlying data once and the
      > stream is "used up". If you want to read/write the same data, you
      > generally need to open a new stream over the underlying data source.
      >

      Re storing XML in general........I thinking hanging onto it as string may be
      the best idea for a number of reasons:

      1) Minimal RAM useage compared to DOM.
      2) Ease of streaming
      3) Ease of immediate output.
      4) Everything "speaks" string.

      Quick example. I've been playing around with XD within Oracle Stored
      Proceedures (SP'es) as well as in an Appserver context trying to work out
      what plays best in general with all the different areas in which XD can be
      used. String can be outputted to a Varchar or a CLOB whereas DOM would have
      to go to String/Varchar to be of use to (for instance) a PL/SQL based SP.

      Equally if I were to think about clustering & also possibly kicking output
      to a process written in something else (e.g. perl, C, C++) via some
      mechanism (e.g. sockets) then streaming out the text would make most sense.

      OK Concrete measures:

      1) I take it you'd want this in the net.xmlmiddleware tree
      2) I'll write the various helper classes for Char stream <> String & DOM <>
      Char Stream. D'you reckon we should go direct Char Stream <> DOM or Char
      Stream <> String <> DOM?

      I'm not sure where to put em. At the mo we've got string store in package
      net.xmlmiddleware.io.

      i.e

      public static void store(String sfilepath, String sfileContent)
      {
      String scontent = sfileContent;
      String spath = sfilepath;
      char[] buf = new char[scontent.length()];
      scontent.getChars(0, scontent.length(), buf, 0);
      try
      {
      // if append to be done just add true to the consructor say
      // FileWriter f1 = new FileWriter(spath,true);
      FileWriter f1 = new FileWriter(spath);
      f1.write(buf);
      f1.close();
      }
      catch (Exception e)
      {
      System.out.println(
      "String Writing Error Occured Filepath = " + spath + "Error
      = " + e);
      }
      }



      Adam


      [Non-text portions of this message have been removed]
    • Ronald Bourret
      ... Cool! ... Not necessarily. I need to adjust the APIs for Transfer and MapManager to use Streams/Readers (?) as well as strings and this will probably mean
      Message 2 of 5 , Jun 19, 2002
      • 0 Attachment
        adam flinton wrote:
        > > Please note that OracleHandler is not yet implemented. Any
        > > chance we can get you to write the code? :)
        >
        > I'll have a look. If noone else steps in then OK given I've got a starfire +
        > Oracle to play with here <G>..(you should see how fast X-Windows is <VBG>) +
        > Oracle 8.1 & DB2 7.2 on this laptop....I'll try to do a DB2 one as well.

        Cool!

        > OK Concrete measures:
        >
        > 1) I take it you'd want this [string stuff] in the net.xmlmiddleware tree

        Not necessarily. I need to adjust the APIs for Transfer and MapManager
        to use Streams/Readers (?) as well as strings and this will probably
        mean changes for ParserUtils as well. I'm hoping to put it into 2.0, but
        no guarantees.

        > 2) I'll write the various helper classes for Char stream <> String & DOM <>
        > Char Stream. D'you reckon we should go direct Char Stream <> DOM or Char
        > Stream <> String <> DOM?

        Hard to say. I haven't given this much thought, yet, so I don't really
        know what I want. It's on the list, but not yet at the top.

        -- Ron
      • adam flinton
        Sorry for the lack of mailing however we ve been taken over by Lawsons which is a good thing. That + shedloads of work in Sweden have held me back. Anyway I m
        Message 3 of 5 , Jul 17, 2002
        • 0 Attachment
          Sorry for the lack of mailing however we've been taken over by Lawsons which
          is a good thing. That + shedloads of work in Sweden have held me back.

          Anyway I'm now fresh for the fight.......

          I have a couple of things to do to the existing GUI Builder:

          1) Separate out the JDBC metadata XML Jtree bit such that it is a unit all
          by itself such that it can be happily used with XD V1, XD V2 & any other app
          which anyone wants to write where they want an easy way to get an XML
          representation of a JDBC source via it's metadata.

          2) Change the JDBC Builder JTree to allow for the selection of multiple
          tables.

          3) Build the Stream/String based execution framework.

          I will probably work on all 3 at once <G> but I will definitely sort 1 & 2
          at the same time.

          Re the exec framework I am quietly trying ideas etc. basically it's ye olde
          "Start simple get complex & then when you understand what you really want
          get simple again <G>

          Right then......VAJ has finally loaded.....time for some work....


          <G>

          Adam

          > -----Original Message-----
          > From: Ronald Bourret [mailto:rpbourret@...]
          > Sent: 31 May 2002 09:50
          > To: xml-dbms@yahoogroups.com
          > Subject: Re: [xml-dbms] Execution framework - Streams & V2 Alpha3
          > lookover
          >
          >
          > adam flinton wrote:
          >
          > > 1) First off some queries re V2:
          > >
          > > The Abstract class
          > org.xmlmiddleware.xmldbms.datahandlers.DataHandlerBase is
          > > not visible outside of it's package thus is causing
          > problemo's with the
          > > Handlers e.g.:
          > >
          > > public class OracleHandler
          > > extends DataHandlerBase
          >
          > Oops.
          >
          > I've made DataHandlerBase and all its protected
          > variables/methods public
          > and checked it into the CVS tree.
          >
          > Please note that OracleHandler is not yet implemented. Any
          > chance we can
          > get you to write the code? :)
          >
          > > 2) I've been running through ideas re an XML execution framework....
          > >
          > > I am coming down to the idea of either passing strings or Streams.
          >
          > Great minds think alike. I took the BaseURL code out of 2.0 because it
          > was just too complex and hacky. In its place, I was thinking about
          > replacing it with extended versions of Reader and Writer (or
          > InputStream
          > and OutputStream), the only difference being the addition of an
          > initialize(Properties) method.
          >
          > This would allow people to read/write stuff from whereever they wanted
          > -- files, URLs, JMS, etc., often just by implementing a thin
          > layer over
          > existing Readers/Writers (InputStreams/OutputStreams).
          >
          > However, I was probably going to keep around the string-based methods,
          > as these are very useful in many cases.
          >
          > > Things like Xalan & the various parsers all use
          > it......so...& you can
          > > happily chain streams which is kinda what we're up to....
          >
          > Yes.
          >
          > > Can you compare streams like you can compare Strings? I ask
          > this as it
          > > should be easily possible to Store DOMS which are used
          > repetitively so as to
          > > avoid repetitive parsing of the same stream.
          >
          > You can't. You could compare two stream objects for identity, but that
          > would only tell you about the objects themselves, not the underlying
          > stream. For example, if I built two different FileStreams
          > over the same
          > file, these would return false for the equals method.
          >
          > > Can you store a stream in a hashtable?
          >
          > Again, yes, but you are storing the stream object itself, not the
          > underlying data, so I doubt this would work for what you
          > wanted, such as
          > reuse.
          >
          > The other problem here is that streams tend to be read-once or
          > write-once. That is, you read/write the underlying data once and the
          > stream is "used up". If you want to read/write the same data, you
          > generally need to open a new stream over the underlying data source.
          >
          > > I like the idea of passing streams as it is then (a)
          > similar to piping (b)
          > > close to the format most of the xml tools need anyway (c)
          > easily possible
          > > to connect in external systems via system.out or sockets or
          > whatever (d)
          > > could allow for comparatively easy clustering.
          >
          > Agreed.
          >
          > > An external "Go get this file" class would allow for easier
          > tying into (a) a
          > > cache & (b) things like JNDI/Directory services.
          >
          > See above.
          >
          > -- Ron
          >
          > ------------------------ Yahoo! Groups Sponsor
          > ---------------------~-->
          > Tied to your PC? Cut Loose and
          > Stay connected with Yahoo! Mobile
          > http://us.click.yahoo.com/QBCcSD/o1CEAA/sXBHAA/2U_rlB/TM
          > --------------------------------------------------------------
          > -------~->
          >
          > To post a message, send it to: xml-dbms@yahoogroups.com
          > To unsubscribe, send a blank message to:
          > xml-dbms-unsubscribe@yahoogroups.com
          > Or join the newsgroup at:
          > news://news.barkto.com/homeless.xml.xml-dbms
          >
          > Your use of Yahoo! Groups is subject to
          > http://docs.yahoo.com/info/terms/
          >
          >


          [Non-text portions of this message have been removed]
        Your message has been successfully submitted and would be delivered to recipients shortly.