Re: Could you send the examples of JSON staructures that can be POSTed to the JSON script goose service

5 views
Skip to first unread message

Dan Tenenbaum

unread,
Aug 11, 2009, 5:20:07 PM8/11/09
to Vladimir Morozov, gaggle-...@googlegroups.com
Hi Vlad,

You can use the command line client to POST to the json/script goose. That is probably the easiest way. 
It can be done from within another program.
It's described on the wiki page:

If you want to create the POST requests yourself, it's a little trickier. The format of requests is described on the JSON-RPC specification page:

Some examples:
If you want to get the latest broadcast sent to the script goose, POST the following JSON to http://localhost:9010/JSON-RPC
{"method":"goose.getLatestBroadcast","params":[],"id":1}

To send a namelist, POST this:
{"method":"goose.broadcastNamelist","params":["Boss",{"names":["a","b","c"],"name":"from script goose","species":"Homo sapiens"}],"id":1}

To see the list of active geese (including the JsonGoose you are currently using), POST this:
{"method":"goose.getGooseNames","params":[],"id":1}

To see the list of methods you can call, POST this:
{"method":"system.listMethods","params":[],"id":1}

Basically, you can get all this information by uncommenting line 120 of client.rb.

Hope this helps
Dan



On Tue, Aug 11, 2009 at 1:40 PM, Vladimir Morozov <vmor...@als.net> wrote:
Dan,
 
Thanks for the examples of responces. I probably am more intrested in format of POST requests. For eaxample , what format of JSON request to get  broadcast or broadcst a list to Boss(oe specific gaggle)?
 
You can respont to Google gaggle-disuss fourm if you consider it apropriate
 
Thanks
Vlad

 

From: Dan Tenenbaum [mailto:dtene...@systemsbiology.org]
Sent: Monday, August 10, 2009 3:45 PM
To: Vladimir Morozov
Subject: Re: Could you send the examples of JSON staructures that can be POSTed to the JSON script goose service

Hi Vlad,

I added a --showjson option to the client.rb script which will print out the raw JSON received from Gaggle, so you can see for yourself. Here is what it generates (from the Sample Goose) :

Namelist:
{
   "gaggleData":{
      "name":null,
      "metadata":null,
      "javaClass":"org.systemsbiology.gaggle.core.datatypes.Namelist",
      "names":[
         "YFL036W",
         "YFL037W",
         "YLR212C",
         "YLR213C",
         "YML085C",
         "YML086C",
         "YML123C",
         "YML124C"
      ],
      "species":"Saccharomyces cerevisiae"
   },
   "javaClass":"org.systemsbiology.gaggle.geese.jsongoose.BroadcastObject",
   "source":"Sample"
}

Matrix:

{
   "gaggleData":{
      "shortName":"Demo Yeast",
      "name":"a sample matrix",
      "uri":"",
      "rowTitles":[
         "YFL036W",
         "YFL037W",
         "YLR212C",
         "YLR213C",
         "YML085C",
         "YML086C",
         "YML123C",
         "YML124C"
      ],
      "metadata":null,
      "fullName":"Demo Yeast created on the fly, meaningless data",
      "javaClass":"org.systemsbiology.gaggle.geese.jsongoose.JsonSerializableDataMatrix",
      "dataTypeBriefName":"",
      "rowTitlesTitle":"GENE",
      "fileExtension":"",
      "columnTitles":[
         "T000",
         "T060",
         "T120",
         "T240"
      ],
      "data":[
         [
            0,
            0.09,
            0.18,
            0.27
         ],
         [
            0.38,
            0.47,
            0.56,
            0.65
         ],
         [
            0.76,
            0.85,
            0.94,
            1.03
         ],
         [
            1.14,
            1.23,
            1.32,
            1.41
         ],
         [
            1.52,
            1.61,
            1.7,
            1.79
         ],
         [
            1.9,
            1.99,
            2.08,
            2.17
         ],
         [
            2.28,
            2.37,
            2.46,
            2.55
         ],
         [
            2.66,
            2.75,
            2.84,
            2.93
         ]
      ],
      "species":"Saccharomyces cerevisiae"
   },
   "javaClass":"org.systemsbiology.gaggle.geese.jsongoose.BroadcastObject",
   "source":"Sample"
}

Network:

{
   "gaggleData":{
      "name":"a sample network",
      "nodeAttributes":{
         "javaClass":"java.util.HashMap",
         "map":{
            "moleculeType":{
               "javaClass":"java.util.HashMap",
               "map":{
                  "YML086C":"DNA",
                  "YML085C":"DNA",
                  "YFL037W":"DNA",
                  "YLR213C":"DNA",
                  "YFL036W":"DNA",
                  "YLR212C":"DNA",
                  "YML124C":"DNA",
                  "YML123C":"DNA"
               }
            },
            "species":{
               "javaClass":"java.util.HashMap",
               "map":{
                  "YML086C":"Saccharomyces cerevisiae",
                  "YML085C":"Saccharomyces cerevisiae",
                  "YFL037W":"Saccharomyces cerevisiae",
                  "YLR213C":"Saccharomyces cerevisiae",
                  "YFL036W":"Saccharomyces cerevisiae",
                  "YLR212C":"Saccharomyces cerevisiae",
                  "YML124C":"Saccharomyces cerevisiae",
                  "YML123C":"Saccharomyces cerevisiae"
               }
            }
         }
      },
      "metadata":null,
      "javaClass":"org.systemsbiology.gaggle.geese.jsongoose.JsonSerializableNetwork",
      "interactionList":{
         "list":[
            {
               "javaClass":"org.systemsbiology.gaggle.geese.jsongoose.JsonSerializableInteraction",
               "interactionType":"GeneCluster",
               "directed":false,
               "source":"YFL036W",
               "target":"YFL037W"
            },
            {
               "javaClass":"org.systemsbiology.gaggle.geese.jsongoose.JsonSerializableInteraction",
               "interactionType":"GeneFusion",
               "directed":false,
               "source":"YFL037W",
               "target":"YLR212C"
            },
            {
               "javaClass":"org.systemsbiology.gaggle.geese.jsongoose.JsonSerializableInteraction",
               "interactionType":"GeneFusion",
               "directed":false,
               "source":"YFL037W",
               "target":"YML085C"
            },
            {
               "javaClass":"org.systemsbiology.gaggle.geese.jsongoose.JsonSerializableInteraction",
               "interactionType":"GeneFusion",
               "directed":false,
               "source":"YFL037W",
               "target":"YML124C"
            },
            {
               "javaClass":"org.systemsbiology.gaggle.geese.jsongoose.JsonSerializableInteraction",
               "interactionType":"GeneCluster",
               "directed":false,
               "source":"YLR212C",
               "target":"YLR213C"
            },
            {
               "javaClass":"org.systemsbiology.gaggle.geese.jsongoose.JsonSerializableInteraction",
               "interactionType":"GeneFusion",
               "directed":false,
               "source":"YLR212C",
               "target":"YML085C"
            },
            {
               "javaClass":"org.systemsbiology.gaggle.geese.jsongoose.JsonSerializableInteraction",
               "interactionType":"GeneFusion",
               "directed":false,
               "source":"YLR212C",
               "target":"YML124C"
            },
            {
               "javaClass":"org.systemsbiology.gaggle.geese.jsongoose.JsonSerializableInteraction",
               "interactionType":"GeneCluster",
               "directed":false,
               "source":"YML123C",
               "target":"YML124C"
            },
            {
               "javaClass":"org.systemsbiology.gaggle.geese.jsongoose.JsonSerializableInteraction",
               "interactionType":"GeneCluster",
               "directed":false,
               "source":"YML085C",
               "target":"YML086C"
            },
            {
               "javaClass":"org.systemsbiology.gaggle.geese.jsongoose.JsonSerializableInteraction",
               "interactionType":"GeneFusion",
               "directed":false,
               "source":"YML085C",
               "target":"YML124C"
            }
         ],
         "javaClass":"java.util.ArrayList"
      },
      "edgeAttributes":{
         "javaClass":"java.util.HashMap",
         "map":{
            "score":{
               "javaClass":"java.util.HashMap",
               "map":{
                  "YLR212C (GeneFusion) YML085C":0.8,
                  "YML123C (GeneCluster) YML124C":0.55,
                  "YML085C (GeneCluster) YML086C":0.45,
                  "YML085C (GeneFusion) YML124C":0.35,
                  "YFL037W (GeneFusion) YML085C":0.3,
                  "YLR212C (GeneCluster) YLR213C":0.1,
                  "YLR212C (GeneFusion) YML124C":0.75,
                  "YFL036W (GeneCluster) YFL037W":0.5,
                  "YFL037W (GeneFusion) YML124C":0.2,
                  "YFL037W (GeneFusion) YLR212C":0.4
               }
            }
         }
      },
      "nodes":{
         "set":{
            "YML086C":"YML086C",
            "YML085C":"YML085C",
            "YFL037W":"YFL037W",
            "YLR213C":"YLR213C",
            "YFL036W":"YFL036W",
            "YLR212C":"YLR212C",
            "YML124C":"YML124C",
            "YML123C":"YML123C"
         },
         "javaClass":"java.util.HashSet"
      },
      "species":"Saccharomyces cerevisiae"
   },
   "javaClass":"org.systemsbiology.gaggle.geese.jsongoose.BroadcastObject",
   "source":"Sample"
}

Cluster:
{
   "gaggleData":{
      "name":"Sample Cluster",
      "rowNames":[
         "YFL036W",
         "YLR212C",
         "YML085C",
         "YML123C"
      ],
      "metadata":null,
      "javaClass":"org.systemsbiology.gaggle.core.datatypes.Cluster",
      "columnNames":[
         "T000",
         "T120",
         "T240"
      ],
      "species":"Saccharomyces cerevisiae"
   },
   "javaClass":"org.systemsbiology.gaggle.geese.jsongoose.BroadcastObject",
   "source":"Sample"
}

Tuple:

{
   "gaggleData":{
      "name":"a tuple list holding a frame of a movie",
      "metadata":{
         "name":null,
         "javaClass":"org.systemsbiology.gaggle.core.datatypes.Tuple",
         "singleList":{
            "list":[
               {
                  "name":"condition",
                  "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                  "value":"a condition name"
               }
            ],
            "javaClass":"java.util.ArrayList"
         }
      },
      "javaClass":"org.systemsbiology.gaggle.core.datatypes.GaggleTuple",
      "data":{
         "name":null,
         "javaClass":"org.systemsbiology.gaggle.core.datatypes.Tuple",
         "singleList":{
            "list":[
               {
                  "name":null,
                  "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                  "value":{
                     "name":null,
                     "javaClass":"org.systemsbiology.gaggle.core.datatypes.Tuple",
                     "singleList":{
                        "list":[
                           {
                              "name":null,
                              "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                              "value":"YFL036W"
                           },
                           {
                              "name":null,
                              "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                              "value":"log10 ratios"
                           },
                           {
                              "name":null,
                              "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                              "value":0.1
                           }
                        ],
                        "javaClass":"java.util.ArrayList"
                     }
                  }
               },
               {
                  "name":null,
                  "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                  "value":{
                     "name":null,
                     "javaClass":"org.systemsbiology.gaggle.core.datatypes.Tuple",
                     "singleList":{
                        "list":[
                           {
                              "name":null,
                              "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                              "value":"YFL037W"
                           },
                           {
                              "name":null,
                              "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                              "value":"log10 ratios"
                           },
                           {
                              "name":null,
                              "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                              "value":0.2
                           }
                        ],
                        "javaClass":"java.util.ArrayList"
                     }
                  }
               },
               {
                  "name":null,
                  "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                  "value":{
                     "name":null,
                     "javaClass":"org.systemsbiology.gaggle.core.datatypes.Tuple",
                     "singleList":{
                        "list":[
                           {
                              "name":null,
                              "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                              "value":"YLR212C"
                           },
                           {
                              "name":null,
                              "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                              "value":"log10 ratios"
                           },
                           {
                              "name":null,
                              "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                              "value":0.3
                           }
                        ],
                        "javaClass":"java.util.ArrayList"
                     }
                  }
               },
               {
                  "name":null,
                  "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                  "value":{
                     "name":null,
                     "javaClass":"org.systemsbiology.gaggle.core.datatypes.Tuple",
                     "singleList":{
                        "list":[
                           {
                              "name":null,
                              "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                              "value":"YLR213C"
                           },
                           {
                              "name":null,
                              "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                              "value":"log10 ratios"
                           },
                           {
                              "name":null,
                              "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                              "value":0.4
                           }
                        ],
                        "javaClass":"java.util.ArrayList"
                     }
                  }
               },
               {
                  "name":null,
                  "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                  "value":{
                     "name":null,
                     "javaClass":"org.systemsbiology.gaggle.core.datatypes.Tuple",
                     "singleList":{
                        "list":[
                           {
                              "name":null,
                              "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                              "value":"YML085C"
                           },
                           {
                              "name":null,
                              "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                              "value":"log10 ratios"
                           },
                           {
                              "name":null,
                              "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                              "value":0.5
                           }
                        ],
                        "javaClass":"java.util.ArrayList"
                     }
                  }
               },
               {
                  "name":null,
                  "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                  "value":{
                     "name":null,
                     "javaClass":"org.systemsbiology.gaggle.core.datatypes.Tuple",
                     "singleList":{
                        "list":[
                           {
                              "name":null,
                              "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                              "value":"YML086C"
                           },
                           {
                              "name":null,
                              "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                              "value":"log10 ratios"
                           },
                           {
                              "name":null,
                              "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                              "value":0.6
                           }
                        ],
                        "javaClass":"java.util.ArrayList"
                     }
                  }
               },
               {
                  "name":null,
                  "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                  "value":{
                     "name":null,
                     "javaClass":"org.systemsbiology.gaggle.core.datatypes.Tuple",
                     "singleList":{
                        "list":[
                           {
                              "name":null,
                              "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                              "value":"YML123C"
                           },
                           {
                              "name":null,
                              "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                              "value":"log10 ratios"
                           },
                           {
                              "name":null,
                              "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                              "value":0.7
                           }
                        ],
                        "javaClass":"java.util.ArrayList"
                     }
                  }
               },
               {
                  "name":null,
                  "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                  "value":{
                     "name":null,
                     "javaClass":"org.systemsbiology.gaggle.core.datatypes.Tuple",
                     "singleList":{
                        "list":[
                           {
                              "name":null,
                              "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                              "value":"YML124C"
                           },
                           {
                              "name":null,
                              "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                              "value":"log10 ratios"
                           },
                           {
                              "name":null,
                              "javaClass":"org.systemsbiology.gaggle.core.datatypes.Single",
                              "value":0.8
                           }
                        ],
                        "javaClass":"java.util.ArrayList"
                     }
                  }
               }
            ],
            "javaClass":"java.util.ArrayList"
         }
      },
      "species":"escargot"
   },
   "javaClass":"org.systemsbiology.gaggle.geese.jsongoose.BroadcastObject",
   "source":"Sample"
}

Hope that helps.
Dan


On Mon, Aug 10, 2009 at 10:19 AM, Vladimir Morozov <vmor...@als.net> wrote:
Hi Dan,

Could you send the examples of JSON staructures that can be POSTed to the JSON script goose service (http://localhost:9010/JSON-RPC ). Probably matrix broadcasting and "getboeadcast" examples would be suficient.

Thanks
Vlad


Vladimir Morozov
Sr. Computational Biologist
ALS Therapy Development Institute
215 First Street, Cambridge MA, 02142
Phone: 617-441-7242

Create a Future Without ALS:  Join the ALS Ambassador Program Today.  - www.als.net/ambassador




***************************************************************************************
The information contained in this electronic message is confidential and may be privileged under applicable law, and is intended only for the individual or entity named above.  Any dissemination, distribution, disclosure or copying of this electronic message and/or the information contained in this electronic message is strictly prohibited.  If the recipient of this message is not the above-named intended recipient, you are hereby notified that any dissemination, distribution, disclosure or copy of this communication is strictly prohibited.  If you have received this communication in error, please notify ALS Therapy Development Foundation, Inc. at (617) 441-7200 and purge the communication immediately without making any copy or distribution. The content of this message is not medical advice, diagnosis or treatment and is not intended to be a substitute for professional medical advice, diagnosis or treatment.  Always seek the advice of your physician or other qualified health provider with any questions you may have regarding a medical condition.  Never disregard professional medical advice or delay in seeking it because of something you have read in or in connection with this electronic message



***************************************************************************************
The information contained in this electronic message is confidential and may be privileged under applicable law, and is intended only for the individual or entity named above. Any dissemination, distribution, disclosure or copying of this electronic message and/or the information contained in this electronic message is strictly prohibited. If the recipient of this message is not the above-named intended recipient, you are hereby notified that any dissemination, distribution, disclosure or copy of this communication is strictly prohibited. If you have received this communication in error, please notify ALS Therapy Development Foundation, Inc. at (617) 441-7200 and purge the communication immediately without making any copy or distribution. The content of this message is not medical advice, diagnosis or treatment and is not intended to be a substitute for professional medical advice, diagnosis or treatment. Always seek the advice of your physician or other qualified health provider with any questions you may have regarding a medical condition. Never disregard professional medical advice or delay in seeking it because of something you have read in or in connection with this electronic message

Vladimir

unread,
Aug 12, 2009, 1:23:42 PM8/12/09
to gaggle-discuss
{"method":"goose.getLatestBroadcast","params":[],"id":1}
hangs from my vbscript or the sample Ruby script
> bin/ruby V:/project/Rinterface/client.rb --getbroadcast
c:/Program Files/ruby/lib/ruby/1.9.1/net/protocol.rb:135:in `sysread':
execution expired (Timeout::Error)
from c:/Program Files/ruby/lib/ruby/1.9.1/net/protocol.rb:
135:in `block in rbuf_fill'
from c:/Program Files/ruby/lib/ruby/1.9.1/net/protocol.rb:
134:in `rbuf_fill'
from c:/Program Files/ruby/lib/ruby/1.9.1/net/protocol.rb:
116:in `readuntil'
from c:/Program Files/ruby/lib/ruby/1.9.1/net/protocol.rb:
126:in `readline'
from c:/Program Files/ruby/lib/ruby/1.9.1/net/http.rb:2135:in
`read_status_line'
from c:/Program Files/ruby/lib/ruby/1.9.1/net/http.rb:2124:in
`read_new'
from c:/Program Files/ruby/lib/ruby/1.9.1/net/http.rb:1117:in
`transport_request'
from c:/Program Files/ruby/lib/ruby/1.9.1/net/http.rb:1103:in
`request'
from c:/Program Files/ruby/lib/ruby/1.9.1/net/http.rb:904:in
`post'
from V:/project/Rinterface/client.rb:33:in `block in
post_request'
from c:/Program Files/ruby/lib/ruby/1.9.1/net/http.rb:564:in
`start'
from c:/Program Files/ruby/lib/ruby/1.9.1/net/http.rb:453:in
`start'
from V:/project/Rinterface/client.rb:32:in `post_request'
from V:/project/Rinterface/client.rb:121:in `call_rmi_method'
from V:/project/Rinterface/client.rb:108:in
`call_goose_method'
from V:/project/Rinterface/client.rb:215:in `get_broadcast'
from V:/project/Rinterface/client.rb:369:in
`<class:JsonGooseClient>'
from V:/project/Rinterface/client.rb:3:in `<main>'


These
{"method":"system.listMethods","params":[],"id":1}
{"method":"goose.getGooseNames","params":[],"id":1}
work fine

I can get the last broadcast in R at same time. so Boss seems to be
fine

On Aug 11, 5:20 pm, Dan Tenenbaum <dtenenb...@systemsbiology.org>
wrote:
> Hi Vlad,
> You can use the command line client to POST to the json/script goose. That
> is probably the easiest way.
> It can be done from within another program.
> It's described on the wiki page:http://gaggle.systemsbiology.net/wiki/doku.php?id=json_script_goose
>
> If you want to create the POST requests yourself, it's a little trickier.
> The format of requests is described on the JSON-RPC specification page:http://json-rpc.org/wiki/specification
>
> Some examples:
> If you want to get the latest broadcast sent to the script goose, POST the
> following JSON tohttp://localhost:9010/JSON-RPC
> {"method":"goose.getLatestBroadcast","params":[],"id":1}
>
> To send a namelist, POST this:
> {"method":"goose.broadcastNamelist","params":["Boss",{"names":["a","b","c"],"name":"from
> script goose","species":"Homo sapiens"}],"id":1}
>
> To see the list of active geese (including the JsonGoose you are currently
> using), POST this:
> {"method":"goose.getGooseNames","params":[],"id":1}
>
> To see the list of methods you can call, POST this:
> {"method":"system.listMethods","params":[],"id":1}
>
> Basically, you can get all this information by uncommenting line 120 of
> client.rb.
>
> Hope this helps
> Dan
>
> On Tue, Aug 11, 2009 at 1:40 PM, Vladimir Morozov <vmoro...@als.net> wrote:
> >  Dan,
>
> > Thanks for the examples of responces. I probably am more intrested in
> > format of POST requests. For eaxample , what format of JSON request to get
> > broadcast or broadcst a list to Boss(oe specific gaggle)?
>
> > You can respont to Google gaggle-disuss fourm if you consider it apropriate
>
> > Thanks
> > Vlad
>
> >  ------------------------------
> > *From:* Dan Tenenbaum [mailto:dtenenb...@systemsbiology.org]
> > *Sent:* Monday, August 10, 2009 3:45 PM
> > *To:* Vladimir Morozov
> > *Subject:* Re: Could you send the examples of JSON staructures that can be
> > On Mon, Aug 10, 2009 at 10:19 AM, Vladimir Morozov <vmoro...@als.net>wrote:
>
> >> Hi Dan,
>
> >> Could you send the examples of JSON staructures that can be POSTed to the
> >> JSON script goose service (http://localhost:9010/JSON-RPC). Probably

Dan Tenenbaum

unread,
Aug 12, 2009, 1:57:30 PM8/12/09
to gaggle-...@googlegroups.com
Hi Vlad,

The JsonGoose uses JAbsorb (java implementation of JSON-RPC). 
This is a third-party library that allows you to call methods on java classes over an HTTP connection.

When you call --getbroadcast, the java code responds immediately with the last broadcast received by the JSON goose. If the json goose has not received a broadcast, the java code just waits, and waits until it does receive a broadcast. It is happy to wait forever, but HTTP is not happy to wait forever; either the client or the server (I'm not sure which it is in your case) will time out.

There are probably better ways to handle this situation. Such as using continuations to just hold on to the user request until there is a response to send back. Some form of server push would be nice, but there are issues with all of these. In any case, I'm just relying on JAbsorb to do all the heavy lifting, and not doing anything special to prevent timeouts.

One sort of lame workaround for this issue is to wait until after you've sent the broadcast before you start the ruby client. There won't be any delay (or timeout) in this case.

What are you attempting to do?

We are looking at re-architecting the Gaggle back end to enable, among other things, communication between geese that does not require Java/RMI--JSON will probably be the way that such language-independent geese speak to each other. Let us know what your'e trying to do and maybe we can help.

Thanks
Dan

Vladimir

unread,
Aug 13, 2009, 10:46:13 AM8/13/09
to gaggle-discuss
Dan,,
Thanks. Your explanations helped. I try to enable Qlikvew to send and
receive lists and matrix from gaggle. qlikview has embedded VBscript
engine. VBscipt doesn't have a JSON parser. So I am not particularly
happy with JSON-gaggle. But it is OK for now as prove of principal and
to see if I/users can benefit from communications with the gooses


Best
Vlad

On Aug 12, 1:57 pm, Dan Tenenbaum <dtenenb...@systemsbiology.org>
wrote:
> Hi Vlad,
> The JsonGoose uses JAbsorb (java implementation of JSON-RPC).http://jabsorb.org/
> This is a third-party library that allows you to call methods on java
> classes over an HTTP connection.
>
> When you call --getbroadcast, the java code responds immediately with the
> last broadcast received by the JSON goose. If the json goose has not
> received a broadcast, the java code just waits, and waits until it does
> receive a broadcast. It is happy to wait forever, but HTTP is not happy to
> wait forever; either the client or the server (I'm not sure which it is in
> your case) will time out.
>
> There are probably better ways to handle this situation. Such as using
> continuations to just hold on to the user request until there is a response
> to send back. Some form of server push would be nice, but there are issues
> with all of these. In any case, I'm just relying on JAbsorb to do all the
> heavy lifting, and not doing anything special to prevent timeouts.
>
> One sort of lame workaround for this issue is to wait until after you've
> sent the broadcast before you start the ruby client. There won't be any
> delay (or timeout) in this case.
>
> What are you attempting to do?
>
> We are looking at re-architecting the Gaggle back end to enable, among other
> things, communication between geese that does not require Java/RMI--JSON
> will probably be the way that such language-independent geese speak to each
> other. Let us know what your'e trying to do and maybe we can help.
>
> Thanks
> Dan
>
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages