You can subscribe to this list here.
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2011 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
(1) |
Nov
(3) |
Dec
(3) |
2012 |
Jan
(13) |
Feb
(2) |
Mar
(2) |
Apr
(17) |
May
(12) |
Jun
|
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(9) |
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Osman H. <osm...@ya...> - 2014-06-03 17:33:02
|
Hi, I have a university project for real time tracking locations of assets and people. I am asked to show locations on a floor plan. I have figured out how to do the showing part with openlayers. What I am wondering is if I can use GRAILS for the aggregation of the location of wifi devices in the range of access points. We have several access points on the floor. I need the location of a wifi device using these access points. Wifi devices can be Active RFIDs or Mobile phones. How can I use grails in this project? Thank you very much for your answer |
From: Robert M. <ro...@cs...> - 2012-12-11 16:39:12
|
Hi Oleg, I've updated the java-examples GitHub repository to include a new "RSSIWatcher" application. It should output the data from the fingerprint solver to the command line. git pull origin master mvn clean package java -cp target/java-examples-1.0.0-SNAPSHOT-jar-with-dependencies.jar com.owlplatform.example.worldmodel.RSSIWatcher localhost 7010 You may also wish to modify the parameters of the fingerprint solver. We currently use "1000 6000" as the time_window window_size (respectively). This gives us a reasonable average of RSSI data for devices that transmit at least once every 2 seconds. --Rob On 12/11/2012 10:56 AM, Robert Moore wrote: > Hi Oleg, > > There isn't currently a command-line tool to view that type of data > from the world model (on-demand attributes). Give me some time to write > one in the java-examples and I will update GitHub, then email you about it. > > Could you also type the following in cli-wm-browser and let me know the > output? > status .* > > That should show all of the current values in the world model (which > should not be much). > > The GWT code (as far as I know) relies on Google's GWT compiler. I > wrote it as a simple demonstration/test of the REST/web interface for > the World Model, and always compile using Eclipse with Google's > instructions. I don't know of a way to compile just using ant/java at > the command line, but I haven't tried yet. > > --Rob > > On 12/11/2012 03:26 AM, Олег Любимов wrote: >> Hi Robert >> I can't load data I have tested the FakeSensor and the Aggregator using >> a tool https://github.com/OwlPlatform/java-examples which you gave me. >> FakeSensor and Aggregator work OK (the tool show me output on the screen >> which contents numbers of transmitters and its RSSI value = -50 dB). >> Then I download and build >> signal-strength-solvers<https://github.com/OwlPlatform/signal-strength-solvers>andworld-model<https://github.com/OwlPlatform/world-model>from >> Owl Platform project webpage on the Github. I run components of the >> location system on the following steps >> >> 1) Aggregator (with default parameters) >> 2) FakeSensor localhost 7007 -D 500 N 2 - Aggregator successfully connects >> to It >> 3) sqlite3-worl-model (OwlPlatform) localhost 7009 localhost 7010 >> 4) fingerprint_solver (OwlPlatform) localhost 7008 localhost 7009 1000 1500 >> (Did I use valid values of time and window size for the fingerprint_solver?) >> The solver successfully connects to the World_Model and to the Aggregator >> and the World Model begins receive messages from the Solver. >> World Model Output: >> >>> Trying to get available packet >>> Message id is 4 >>> Received a solver data message. >> >> 5) Then I run the cli_wm_browse with the commands, which you wrote in the >> previous email >> 6) run the SigVis, it sucessfully connects to the World Model, but the show >> message "No data received from World Model in N seconds" >> The World Model at the same time prints to the screen following: >> ... >>> Trying to get available packet >>> Message id is 4 >>> Received a solver data message. >>> Inserting 1 transient entries for standing query. >>> Inserting 1 transient entries for standing query. >> ... >> I realized, that the Wold Model sends data to the standing query and SigVis >> should take the data from this query, but It does not take the data. Is it >> right? Are there any tools to see the query content? >> >> Also I download the gwt-Plunder, but I did't found gwt-plunder.xml file on >> the project directory(it contains only /src , /war and git files). So I >> can't build this project using the command "ant build" and I can't import >> this project to the Eclypse. >> May be you forget to add this file to git before you push the project to >> the Github? Or there is another way to build gwt applications without .xml >> project file? >> >> Do transmitters on a real Wi-Fi network require any software to communicate >> with the GRAIL/Owl sensors? >> >> Thank you for your answers. I have found the GRAIL project on google, when >> seach open source real time location systems. I am looking for a decision >> to locate smartphones on Wi-Fi network, with ability to get data from this >> smartphones. >> >> P.S Some years ago, when I was a student, we did the same project - it was >> real time location system based on wireless sensor networks. Our system >> also based on RSSI method, but PHY layer was very simple(low cost) and the >> carrier frequency was chosen unsuccessfully (434 MHz). So we get bad >> results (big location error),especially in the indoor space, and this >> project dead. But you and other GRAIL developers have done this and it's >> great. I take off my hat :) >> >> >> 2012/12/7 Robert Moore <ro...@cs...> >> >>> Hi Oleg, >>> >>> If you are seeing the Receiver in the list, then that's great >>> news. To >>> see the transmitters, you will need to have the "fingerprint solver" >>> running, which generates RSSI statistics for the world model. I see in >>> your other email you are having trouble compiling these solvers (likely >>> due to the g++ version). I will ask Ben (the C++ guru) to respond to >>> your other email and suggest a solution. >>> >>> Once you have the solver running, it should work like this: >>> >>> FakeSensor -> Aggregator -> Fingerprint Solver -> World Model -> SigVis >>> >>> It can seem very complex for just this basic example, but it makes >>> larger deployments much easier for us. We are also working on an >>> "easier" version of both the software API and the tools, Owl Platform. >>> >>> I will try to answer some of your other questions. >>> 1) "No data in SigVis" - A few things are possible, the simplest is >>> that no data is arriving at the World Model. You can check if data >>> is coming from the FakeSensor to solvers using this example solver: >>> a. Download <https://github.com/OwlPlatform/java-examples> >>> b. mvn clean package >>> c. ./txcheck localhost >>> If you don't see any data arriving (output to the screen), then >>> probably the FakeSensor is not sending data correctly. If it is, >>> then you should check that the "Fingerprint Solver" is working. If >>> not, then no data will arrive for SigVis. As before, I will have >>> Ben reply to your problems compiling the solvers on Ubuntu 10.10. >>> 2) I believe the Flash Client is out of date for the networking >>> protocols. It was written as one of our earliest web-based GUIs, >>> but has pretty much been replaced with a Google Web Toolkit-based >>> version at <https://github.com/romoore/gwt-plunder>. I will >>> double-check with Ben, but I think that the Flash app is probably >>> obsolete. >>> 3) "Origin ID" is used to identify the source of data in the World >>> Model. Currently it is simply a string that we use to keep track >>> of who (or what) is adding data to the World Model. Examples might >>> be "Rob" or "stryke3" for myself, "Super-Solver 2.1" for some >>> software, or "WM@192.168.1.1:6667" for a remote World Model that is >>> sharing data. Eventually we would like to support RSA signed keys, >>> but since we are still in the research/startup phase we have >>> postponed that portion for the present. >>> 4) The fingerprint solver produces aggregated statistics for devices >>> across all receivers. This currently is limited to average >>> (arithmetic mean) RSSI value and RSSI variance. The parameter "time" >>> is how often it should send these values to the World Model, and >>> "window" is how large the sliding-window used to compute the values >>> should be. Both values are in milliseconds. >>> >>> The localization solver is not actually possible to run with only a fake >>> sensor or two. It uses Bayesian inference to estimate the position of >>> devices based on the RSSI values from multiple (typically 4 or more) >>> receivers place around a physical space. You could probably perform >>> localization with a saved data trace, for example if you wanted to >>> evaluate algorithmic accuracy. >>> >>> Thanks for your interest in our work, and please let me know if you have >>> more questions (I'm sure you will). Out of curiosity, how did you find >>> out about GRAIL? Most of our users are researchers working with us on >>> sensor networks, so we're very excited that real people are interested >>> in it. :) >>> >>> Regards, >>> Rob >>> >>> Owl Platform Home >>> http://www.owlplatform.com/ >>> >>> GitHub (Source) >>> https://github.com/OwlPlatform/ >>> https://github.com/romoore (Rob's projects) >>> https://github.com/bfirner (Ben's projects) >>> >>> On 12/07/2012 04:30 AM, Олег Любимов wrote: >>>> Hello Robert >>>> >>>> Thanks a lot for your answer. I downloaded, built and run the "sigvis" >>> and >>>> the "cli-wm-browse" how you write me in the email (the FakeSensor, >>>> Aggregator, solver and world_model were run the same method as I >>> described >>>> in my first email). The SigVis successfully connects to the world model, >>>> but then it show message "No data received from World Model in ... >>> seconds" >>>> (see attached file "Fig3_no_data_received"). The settings for connection >>>> SigVis to the *World Model was: World Model Host : 127.0.0.1 , World >>> Model >>>> Port: 7011*(model client port), *Region: myregion* ( I entered the region >>>> name from cli-wm-browse commands). There are not transmitters in >>>> "Transmitter" tab of SigVis GUI, but there is one receiver of the >>>> "Receivers" tab. >>>> >>>> The SigVis connection log: >>>> >>>> [2012-12-07 12:21:32,840] INFO main/SimpleFrame - Rebuilding transmitter >>>> menus >>>> [2012-12-07 12:22:53,690] INFO AWT-EventQueue-0/DataCache2 - All sample >>>> data cleared from cache. >>>> [2012-12-07 12:22:53,691] INFO AWT-EventQueue-0/DataCache2 - Region info >>>> and device locations cleared from cache. >>>> [2012-12-07 12:22:53,692] INFO AWT-EventQueue-0/ConnectionHandler - >>>> Connecting to World Model (C) @ 127.0.0.1:7011 >>>> [2012-12-07 12:22:53,757] INFO AWT-EventQueue-0/ConnectionHandler - >>>> Connected to World Model (C) @ 127.0.0.1:7011 >>>> [2012-12-07 12:22:53,764] INFO Thread-5/ConnectionHandler - Starting >>>> request threads. >>>> [2012-12-07 12:22:53,785] INFO Thread-5/ConnectionHandler - Retrieving >>>> anchor locations. >>>> [2012-12-07 12:22:53,832] INFO Thread-5/ConnectionHandler - Loaded >>> anchors. >>>> [2012-12-07 12:22:53,832] INFO Thread-6/ConnectionHandler - Requesting >>>> average RSSI values. >>>> [2012-12-07 12:22:53,833] INFO Thread-5/ConnectionHandler - Request >>>> threads started. >>>> [2012-12-07 12:22:53,833] INFO Thread-7/ConnectionHandler - Requesting >>>> RSSI variance values. >>>> >>>> The model connection log is shown in the attached file >>>> "Fig2_model_sigvis_log" >>>> >>>> 1) Why the SigVis can not get data from the model? >>>> >>>> Another my problem - I can't connect the flash client to the World Model. >>>> I build and run client with accordingly the Developer Setup Guide. I >>> enter >>>> to the client fields following data: >>>> *IP Address: 127.0.0.1, Solver Port: 7009, Client Port: 7011, Origin ID: >>>> testuser *. Then I press "Submit", but the client can not connect to the >>>> model (error log is showed in the attached file >>>> "Fig4_client_connect_error"). >>>> 2) What may be the reason of this problem? >>>> 3) What *does **Origin ID* mean? >>>> 4) What do mean the parameters <time> and <window_size> of >>>> ./fingerprint_solver command? >>>> >>>> Best regards >>>> Oleg Lyubimov >>>> PS: Sorry for my bad English :) >>>> >>>> >>>> Forwarded conversation >>>> Subject: Simulation on GRAIL RTLS >>>> ------------------------ >>>> >>>> From: *Олег Любимов* <lyu...@gm...> >>>> Date: 2012/12/6 >>>> To: gra...@li... >>>> >>>> >>>> Dear GRAIL Developers. >>>> >>>> Could you help me with my problem? I am trying to run GRAIL rtls using >>> the >>>> FakeSensor. I successfully run FakeSensor, Aggregator, >>> fingerprint_solver, >>>> World Model and GUI simulation-tools, but I can't see any data in the >>>> simulation-tools GUI. There is a list of sensors on "Transmitters" tab of >>>> GUI only(in Hex view). Other tabs of the GUI has no any information. All >>>> components were compiled and run according to the "Developer Setup >>> Guide". >>>> >>>> Steps to run >>>> 1) Fake sensor >>>> java -cp simulation-tools-3.0.4-SNAPSHOT-jath-dependencies.jar >>>> org.grailrtls.sim.FakeSensor localhost 7007 -D 700 -N 6 >>>> >>>> 2) Aggregator >>>> java -jar aggregator-3.0.4-SNAPSHOT-jar-with-dependencies.jar >>>> >>>> 3) fingerprint solver >>>> ./fingerprint_solver localhost 7008 localhost 7009 1000 2000 >>>> >>>> 4) world_model >>>> ./world_model_server 7009 7011 >>>> >>>> 5) simulation-tools >>>> java -jar simulation-tools-3.0.4-SNAPSHOT-jar-with-dependencies.jar >>>> localhost 7008 localhost 7011 >>>> >>>> What I should do to run the simulation sucessfully and see data of >>>> FakeSensors on GUI? >>>> >>>> How to use different solvers: first I should run fingerprint_solver, and >>>> then any other solver (e.g. localization_solver2) and connect it to world >>>> model socket? How I can get data from the "localization_solver2"? (I use >>>> only C++ solvers) >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> ---------- >>>> From: *Robert Moore* <ro...@cs...> >>>> Date: 2012/12/6 >>>> To: gra...@li... >>>> >>>> >>>> Hi Олег, >>>> >>>> Sounds like you're most of the way there. You just have a few >>> more >>>> steps and you should get the data you want. >>>> >>>> 1. The fake sensor was written primarily to load-test the aggregator >>>> and to see if things are working end-to-end. You can use it to test >>>> the GUI, but it will probably need a little tweaking (like >>>> hard-coding the receiver). >>>> >>>> 2. There used to be low-level (RSSI-focused) GUI in the >>>> simulation-tools directory, but it has been split into its own >>>> project. You can get a copy from GitHub: >>>> https://github.com/romoore/sigvis >>>> I've just added (before writing this email) support for "dynamic" >>>> transmitters (sensors not bound to a World Model URI/ID value). >>>> >>>> 3. You need to connect to the World Model and enter the Receiver value >>>> (mentioned in step 1) as a URI/ID value. It's a bit detailed, so I >>>> will describe it below. >>>> >>>> Once you have the receiver configured (below), you can run the SigVis >>>> gui and it *should* should the fake transmitters in the "Devices" menu. >>>> If not, let me know and I can try to help some more. >>>> >>>> Regards, >>>> Rob >>>> >>>> ----------- >>>> Adding a receiver to the World Model >>>> >>>> Download the Command-line WM Browser from GitHub: >>>> https://github.com/romoore/cli-wm-browse >>>> >>>> Compile and package with `mvn clean package`. It should automatically >>>> resolve all of its dependencies from Maven Central. >>>> >>>> Run the CLI with the java command: >>>> java -jar \ >>>> target/cli-wm-browse-1.0.0-SNAPSHOT-jar-with-dependencies.jar \ >>>> localhost testuser 7009 7011 >>>> >>>> "testuser" is the Origin value for updating the World Model. >>>> >>>> At the prompt you can add a region and receiver: >>>> [testuser@localhost]update region.myregion location.maxx >>>> 100 >>>> [testuser@localhost]update region.myregion location.maxy >>>> 100 >>>> [testuser@localhost]update myregion.anchor.receiver.1 sensor >>>> 4 >>>> 0100000000000000000000000000000001 >>>> [testuser@localhost]update myregion.anchor.receiver.1 >>> location.xoffset >>>> 1 >>>> [testuser@localhost]update myregion.anchor.receiver.1 >>> location.yoffset >>>> 1 >>>> >>>> Once you have the region and receiver, then SigVis should show them in >>>> the menus (once you restart it). >>>>> >>>> >>> ------------------------------------------------------------------------------ >>>>> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial >>>>> Remotely access PCs and mobile devices and provide instant support >>>>> Improve your efficiency, and focus on delivering more value-add services >>>>> Discover what IT Professionals Know. Rescue delivers >>>>> http://p.sf.net/sfu/logmein_12329d2d >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Grailrtls-developers mailing list >>>>> Gra...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>>>> >>>> >>>> >>> ------------------------------------------------------------------------------ >>>> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial >>>> Remotely access PCs and mobile devices and provide instant support >>>> Improve your efficiency, and focus on delivering more value-add services >>>> Discover what IT Professionals Know. Rescue delivers >>>> http://p.sf.net/sfu/logmein_12329d2d >>>> _______________________________________________ >>>> Grailrtls-developers mailing list >>>> Gra...@li... >>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>>> >>> >>> >>> ------------------------------------------------------------------------------ >>> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial >>> Remotely access PCs and mobile devices and provide instant support >>> Improve your efficiency, and focus on delivering more value-add services >>> Discover what IT Professionals Know. Rescue delivers >>> http://p.sf.net/sfu/logmein_12329d2d >>> _______________________________________________ >>> Grailrtls-developers mailing list >>> Gra...@li... >>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>> >> > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > _______________________________________________ > Grailrtls-developers mailing list > Gra...@li... > https://lists.sourceforge.net/lists/listinfo/grailrtls-developers > |
From: Robert M. <ro...@cs...> - 2012-12-11 15:56:43
|
Hi Oleg, There isn't currently a command-line tool to view that type of data from the world model (on-demand attributes). Give me some time to write one in the java-examples and I will update GitHub, then email you about it. Could you also type the following in cli-wm-browser and let me know the output? status .* That should show all of the current values in the world model (which should not be much). The GWT code (as far as I know) relies on Google's GWT compiler. I wrote it as a simple demonstration/test of the REST/web interface for the World Model, and always compile using Eclipse with Google's instructions. I don't know of a way to compile just using ant/java at the command line, but I haven't tried yet. --Rob On 12/11/2012 03:26 AM, Олег Любимов wrote: > Hi Robert > I can't load data I have tested the FakeSensor and the Aggregator using > a tool https://github.com/OwlPlatform/java-examples which you gave me. > FakeSensor and Aggregator work OK (the tool show me output on the screen > which contents numbers of transmitters and its RSSI value = -50 dB). > Then I download and build > signal-strength-solvers<https://github.com/OwlPlatform/signal-strength-solvers>andworld-model<https://github.com/OwlPlatform/world-model>from > Owl Platform project webpage on the Github. I run components of the > location system on the following steps > > 1) Aggregator (with default parameters) > 2) FakeSensor localhost 7007 -D 500 N 2 - Aggregator successfully connects > to It > 3) sqlite3-worl-model (OwlPlatform) localhost 7009 localhost 7010 > 4) fingerprint_solver (OwlPlatform) localhost 7008 localhost 7009 1000 1500 > (Did I use valid values of time and window size for the fingerprint_solver?) > The solver successfully connects to the World_Model and to the Aggregator > and the World Model begins receive messages from the Solver. > World Model Output: > >> Trying to get available packet >> Message id is 4 >> Received a solver data message. > > 5) Then I run the cli_wm_browse with the commands, which you wrote in the > previous email > 6) run the SigVis, it sucessfully connects to the World Model, but the show > message "No data received from World Model in N seconds" > The World Model at the same time prints to the screen following: > ... >> Trying to get available packet >> Message id is 4 >> Received a solver data message. >> Inserting 1 transient entries for standing query. >> Inserting 1 transient entries for standing query. > ... > I realized, that the Wold Model sends data to the standing query and SigVis > should take the data from this query, but It does not take the data. Is it > right? Are there any tools to see the query content? > > Also I download the gwt-Plunder, but I did't found gwt-plunder.xml file on > the project directory(it contains only /src , /war and git files). So I > can't build this project using the command "ant build" and I can't import > this project to the Eclypse. > May be you forget to add this file to git before you push the project to > the Github? Or there is another way to build gwt applications without .xml > project file? > > Do transmitters on a real Wi-Fi network require any software to communicate > with the GRAIL/Owl sensors? > > Thank you for your answers. I have found the GRAIL project on google, when > seach open source real time location systems. I am looking for a decision > to locate smartphones on Wi-Fi network, with ability to get data from this > smartphones. > > P.S Some years ago, when I was a student, we did the same project - it was > real time location system based on wireless sensor networks. Our system > also based on RSSI method, but PHY layer was very simple(low cost) and the > carrier frequency was chosen unsuccessfully (434 MHz). So we get bad > results (big location error),especially in the indoor space, and this > project dead. But you and other GRAIL developers have done this and it's > great. I take off my hat :) > > > 2012/12/7 Robert Moore <ro...@cs...> > >> Hi Oleg, >> >> If you are seeing the Receiver in the list, then that's great >> news. To >> see the transmitters, you will need to have the "fingerprint solver" >> running, which generates RSSI statistics for the world model. I see in >> your other email you are having trouble compiling these solvers (likely >> due to the g++ version). I will ask Ben (the C++ guru) to respond to >> your other email and suggest a solution. >> >> Once you have the solver running, it should work like this: >> >> FakeSensor -> Aggregator -> Fingerprint Solver -> World Model -> SigVis >> >> It can seem very complex for just this basic example, but it makes >> larger deployments much easier for us. We are also working on an >> "easier" version of both the software API and the tools, Owl Platform. >> >> I will try to answer some of your other questions. >> 1) "No data in SigVis" - A few things are possible, the simplest is >> that no data is arriving at the World Model. You can check if data >> is coming from the FakeSensor to solvers using this example solver: >> a. Download <https://github.com/OwlPlatform/java-examples> >> b. mvn clean package >> c. ./txcheck localhost >> If you don't see any data arriving (output to the screen), then >> probably the FakeSensor is not sending data correctly. If it is, >> then you should check that the "Fingerprint Solver" is working. If >> not, then no data will arrive for SigVis. As before, I will have >> Ben reply to your problems compiling the solvers on Ubuntu 10.10. >> 2) I believe the Flash Client is out of date for the networking >> protocols. It was written as one of our earliest web-based GUIs, >> but has pretty much been replaced with a Google Web Toolkit-based >> version at <https://github.com/romoore/gwt-plunder>. I will >> double-check with Ben, but I think that the Flash app is probably >> obsolete. >> 3) "Origin ID" is used to identify the source of data in the World >> Model. Currently it is simply a string that we use to keep track >> of who (or what) is adding data to the World Model. Examples might >> be "Rob" or "stryke3" for myself, "Super-Solver 2.1" for some >> software, or "WM@192.168.1.1:6667" for a remote World Model that is >> sharing data. Eventually we would like to support RSA signed keys, >> but since we are still in the research/startup phase we have >> postponed that portion for the present. >> 4) The fingerprint solver produces aggregated statistics for devices >> across all receivers. This currently is limited to average >> (arithmetic mean) RSSI value and RSSI variance. The parameter "time" >> is how often it should send these values to the World Model, and >> "window" is how large the sliding-window used to compute the values >> should be. Both values are in milliseconds. >> >> The localization solver is not actually possible to run with only a fake >> sensor or two. It uses Bayesian inference to estimate the position of >> devices based on the RSSI values from multiple (typically 4 or more) >> receivers place around a physical space. You could probably perform >> localization with a saved data trace, for example if you wanted to >> evaluate algorithmic accuracy. >> >> Thanks for your interest in our work, and please let me know if you have >> more questions (I'm sure you will). Out of curiosity, how did you find >> out about GRAIL? Most of our users are researchers working with us on >> sensor networks, so we're very excited that real people are interested >> in it. :) >> >> Regards, >> Rob >> >> Owl Platform Home >> http://www.owlplatform.com/ >> >> GitHub (Source) >> https://github.com/OwlPlatform/ >> https://github.com/romoore (Rob's projects) >> https://github.com/bfirner (Ben's projects) >> >> On 12/07/2012 04:30 AM, Олег Любимов wrote: >>> Hello Robert >>> >>> Thanks a lot for your answer. I downloaded, built and run the "sigvis" >> and >>> the "cli-wm-browse" how you write me in the email (the FakeSensor, >>> Aggregator, solver and world_model were run the same method as I >> described >>> in my first email). The SigVis successfully connects to the world model, >>> but then it show message "No data received from World Model in ... >> seconds" >>> (see attached file "Fig3_no_data_received"). The settings for connection >>> SigVis to the *World Model was: World Model Host : 127.0.0.1 , World >> Model >>> Port: 7011*(model client port), *Region: myregion* ( I entered the region >>> name from cli-wm-browse commands). There are not transmitters in >>> "Transmitter" tab of SigVis GUI, but there is one receiver of the >>> "Receivers" tab. >>> >>> The SigVis connection log: >>> >>> [2012-12-07 12:21:32,840] INFO main/SimpleFrame - Rebuilding transmitter >>> menus >>> [2012-12-07 12:22:53,690] INFO AWT-EventQueue-0/DataCache2 - All sample >>> data cleared from cache. >>> [2012-12-07 12:22:53,691] INFO AWT-EventQueue-0/DataCache2 - Region info >>> and device locations cleared from cache. >>> [2012-12-07 12:22:53,692] INFO AWT-EventQueue-0/ConnectionHandler - >>> Connecting to World Model (C) @ 127.0.0.1:7011 >>> [2012-12-07 12:22:53,757] INFO AWT-EventQueue-0/ConnectionHandler - >>> Connected to World Model (C) @ 127.0.0.1:7011 >>> [2012-12-07 12:22:53,764] INFO Thread-5/ConnectionHandler - Starting >>> request threads. >>> [2012-12-07 12:22:53,785] INFO Thread-5/ConnectionHandler - Retrieving >>> anchor locations. >>> [2012-12-07 12:22:53,832] INFO Thread-5/ConnectionHandler - Loaded >> anchors. >>> [2012-12-07 12:22:53,832] INFO Thread-6/ConnectionHandler - Requesting >>> average RSSI values. >>> [2012-12-07 12:22:53,833] INFO Thread-5/ConnectionHandler - Request >>> threads started. >>> [2012-12-07 12:22:53,833] INFO Thread-7/ConnectionHandler - Requesting >>> RSSI variance values. >>> >>> The model connection log is shown in the attached file >>> "Fig2_model_sigvis_log" >>> >>> 1) Why the SigVis can not get data from the model? >>> >>> Another my problem - I can't connect the flash client to the World Model. >>> I build and run client with accordingly the Developer Setup Guide. I >> enter >>> to the client fields following data: >>> *IP Address: 127.0.0.1, Solver Port: 7009, Client Port: 7011, Origin ID: >>> testuser *. Then I press "Submit", but the client can not connect to the >>> model (error log is showed in the attached file >>> "Fig4_client_connect_error"). >>> 2) What may be the reason of this problem? >>> 3) What *does **Origin ID* mean? >>> 4) What do mean the parameters <time> and <window_size> of >>> ./fingerprint_solver command? >>> >>> Best regards >>> Oleg Lyubimov >>> PS: Sorry for my bad English :) >>> >>> >>> Forwarded conversation >>> Subject: Simulation on GRAIL RTLS >>> ------------------------ >>> >>> From: *Олег Любимов* <lyu...@gm...> >>> Date: 2012/12/6 >>> To: gra...@li... >>> >>> >>> Dear GRAIL Developers. >>> >>> Could you help me with my problem? I am trying to run GRAIL rtls using >> the >>> FakeSensor. I successfully run FakeSensor, Aggregator, >> fingerprint_solver, >>> World Model and GUI simulation-tools, but I can't see any data in the >>> simulation-tools GUI. There is a list of sensors on "Transmitters" tab of >>> GUI only(in Hex view). Other tabs of the GUI has no any information. All >>> components were compiled and run according to the "Developer Setup >> Guide". >>> >>> Steps to run >>> 1) Fake sensor >>> java -cp simulation-tools-3.0.4-SNAPSHOT-jath-dependencies.jar >>> org.grailrtls.sim.FakeSensor localhost 7007 -D 700 -N 6 >>> >>> 2) Aggregator >>> java -jar aggregator-3.0.4-SNAPSHOT-jar-with-dependencies.jar >>> >>> 3) fingerprint solver >>> ./fingerprint_solver localhost 7008 localhost 7009 1000 2000 >>> >>> 4) world_model >>> ./world_model_server 7009 7011 >>> >>> 5) simulation-tools >>> java -jar simulation-tools-3.0.4-SNAPSHOT-jar-with-dependencies.jar >>> localhost 7008 localhost 7011 >>> >>> What I should do to run the simulation sucessfully and see data of >>> FakeSensors on GUI? >>> >>> How to use different solvers: first I should run fingerprint_solver, and >>> then any other solver (e.g. localization_solver2) and connect it to world >>> model socket? How I can get data from the "localization_solver2"? (I use >>> only C++ solvers) >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> ---------- >>> From: *Robert Moore* <ro...@cs...> >>> Date: 2012/12/6 >>> To: gra...@li... >>> >>> >>> Hi Олег, >>> >>> Sounds like you're most of the way there. You just have a few >> more >>> steps and you should get the data you want. >>> >>> 1. The fake sensor was written primarily to load-test the aggregator >>> and to see if things are working end-to-end. You can use it to test >>> the GUI, but it will probably need a little tweaking (like >>> hard-coding the receiver). >>> >>> 2. There used to be low-level (RSSI-focused) GUI in the >>> simulation-tools directory, but it has been split into its own >>> project. You can get a copy from GitHub: >>> https://github.com/romoore/sigvis >>> I've just added (before writing this email) support for "dynamic" >>> transmitters (sensors not bound to a World Model URI/ID value). >>> >>> 3. You need to connect to the World Model and enter the Receiver value >>> (mentioned in step 1) as a URI/ID value. It's a bit detailed, so I >>> will describe it below. >>> >>> Once you have the receiver configured (below), you can run the SigVis >>> gui and it *should* should the fake transmitters in the "Devices" menu. >>> If not, let me know and I can try to help some more. >>> >>> Regards, >>> Rob >>> >>> ----------- >>> Adding a receiver to the World Model >>> >>> Download the Command-line WM Browser from GitHub: >>> https://github.com/romoore/cli-wm-browse >>> >>> Compile and package with `mvn clean package`. It should automatically >>> resolve all of its dependencies from Maven Central. >>> >>> Run the CLI with the java command: >>> java -jar \ >>> target/cli-wm-browse-1.0.0-SNAPSHOT-jar-with-dependencies.jar \ >>> localhost testuser 7009 7011 >>> >>> "testuser" is the Origin value for updating the World Model. >>> >>> At the prompt you can add a region and receiver: >>> [testuser@localhost]update region.myregion location.maxx >>> 100 >>> [testuser@localhost]update region.myregion location.maxy >>> 100 >>> [testuser@localhost]update myregion.anchor.receiver.1 sensor >>> 4 >>> 0100000000000000000000000000000001 >>> [testuser@localhost]update myregion.anchor.receiver.1 >> location.xoffset >>> 1 >>> [testuser@localhost]update myregion.anchor.receiver.1 >> location.yoffset >>> 1 >>> >>> Once you have the region and receiver, then SigVis should show them in >>> the menus (once you restart it). >>>> >>> >> ------------------------------------------------------------------------------ >>>> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial >>>> Remotely access PCs and mobile devices and provide instant support >>>> Improve your efficiency, and focus on delivering more value-add services >>>> Discover what IT Professionals Know. Rescue delivers >>>> http://p.sf.net/sfu/logmein_12329d2d >>>> >>>> >>>> >>>> _______________________________________________ >>>> Grailrtls-developers mailing list >>>> Gra...@li... >>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>>> >>> >>> >> ------------------------------------------------------------------------------ >>> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial >>> Remotely access PCs and mobile devices and provide instant support >>> Improve your efficiency, and focus on delivering more value-add services >>> Discover what IT Professionals Know. Rescue delivers >>> http://p.sf.net/sfu/logmein_12329d2d >>> _______________________________________________ >>> Grailrtls-developers mailing list >>> Gra...@li... >>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>> >> >> >> ------------------------------------------------------------------------------ >> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial >> Remotely access PCs and mobile devices and provide instant support >> Improve your efficiency, and focus on delivering more value-add services >> Discover what IT Professionals Know. Rescue delivers >> http://p.sf.net/sfu/logmein_12329d2d >> _______________________________________________ >> Grailrtls-developers mailing list >> Gra...@li... >> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >> > |
From: Олег Л. <lyu...@gm...> - 2012-12-11 10:19:30
|
Hi Robert I can't load data I have tested the FakeSensor and the Aggregator using a tool https://github.com/OwlPlatform/java-examples which you gave me. FakeSensor and Aggregator work OK (the tool show me output on the screen which contents numbers of transmitters and its RSSI value = -50 dB). Then I download and build signal-strength-solvers<https://github.com/OwlPlatform/signal-strength-solvers>andworld-model<https://github.com/OwlPlatform/world-model>from Owl Platform project webpage on the Github. I run components of the location system on the following steps 1) Aggregator (with default parameters) 2) FakeSensor localhost 7007 -D 500 N 2 - Aggregator successfully connects to It 3) sqlite3-worl-model (OwlPlatform) localhost 7009 localhost 7010 4) fingerprint_solver (OwlPlatform) localhost 7008 localhost 7009 1000 1500 (Did I use valid values of time and window size for the fingerprint_solver?) The solver successfully connects to the World_Model and to the Aggregator and the World Model begins receive messages from the Solver. World Model Output: >Trying to get available packet >Message id is 4 >Received a solver data message. 5) Then I run the cli_wm_browse with the commands, which you wrote in the previous email 6) run the SigVis, it sucessfully connects to the World Model, but the show message "No data received from World Model in N seconds" The World Model at the same time prints to the screen following: ... >Trying to get available packet >Message id is 4 >Received a solver data message. >Inserting 1 transient entries for standing query. >Inserting 1 transient entries for standing query. ... I realized, that the Wold Model sends data to the standing query and SigVis should take the data from this query, but It does not take the data. Is it right? Are there any tools to see the query content? Also I download the gwt-Plunder, but I did't found gwt-plunder.xml file on the project directory(it contains only /src , /war and git files). So I can't build this project using the command "ant build" and I can't import this project to the Eclypse. May be you forget to add this file to git before you push the project to the Github? Or there is another way to build gwt applications without .xml project file? Do transmitters on a real Wi-Fi network require any software to communicate with the GRAIL/Owl sensors? Thank you for your answers. I have found the GRAIL project on google, when seach open source real time location systems. I am looking for a decision to locate smartphones on Wi-Fi network, with ability to get data from this smartphones. P.S Some years ago, when I was a student, we did the same project - it was real time location system based on wireless sensor networks. Our system also based on RSSI method, but PHY layer was very simple(low cost) and the carrier frequency was chosen unsuccessfully (434 MHz). So we get bad results (big location error),especially in the indoor space, and this project dead. But you and other GRAIL developers have done this and it's great. I take off my hat :) 2012/12/7 Robert Moore <ro...@cs...> > Hi Oleg, > > If you are seeing the Receiver in the list, then that's great > news. To > see the transmitters, you will need to have the "fingerprint solver" > running, which generates RSSI statistics for the world model. I see in > your other email you are having trouble compiling these solvers (likely > due to the g++ version). I will ask Ben (the C++ guru) to respond to > your other email and suggest a solution. > > Once you have the solver running, it should work like this: > > FakeSensor -> Aggregator -> Fingerprint Solver -> World Model -> SigVis > > It can seem very complex for just this basic example, but it makes > larger deployments much easier for us. We are also working on an > "easier" version of both the software API and the tools, Owl Platform. > > I will try to answer some of your other questions. > 1) "No data in SigVis" - A few things are possible, the simplest is > that no data is arriving at the World Model. You can check if data > is coming from the FakeSensor to solvers using this example solver: > a. Download <https://github.com/OwlPlatform/java-examples> > b. mvn clean package > c. ./txcheck localhost > If you don't see any data arriving (output to the screen), then > probably the FakeSensor is not sending data correctly. If it is, > then you should check that the "Fingerprint Solver" is working. If > not, then no data will arrive for SigVis. As before, I will have > Ben reply to your problems compiling the solvers on Ubuntu 10.10. > 2) I believe the Flash Client is out of date for the networking > protocols. It was written as one of our earliest web-based GUIs, > but has pretty much been replaced with a Google Web Toolkit-based > version at <https://github.com/romoore/gwt-plunder>. I will > double-check with Ben, but I think that the Flash app is probably > obsolete. > 3) "Origin ID" is used to identify the source of data in the World > Model. Currently it is simply a string that we use to keep track > of who (or what) is adding data to the World Model. Examples might > be "Rob" or "stryke3" for myself, "Super-Solver 2.1" for some > software, or "WM@192.168.1.1:6667" for a remote World Model that is > sharing data. Eventually we would like to support RSA signed keys, > but since we are still in the research/startup phase we have > postponed that portion for the present. > 4) The fingerprint solver produces aggregated statistics for devices > across all receivers. This currently is limited to average > (arithmetic mean) RSSI value and RSSI variance. The parameter "time" > is how often it should send these values to the World Model, and > "window" is how large the sliding-window used to compute the values > should be. Both values are in milliseconds. > > The localization solver is not actually possible to run with only a fake > sensor or two. It uses Bayesian inference to estimate the position of > devices based on the RSSI values from multiple (typically 4 or more) > receivers place around a physical space. You could probably perform > localization with a saved data trace, for example if you wanted to > evaluate algorithmic accuracy. > > Thanks for your interest in our work, and please let me know if you have > more questions (I'm sure you will). Out of curiosity, how did you find > out about GRAIL? Most of our users are researchers working with us on > sensor networks, so we're very excited that real people are interested > in it. :) > > Regards, > Rob > > Owl Platform Home > http://www.owlplatform.com/ > > GitHub (Source) > https://github.com/OwlPlatform/ > https://github.com/romoore (Rob's projects) > https://github.com/bfirner (Ben's projects) > > On 12/07/2012 04:30 AM, Олег Любимов wrote: > > Hello Robert > > > > Thanks a lot for your answer. I downloaded, built and run the "sigvis" > and > > the "cli-wm-browse" how you write me in the email (the FakeSensor, > > Aggregator, solver and world_model were run the same method as I > described > > in my first email). The SigVis successfully connects to the world model, > > but then it show message "No data received from World Model in ... > seconds" > > (see attached file "Fig3_no_data_received"). The settings for connection > > SigVis to the *World Model was: World Model Host : 127.0.0.1 , World > Model > > Port: 7011*(model client port), *Region: myregion* ( I entered the region > > name from cli-wm-browse commands). There are not transmitters in > > "Transmitter" tab of SigVis GUI, but there is one receiver of the > > "Receivers" tab. > > > > The SigVis connection log: > > > > [2012-12-07 12:21:32,840] INFO main/SimpleFrame - Rebuilding transmitter > > menus > > [2012-12-07 12:22:53,690] INFO AWT-EventQueue-0/DataCache2 - All sample > > data cleared from cache. > > [2012-12-07 12:22:53,691] INFO AWT-EventQueue-0/DataCache2 - Region info > > and device locations cleared from cache. > > [2012-12-07 12:22:53,692] INFO AWT-EventQueue-0/ConnectionHandler - > > Connecting to World Model (C) @ 127.0.0.1:7011 > > [2012-12-07 12:22:53,757] INFO AWT-EventQueue-0/ConnectionHandler - > > Connected to World Model (C) @ 127.0.0.1:7011 > > [2012-12-07 12:22:53,764] INFO Thread-5/ConnectionHandler - Starting > > request threads. > > [2012-12-07 12:22:53,785] INFO Thread-5/ConnectionHandler - Retrieving > > anchor locations. > > [2012-12-07 12:22:53,832] INFO Thread-5/ConnectionHandler - Loaded > anchors. > > [2012-12-07 12:22:53,832] INFO Thread-6/ConnectionHandler - Requesting > > average RSSI values. > > [2012-12-07 12:22:53,833] INFO Thread-5/ConnectionHandler - Request > > threads started. > > [2012-12-07 12:22:53,833] INFO Thread-7/ConnectionHandler - Requesting > > RSSI variance values. > > > > The model connection log is shown in the attached file > > "Fig2_model_sigvis_log" > > > > 1) Why the SigVis can not get data from the model? > > > > Another my problem - I can't connect the flash client to the World Model. > > I build and run client with accordingly the Developer Setup Guide. I > enter > > to the client fields following data: > > *IP Address: 127.0.0.1, Solver Port: 7009, Client Port: 7011, Origin ID: > > testuser *. Then I press "Submit", but the client can not connect to the > > model (error log is showed in the attached file > > "Fig4_client_connect_error"). > > 2) What may be the reason of this problem? > > 3) What *does **Origin ID* mean? > > 4) What do mean the parameters <time> and <window_size> of > > ./fingerprint_solver command? > > > > Best regards > > Oleg Lyubimov > > PS: Sorry for my bad English :) > > > > > > Forwarded conversation > > Subject: Simulation on GRAIL RTLS > > ------------------------ > > > > From: *Олег Любимов* <lyu...@gm...> > > Date: 2012/12/6 > > To: gra...@li... > > > > > > Dear GRAIL Developers. > > > > Could you help me with my problem? I am trying to run GRAIL rtls using > the > > FakeSensor. I successfully run FakeSensor, Aggregator, > fingerprint_solver, > > World Model and GUI simulation-tools, but I can't see any data in the > > simulation-tools GUI. There is a list of sensors on "Transmitters" tab of > > GUI only(in Hex view). Other tabs of the GUI has no any information. All > > components were compiled and run according to the "Developer Setup > Guide". > > > > Steps to run > > 1) Fake sensor > > java -cp simulation-tools-3.0.4-SNAPSHOT-jath-dependencies.jar > > org.grailrtls.sim.FakeSensor localhost 7007 -D 700 -N 6 > > > > 2) Aggregator > > java -jar aggregator-3.0.4-SNAPSHOT-jar-with-dependencies.jar > > > > 3) fingerprint solver > > ./fingerprint_solver localhost 7008 localhost 7009 1000 2000 > > > > 4) world_model > > ./world_model_server 7009 7011 > > > > 5) simulation-tools > > java -jar simulation-tools-3.0.4-SNAPSHOT-jar-with-dependencies.jar > > localhost 7008 localhost 7011 > > > > What I should do to run the simulation sucessfully and see data of > > FakeSensors on GUI? > > > > How to use different solvers: first I should run fingerprint_solver, and > > then any other solver (e.g. localization_solver2) and connect it to world > > model socket? How I can get data from the "localization_solver2"? (I use > > only C++ solvers) > > > > > > > > > > > > > > > > > > > > ---------- > > From: *Robert Moore* <ro...@cs...> > > Date: 2012/12/6 > > To: gra...@li... > > > > > > Hi Олег, > > > > Sounds like you're most of the way there. You just have a few > more > > steps and you should get the data you want. > > > > 1. The fake sensor was written primarily to load-test the aggregator > > and to see if things are working end-to-end. You can use it to test > > the GUI, but it will probably need a little tweaking (like > > hard-coding the receiver). > > > > 2. There used to be low-level (RSSI-focused) GUI in the > > simulation-tools directory, but it has been split into its own > > project. You can get a copy from GitHub: > > https://github.com/romoore/sigvis > > I've just added (before writing this email) support for "dynamic" > > transmitters (sensors not bound to a World Model URI/ID value). > > > > 3. You need to connect to the World Model and enter the Receiver value > > (mentioned in step 1) as a URI/ID value. It's a bit detailed, so I > > will describe it below. > > > > Once you have the receiver configured (below), you can run the SigVis > > gui and it *should* should the fake transmitters in the "Devices" menu. > > If not, let me know and I can try to help some more. > > > > Regards, > > Rob > > > > ----------- > > Adding a receiver to the World Model > > > > Download the Command-line WM Browser from GitHub: > > https://github.com/romoore/cli-wm-browse > > > > Compile and package with `mvn clean package`. It should automatically > > resolve all of its dependencies from Maven Central. > > > > Run the CLI with the java command: > > java -jar \ > > target/cli-wm-browse-1.0.0-SNAPSHOT-jar-with-dependencies.jar \ > > localhost testuser 7009 7011 > > > > "testuser" is the Origin value for updating the World Model. > > > > At the prompt you can add a region and receiver: > > [testuser@localhost]update region.myregion location.maxx > > 100 > > [testuser@localhost]update region.myregion location.maxy > > 100 > > [testuser@localhost]update myregion.anchor.receiver.1 sensor > > 4 > > 0100000000000000000000000000000001 > > [testuser@localhost]update myregion.anchor.receiver.1 > location.xoffset > > 1 > > [testuser@localhost]update myregion.anchor.receiver.1 > location.yoffset > > 1 > > > > Once you have the region and receiver, then SigVis should show them in > > the menus (once you restart it). > >> > > > ------------------------------------------------------------------------------ > >> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > >> Remotely access PCs and mobile devices and provide instant support > >> Improve your efficiency, and focus on delivering more value-add services > >> Discover what IT Professionals Know. Rescue delivers > >> http://p.sf.net/sfu/logmein_12329d2d > >> > >> > >> > >> _______________________________________________ > >> Grailrtls-developers mailing list > >> Gra...@li... > >> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers > >> > > > > > ------------------------------------------------------------------------------ > > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > > Remotely access PCs and mobile devices and provide instant support > > Improve your efficiency, and focus on delivering more value-add services > > Discover what IT Professionals Know. Rescue delivers > > http://p.sf.net/sfu/logmein_12329d2d > > _______________________________________________ > > Grailrtls-developers mailing list > > Gra...@li... > > https://lists.sourceforge.net/lists/listinfo/grailrtls-developers > > > > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > _______________________________________________ > Grailrtls-developers mailing list > Gra...@li... > https://lists.sourceforge.net/lists/listinfo/grailrtls-developers > |
From: Bernhard F. <bf...@ed...> - 2012-12-07 17:02:16
|
Hello Oleg, It looks like you're having problems with the passive localization code that is in the make target "solvers_passive_loc". This code is VERY researchy so we gave it its own build target so that it can be easily avoided when it causes problems. You can just build the other solvers with: "make solvers_world_model solvers_utility" and then you'll have all of the solvers except for the passive localization ones. If that solver was what you were interested in, then I can try to find out why your version of Ubuntu isn't finding the libraries. The only quick suggestion I have is to try running ldconfig to make sure that ld sees the libraries. -Ben On 12/07/2012 05:37 AM, Олег Любимов wrote: > Hello All. > I have a problem width compilation grail3-solvers on Ubuntu 11.10. > I done all operations in appliance with the "Developer Setup Guide". > Commands "make solvers_world_model", "make world_model" works OK, > but when I enter command make all (of make without parameters) the > compilation error appears. > > Error log > olyubimov@dev1:~/Work/GRAIL/grailrtls/grail-solvers$ make > g++ -O3 -std=c++0x -Wall -Wextra -Wno-sign-compare -I./include -L./lib > lib/libgrail3.a src/passive_localization_solver.cpp > src/passive_localization_utilities.cpp src/lda.cpp -lgrail3 -lpthread -o > bin/passive_localization_solver \ > -I /usr/include/opencv -L /usr/lib \ > -lm -lcv -lhighgui -lcvaux > /usr/bin/ld: cannot find -lcv > /usr/bin/ld: cannot find -lhighgui > /usr/bin/ld: cannot find -lcvaux > collect2: выполнение ld завершилось с кодом возврата 1 > make: *** [bin/passive_localization_solver] Ошибка 1 > > The libcv, libcv-dev, libcv2.3 , lidhighgui-dev, libcvaux-dev, > libcvaux2.3 were installed in the system (I install it using apt-get. > Also Sinaptic find all this libraries as installed). > > Have you faced with this problem? What may be the reason? > > Thanks in advance, > BR. Oleg Lyubimov. > > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > > > > _______________________________________________ > Grailrtls-developers mailing list > Gra...@li... > https://lists.sourceforge.net/lists/listinfo/grailrtls-developers > |
From: Robert M. <ro...@cs...> - 2012-12-07 13:37:54
|
Hi Oleg, If you are seeing the Receiver in the list, then that's great news. To see the transmitters, you will need to have the "fingerprint solver" running, which generates RSSI statistics for the world model. I see in your other email you are having trouble compiling these solvers (likely due to the g++ version). I will ask Ben (the C++ guru) to respond to your other email and suggest a solution. Once you have the solver running, it should work like this: FakeSensor -> Aggregator -> Fingerprint Solver -> World Model -> SigVis It can seem very complex for just this basic example, but it makes larger deployments much easier for us. We are also working on an "easier" version of both the software API and the tools, Owl Platform. I will try to answer some of your other questions. 1) "No data in SigVis" - A few things are possible, the simplest is that no data is arriving at the World Model. You can check if data is coming from the FakeSensor to solvers using this example solver: a. Download <https://github.com/OwlPlatform/java-examples> b. mvn clean package c. ./txcheck localhost If you don't see any data arriving (output to the screen), then probably the FakeSensor is not sending data correctly. If it is, then you should check that the "Fingerprint Solver" is working. If not, then no data will arrive for SigVis. As before, I will have Ben reply to your problems compiling the solvers on Ubuntu 10.10. 2) I believe the Flash Client is out of date for the networking protocols. It was written as one of our earliest web-based GUIs, but has pretty much been replaced with a Google Web Toolkit-based version at <https://github.com/romoore/gwt-plunder>. I will double-check with Ben, but I think that the Flash app is probably obsolete. 3) "Origin ID" is used to identify the source of data in the World Model. Currently it is simply a string that we use to keep track of who (or what) is adding data to the World Model. Examples might be "Rob" or "stryke3" for myself, "Super-Solver 2.1" for some software, or "WM@192.168.1.1:6667" for a remote World Model that is sharing data. Eventually we would like to support RSA signed keys, but since we are still in the research/startup phase we have postponed that portion for the present. 4) The fingerprint solver produces aggregated statistics for devices across all receivers. This currently is limited to average (arithmetic mean) RSSI value and RSSI variance. The parameter "time" is how often it should send these values to the World Model, and "window" is how large the sliding-window used to compute the values should be. Both values are in milliseconds. The localization solver is not actually possible to run with only a fake sensor or two. It uses Bayesian inference to estimate the position of devices based on the RSSI values from multiple (typically 4 or more) receivers place around a physical space. You could probably perform localization with a saved data trace, for example if you wanted to evaluate algorithmic accuracy. Thanks for your interest in our work, and please let me know if you have more questions (I'm sure you will). Out of curiosity, how did you find out about GRAIL? Most of our users are researchers working with us on sensor networks, so we're very excited that real people are interested in it. :) Regards, Rob Owl Platform Home http://www.owlplatform.com/ GitHub (Source) https://github.com/OwlPlatform/ https://github.com/romoore (Rob's projects) https://github.com/bfirner (Ben's projects) On 12/07/2012 04:30 AM, Олег Любимов wrote: > Hello Robert > > Thanks a lot for your answer. I downloaded, built and run the "sigvis" and > the "cli-wm-browse" how you write me in the email (the FakeSensor, > Aggregator, solver and world_model were run the same method as I described > in my first email). The SigVis successfully connects to the world model, > but then it show message "No data received from World Model in ... seconds" > (see attached file "Fig3_no_data_received"). The settings for connection > SigVis to the *World Model was: World Model Host : 127.0.0.1 , World Model > Port: 7011*(model client port), *Region: myregion* ( I entered the region > name from cli-wm-browse commands). There are not transmitters in > "Transmitter" tab of SigVis GUI, but there is one receiver of the > "Receivers" tab. > > The SigVis connection log: > > [2012-12-07 12:21:32,840] INFO main/SimpleFrame - Rebuilding transmitter > menus > [2012-12-07 12:22:53,690] INFO AWT-EventQueue-0/DataCache2 - All sample > data cleared from cache. > [2012-12-07 12:22:53,691] INFO AWT-EventQueue-0/DataCache2 - Region info > and device locations cleared from cache. > [2012-12-07 12:22:53,692] INFO AWT-EventQueue-0/ConnectionHandler - > Connecting to World Model (C) @ 127.0.0.1:7011 > [2012-12-07 12:22:53,757] INFO AWT-EventQueue-0/ConnectionHandler - > Connected to World Model (C) @ 127.0.0.1:7011 > [2012-12-07 12:22:53,764] INFO Thread-5/ConnectionHandler - Starting > request threads. > [2012-12-07 12:22:53,785] INFO Thread-5/ConnectionHandler - Retrieving > anchor locations. > [2012-12-07 12:22:53,832] INFO Thread-5/ConnectionHandler - Loaded anchors. > [2012-12-07 12:22:53,832] INFO Thread-6/ConnectionHandler - Requesting > average RSSI values. > [2012-12-07 12:22:53,833] INFO Thread-5/ConnectionHandler - Request > threads started. > [2012-12-07 12:22:53,833] INFO Thread-7/ConnectionHandler - Requesting > RSSI variance values. > > The model connection log is shown in the attached file > "Fig2_model_sigvis_log" > > 1) Why the SigVis can not get data from the model? > > Another my problem - I can't connect the flash client to the World Model. > I build and run client with accordingly the Developer Setup Guide. I enter > to the client fields following data: > *IP Address: 127.0.0.1, Solver Port: 7009, Client Port: 7011, Origin ID: > testuser *. Then I press "Submit", but the client can not connect to the > model (error log is showed in the attached file > "Fig4_client_connect_error"). > 2) What may be the reason of this problem? > 3) What *does **Origin ID* mean? > 4) What do mean the parameters <time> and <window_size> of > ./fingerprint_solver command? > > Best regards > Oleg Lyubimov > PS: Sorry for my bad English :) > > > Forwarded conversation > Subject: Simulation on GRAIL RTLS > ------------------------ > > From: *Олег Любимов* <lyu...@gm...> > Date: 2012/12/6 > To: gra...@li... > > > Dear GRAIL Developers. > > Could you help me with my problem? I am trying to run GRAIL rtls using the > FakeSensor. I successfully run FakeSensor, Aggregator, fingerprint_solver, > World Model and GUI simulation-tools, but I can't see any data in the > simulation-tools GUI. There is a list of sensors on "Transmitters" tab of > GUI only(in Hex view). Other tabs of the GUI has no any information. All > components were compiled and run according to the "Developer Setup Guide". > > Steps to run > 1) Fake sensor > java -cp simulation-tools-3.0.4-SNAPSHOT-jath-dependencies.jar > org.grailrtls.sim.FakeSensor localhost 7007 -D 700 -N 6 > > 2) Aggregator > java -jar aggregator-3.0.4-SNAPSHOT-jar-with-dependencies.jar > > 3) fingerprint solver > ./fingerprint_solver localhost 7008 localhost 7009 1000 2000 > > 4) world_model > ./world_model_server 7009 7011 > > 5) simulation-tools > java -jar simulation-tools-3.0.4-SNAPSHOT-jar-with-dependencies.jar > localhost 7008 localhost 7011 > > What I should do to run the simulation sucessfully and see data of > FakeSensors on GUI? > > How to use different solvers: first I should run fingerprint_solver, and > then any other solver (e.g. localization_solver2) and connect it to world > model socket? How I can get data from the "localization_solver2"? (I use > only C++ solvers) > > > > > > > > > > ---------- > From: *Robert Moore* <ro...@cs...> > Date: 2012/12/6 > To: gra...@li... > > > Hi Олег, > > Sounds like you're most of the way there. You just have a few more > steps and you should get the data you want. > > 1. The fake sensor was written primarily to load-test the aggregator > and to see if things are working end-to-end. You can use it to test > the GUI, but it will probably need a little tweaking (like > hard-coding the receiver). > > 2. There used to be low-level (RSSI-focused) GUI in the > simulation-tools directory, but it has been split into its own > project. You can get a copy from GitHub: > https://github.com/romoore/sigvis > I've just added (before writing this email) support for "dynamic" > transmitters (sensors not bound to a World Model URI/ID value). > > 3. You need to connect to the World Model and enter the Receiver value > (mentioned in step 1) as a URI/ID value. It's a bit detailed, so I > will describe it below. > > Once you have the receiver configured (below), you can run the SigVis > gui and it *should* should the fake transmitters in the "Devices" menu. > If not, let me know and I can try to help some more. > > Regards, > Rob > > ----------- > Adding a receiver to the World Model > > Download the Command-line WM Browser from GitHub: > https://github.com/romoore/cli-wm-browse > > Compile and package with `mvn clean package`. It should automatically > resolve all of its dependencies from Maven Central. > > Run the CLI with the java command: > java -jar \ > target/cli-wm-browse-1.0.0-SNAPSHOT-jar-with-dependencies.jar \ > localhost testuser 7009 7011 > > "testuser" is the Origin value for updating the World Model. > > At the prompt you can add a region and receiver: > [testuser@localhost]update region.myregion location.maxx > 100 > [testuser@localhost]update region.myregion location.maxy > 100 > [testuser@localhost]update myregion.anchor.receiver.1 sensor > 4 > 0100000000000000000000000000000001 > [testuser@localhost]update myregion.anchor.receiver.1 location.xoffset > 1 > [testuser@localhost]update myregion.anchor.receiver.1 location.yoffset > 1 > > Once you have the region and receiver, then SigVis should show them in > the menus (once you restart it). >> > ------------------------------------------------------------------------------ >> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial >> Remotely access PCs and mobile devices and provide instant support >> Improve your efficiency, and focus on delivering more value-add services >> Discover what IT Professionals Know. Rescue delivers >> http://p.sf.net/sfu/logmein_12329d2d >> >> >> >> _______________________________________________ >> Grailrtls-developers mailing list >> Gra...@li... >> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >> > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > _______________________________________________ > Grailrtls-developers mailing list > Gra...@li... > https://lists.sourceforge.net/lists/listinfo/grailrtls-developers > |
From: Олег Л. <lyu...@gm...> - 2012-12-07 10:37:15
|
Hello All. I have a problem width compilation grail3-solvers on Ubuntu 11.10. I done all operations in appliance with the "Developer Setup Guide". Commands "make solvers_world_model", "make world_model" works OK, but when I enter command make all (of make without parameters) the compilation error appears. Error log olyubimov@dev1:~/Work/GRAIL/grailrtls/grail-solvers$ make g++ -O3 -std=c++0x -Wall -Wextra -Wno-sign-compare -I./include -L./lib lib/libgrail3.a src/passive_localization_solver.cpp src/passive_localization_utilities.cpp src/lda.cpp -lgrail3 -lpthread -o bin/passive_localization_solver \ -I /usr/include/opencv -L /usr/lib \ -lm -lcv -lhighgui -lcvaux /usr/bin/ld: cannot find -lcv /usr/bin/ld: cannot find -lhighgui /usr/bin/ld: cannot find -lcvaux collect2: выполнение ld завершилось с кодом возврата 1 make: *** [bin/passive_localization_solver] Ошибка 1 The libcv, libcv-dev, libcv2.3 , lidhighgui-dev, libcvaux-dev, libcvaux2.3 were installed in the system (I install it using apt-get. Also Sinaptic find all this libraries as installed). Have you faced with this problem? What may be the reason? Thanks in advance, BR. Oleg Lyubimov. |
From: Олег Л. <lyu...@gm...> - 2012-12-07 09:30:16
|
SigVis version 1.0.0-BETA Signal Visualization tools for the Owl Platform. Copyright (C) 2012 Robert Moore and the Owl Platform SigVis comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions; see the included file LICENSE for details. SigVis makes use of the following external libraries: * "Delaunay" Copyright (C) 2005, 2007 by Paul Chew (http://www.cs.cornell.edu/home/chew/Delaunay.html) * "Compgeom" Copyright (C) 2010 by Bart Kiers (http://big-o.nl/apps/compgeom/) Please see the included LICENSE and README files for full copyright details. [2012-12-07 12:21:32,289] INFO main/SignalVisualizer - SigVis version 1.0.0-BETA Signal Visualization tools for the Owl Platform. Copyright (C) 2012 Robert Moore and the Owl Platform SigVis comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions; see the included file LICENSE for details. SigVis makes use of the following external libraries: * "Delaunay" Copyright (C) 2005, 2007 by Paul Chew (http://www.cs.cornell.edu/home/chew/Delaunay.html) * "Compgeom" Copyright (C) 2010 by Bart Kiers (http://big-o.nl/apps/compgeom/) Please see the included LICENSE and README files for full copyright details. [2012-12-07 12:21:32,840] INFO main/SimpleFrame - Rebuilding transmitter menus [2012-12-07 12:22:53,690] INFO AWT-EventQueue-0/DataCache2 - All sample data cleared from cache. [2012-12-07 12:22:53,691] INFO AWT-EventQueue-0/DataCache2 - Region info and device locations cleared from cache. [2012-12-07 12:22:53,692] INFO AWT-EventQueue-0/ConnectionHandler - Connecting to World Model (C) @ 127.0.0.1:7011 [2012-12-07 12:22:53,757] INFO AWT-EventQueue-0/ConnectionHandler - Connected to World Model (C) @ 127.0.0.1:7011 [2012-12-07 12:22:53,764] INFO Thread-5/ConnectionHandler - Starting request threads. [2012-12-07 12:22:53,785] INFO Thread-5/ConnectionHandler - Retrieving anchor locations. [2012-12-07 12:22:53,832] INFO Thread-5/ConnectionHandler - Loaded anchors. [2012-12-07 12:22:53,832] INFO Thread-6/ConnectionHandler - Requesting average RSSI values. [2012-12-07 12:22:53,833] INFO Thread-5/ConnectionHandler - Request threads started. [2012-12-07 12:22:53,833] INFO Thread-7/ConnectionHandler - Requesting RSSI variance values. |
From: Robert M. <ro...@cs...> - 2012-12-06 16:33:18
|
Hi Олег, Sounds like you're most of the way there. You just have a few more steps and you should get the data you want. 1. The fake sensor was written primarily to load-test the aggregator and to see if things are working end-to-end. You can use it to test the GUI, but it will probably need a little tweaking (like hard-coding the receiver). 2. There used to be low-level (RSSI-focused) GUI in the simulation-tools directory, but it has been split into its own project. You can get a copy from GitHub: https://github.com/romoore/sigvis I've just added (before writing this email) support for "dynamic" transmitters (sensors not bound to a World Model URI/ID value). 3. You need to connect to the World Model and enter the Receiver value (mentioned in step 1) as a URI/ID value. It's a bit detailed, so I will describe it below. Once you have the receiver configured (below), you can run the SigVis gui and it *should* should the fake transmitters in the "Devices" menu. If not, let me know and I can try to help some more. Regards, Rob ----------- Adding a receiver to the World Model Download the Command-line WM Browser from GitHub: https://github.com/romoore/cli-wm-browse Compile and package with `mvn clean package`. It should automatically resolve all of its dependencies from Maven Central. Run the CLI with the java command: java -jar \ target/cli-wm-browse-1.0.0-SNAPSHOT-jar-with-dependencies.jar \ localhost testuser 7009 7011 "testuser" is the Origin value for updating the World Model. At the prompt you can add a region and receiver: [testuser@localhost]update region.myregion location.maxx 100 [testuser@localhost]update region.myregion location.maxy 100 [testuser@localhost]update myregion.anchor.receiver.1 sensor 4 0100000000000000000000000000000001 [testuser@localhost]update myregion.anchor.receiver.1 location.xoffset 1 [testuser@localhost]update myregion.anchor.receiver.1 location.yoffset 1 Once you have the region and receiver, then SigVis should show them in the menus (once you restart it). On 12/06/2012 03:10 AM, Олег Любимов wrote: > Dear GRAIL Developers. > > Could you help me with my problem? I am trying to run GRAIL rtls using the > FakeSensor. I successfully run FakeSensor, Aggregator, fingerprint_solver, > World Model and GUI simulation-tools, but I can't see any data in the > simulation-tools GUI. There is a list of sensors on "Transmitters" tab of > GUI only(in Hex view). Other tabs of the GUI has no any information. All > components were compiled and run according to the "Developer Setup Guide". > > Steps to run > 1) Fake sensor > java -cp simulation-tools-3.0.4-SNAPSHOT-jath-dependencies.jar > org.grailrtls.sim.FakeSensor localhost 7007 -D 700 -N 6 > > 2) Aggregator > java -jar aggregator-3.0.4-SNAPSHOT-jar-with-dependencies.jar > > 3) fingerprint solver > ./fingerprint_solver localhost 7008 localhost 7009 1000 2000 > > 4) world_model > ./world_model_server 7009 7011 > > 5) simulation-tools > java -jar simulation-tools-3.0.4-SNAPSHOT-jar-with-dependencies.jar > localhost 7008 localhost 7011 > > What I should do to run the simulation sucessfully and see data of > FakeSensors on GUI? > > How to use different solvers: first I should run fingerprint_solver, and > then any other solver (e.g. localization_solver2) and connect it to world > model socket? How I can get data from the "localization_solver2"? (I use > only C++ solvers) > > > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > > > > _______________________________________________ > Grailrtls-developers mailing list > Gra...@li... > https://lists.sourceforge.net/lists/listinfo/grailrtls-developers > |
From: Олег Л. <lyu...@gm...> - 2012-12-06 08:10:24
|
Dear GRAIL Developers. Could you help me with my problem? I am trying to run GRAIL rtls using the FakeSensor. I successfully run FakeSensor, Aggregator, fingerprint_solver, World Model and GUI simulation-tools, but I can't see any data in the simulation-tools GUI. There is a list of sensors on "Transmitters" tab of GUI only(in Hex view). Other tabs of the GUI has no any information. All components were compiled and run according to the "Developer Setup Guide". Steps to run 1) Fake sensor java -cp simulation-tools-3.0.4-SNAPSHOT-jath-dependencies.jar org.grailrtls.sim.FakeSensor localhost 7007 -D 700 -N 6 2) Aggregator java -jar aggregator-3.0.4-SNAPSHOT-jar-with-dependencies.jar 3) fingerprint solver ./fingerprint_solver localhost 7008 localhost 7009 1000 2000 4) world_model ./world_model_server 7009 7011 5) simulation-tools java -jar simulation-tools-3.0.4-SNAPSHOT-jar-with-dependencies.jar localhost 7008 localhost 7011 What I should do to run the simulation sucessfully and see data of FakeSensors on GUI? How to use different solvers: first I should run fingerprint_solver, and then any other solver (e.g. localization_solver2) and connect it to world model socket? How I can get data from the "localization_solver2"? (I use only C++ solvers) |
From: Robert M. <ro...@cs...> - 2012-07-18 13:11:25
|
Hello everyone, Ben's response was great, I just have a minor minor notes/additions. I've interjected them below. --rob On 07/18/2012 12:34 AM, bf...@ed... wrote: > Hello again, > > My reply is a little long and I should probably put these steps onto one > of our web pages but for the moment email will have to suffice. > > If you're having trouble building anything I should mention that we are in > the process of splitting the code into multiple smaller repositories so > that dependencies from one piece of code don't leak into the rest of the > project and so that the project as a whole is easier to manage. I am also > setting up cmake files for the C++ code so that it builds much more > cleanly on different linux distributions. Some of the code in the new > repository has also had bug and performance fixes, but we haven't finished > bringing over all of the different software yet so staying with the > sourceforge repository is probably safer for right now unless you are > having make or dependency problems. This split repository is located at: > https://github.com/organizations/OwlPlatform > > To answer you question, the architecture is divided into two parts: the > aggregator and the world model. The aggregator is designed to be very > general purpose so it doesn't know basic details like which devices are > mobile and which are fixed. So if you can send data into the aggregator > you are halfway there. > > The world model serves as a virtual representation of objects in your > system and the attributes of those objects. To specify an "anchor" for > localization you just need to create an objects with "anchor" in its name. > We have been following a naming convention of <region>.<device > type>.<id/name> for objects in the world model so if we are using a device > with ID 24 as an immobile anchor we create an object in the world model > with the name "winlab.anchor.24". Now we also need to tell the system the > anchor's location and the MAC address of your receiver so we will add > those things as attributes to the new object. Anchors are how we refer to transmitters or receivers at fixed reference points. These anchors can be used by other components to generate signal-to-distance information. A region is a named area - a room, building, campus, city - in the virtual world representation. One of our labs is named "WINLAB", hence the use of "winlab.anchor.24". > > The easiest way to do this is through a java command line interface. > First, build and run a local world model. > cd grailrtls/grail-solvers > make world_model > ./bin/world_model_server > Now we can add new entries to the world model. > Go to grailrtls/grail3_java and type: > mvn clean install -U The step above requires Apache Maven (http://maven.apache.org). > Then go to the directory with the program: > cd grailrtls/grail3_java/developer/tutorials > And run it: > bash browse.sh <world model URL> <your name> The <world model url> is the hostname/IP address (grail.mydomain.com or 1.2.3.4) of the host on which you ran ./bin/world_model_server. This is often "localhost" if you are testing/running locally. > Let's say you wanted to add something with MAC address 0660B325BF80 as a > landmark. > First create it with the create uri command: > create uri winlab.anchor.0660B325BF80 > You don't need to use the mac address as the name, you could call it > something like winlab.anchor.front_door instead. I'll just copy and paste > the entire process from the command line interface, and I'll explain the > sensor value afterwards. > Please note that THIS version of the command-line interface does not support spaces in names. This has been addressed in the newer repositories. >> create uri winlab.anchor.0660B325BF80 >> update winlab.anchor.0660B325BF80 location.xoffset >> Please enter a value for location.xoffset as a String: >> 12.0 >> Updated "location.xoffset" with "12.0". >> update winlab.anchor.0660B325BF80 location.yoffset >> Please enter a value for location.yoffset as a String: >> 3.145 >> Updated "location.yoffset" with "3.145". >> update winlab.anchor.0660B325BF80 sensor >> Unknown attribute type "sensor". >> Please select a data type: >> 0) Boolean >> 1) Integer >> 2) Double >> 3) Long >> 4) byte[] >> 5) String >> 4 >> Please enter a value for sensor as a String: >> 02000000000000000000000660B325BF7 >> Updated "sensor" with "02000000000000000000000660B325BF7". >> show winlab.anchor.0660B325BF80 >> --(winlab.anchor.0660B325BF80)-- >> + creation Wed Jul 18 00:05:39 EDT 2012-Wed Dec 31 19:00:00 EST 1969 from > Ben:NULL >> >> + location.xoffset Wed Jul 18 00:06:12 EDT 2012-Wed Dec 31 19:00:00 EST > 1969 from Ben:12.0 >> >> + location.yoffset Wed Jul 18 00:06:48 EDT 2012-Wed Dec 31 19:00:00 EST > 1969 from Ben:3.145 >> >> + sensor Wed Jul 18 00:08:38 EDT 2012-Wed Dec 31 19:00:00 EST 1969 from > Ben:0x02000000000000000000000660B325BF80 >> >> --(winlab.anchor.0660B325BF80)-- > > The location.xoffset and location.yoffset are the x and y locations of the > landmark, which are stored at doubles (the CLI recognizes these as doubles > so it doesn't prompt you to specify the data type). You can use whatever > units you would like for this (feet, meters, etc). Sensor values are > specified as 1 byte of physical layer and 16 bytes of ID, but the CLI > doesn't know this so you just need to tell it to use a byte[] and enter > the data in hex. 2 is the physical layer for WiFi so the first byte is 2. > We have to pad the ID with 10 extra bytes (20 zeros) because WiFi only > uses 6 bytes of ID. > I believe the localization solver expects non-negative values for locations, so when you specify the min/max dimensions of a region and the locations of objects, you may wish to pick a (virtual) corner to designate as (0,0) and only permit positive values. > You can also add transmitters as landmarks as well -- these will be used > for "live" training data. You should add any objects that you want to > localize into the world model as well, but don't put "landmark" in their > names and don't give them locations since they are mobile. > > As a final setup step in the world model you need to set the dimensions of > the region. Create another object called "region.<region name>" (for us > this is region.winlab) and add a location.maxx and a location.maxy value > to set the maximum dimensions of the region. > > After doing these steps you can run the fingerprint_solver and > localization_solver2 and the system will begin to localize by modifying > the location.xoffset and locaiont.yoffset values of any non-landmark > devices. > > If you don't want to use live training data from landmark transmitters you > can also collect static training points. The gen_training_points.rb script > in the grail3_ruby/tools directory can be used to do that. > > Hopefully that was clear. > -Ben > >> Hello Ben >> Many thanks for your previous answer. >> We have compiled GRAIL on Ubuntu 11.04 (where we found some mismatch on >> makefile execution) and we are performing some tests and trying to >> understand how to configure the whole system. >> We have a doubt that the documentation has not solved: what is the way (or >> convention, or tool...) to setup the network infrastructure (i.e. a 2.4 >> Ghz 802.11.x network)? >> In other words: what is the way GRAIL identify the devices used as >> reference for positioning calculation from other devices i.e. mobile >> devices? >> >> Regards >> Giuseppe >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Grailrtls-developers mailing list >> Gra...@li... >> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >> > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Grailrtls-developers mailing list > Gra...@li... > https://lists.sourceforge.net/lists/listinfo/grailrtls-developers > |
From: <bf...@ed...> - 2012-07-18 04:34:40
|
Hello again, My reply is a little long and I should probably put these steps onto one of our web pages but for the moment email will have to suffice. If you're having trouble building anything I should mention that we are in the process of splitting the code into multiple smaller repositories so that dependencies from one piece of code don't leak into the rest of the project and so that the project as a whole is easier to manage. I am also setting up cmake files for the C++ code so that it builds much more cleanly on different linux distributions. Some of the code in the new repository has also had bug and performance fixes, but we haven't finished bringing over all of the different software yet so staying with the sourceforge repository is probably safer for right now unless you are having make or dependency problems. This split repository is located at: https://github.com/organizations/OwlPlatform To answer you question, the architecture is divided into two parts: the aggregator and the world model. The aggregator is designed to be very general purpose so it doesn't know basic details like which devices are mobile and which are fixed. So if you can send data into the aggregator you are halfway there. The world model serves as a virtual representation of objects in your system and the attributes of those objects. To specify an "anchor" for localization you just need to create an objects with "anchor" in its name. We have been following a naming convention of <region>.<device type>.<id/name> for objects in the world model so if we are using a device with ID 24 as an immobile anchor we create an object in the world model with the name "winlab.anchor.24". Now we also need to tell the system the anchor's location and the MAC address of your receiver so we will add those things as attributes to the new object. The easiest way to do this is through a java command line interface. First, build and run a local world model. cd grailrtls/grail-solvers make world_model ./bin/world_model_server Now we can add new entries to the world model. Go to grailrtls/grail3_java and type: mvn clean install -U Then go to the directory with the program: cd grailrtls/grail3_java/developer/tutorials And run it: bash browse.sh <world model URL> <your name> Let's say you wanted to add something with MAC address 0660B325BF80 as a landmark. First create it with the create uri command: create uri winlab.anchor.0660B325BF80 You don't need to use the mac address as the name, you could call it something like winlab.anchor.front_door instead. I'll just copy and paste the entire process from the command line interface, and I'll explain the sensor value afterwards. >create uri winlab.anchor.0660B325BF80 >update winlab.anchor.0660B325BF80 location.xoffset >Please enter a value for location.xoffset as a String: >12.0 >Updated "location.xoffset" with "12.0". >update winlab.anchor.0660B325BF80 location.yoffset >Please enter a value for location.yoffset as a String: >3.145 >Updated "location.yoffset" with "3.145". >update winlab.anchor.0660B325BF80 sensor >Unknown attribute type "sensor". >Please select a data type: >0) Boolean >1) Integer >2) Double >3) Long >4) byte[] >5) String >4 >Please enter a value for sensor as a String: >02000000000000000000000660B325BF7 >Updated "sensor" with "02000000000000000000000660B325BF7". >show winlab.anchor.0660B325BF80 >--(winlab.anchor.0660B325BF80)-- >+ creation Wed Jul 18 00:05:39 EDT 2012-Wed Dec 31 19:00:00 EST 1969 from Ben:NULL > >+ location.xoffset Wed Jul 18 00:06:12 EDT 2012-Wed Dec 31 19:00:00 EST 1969 from Ben:12.0 > >+ location.yoffset Wed Jul 18 00:06:48 EDT 2012-Wed Dec 31 19:00:00 EST 1969 from Ben:3.145 > >+ sensor Wed Jul 18 00:08:38 EDT 2012-Wed Dec 31 19:00:00 EST 1969 from Ben:0x02000000000000000000000660B325BF80 > >--(winlab.anchor.0660B325BF80)-- The location.xoffset and location.yoffset are the x and y locations of the landmark, which are stored at doubles (the CLI recognizes these as doubles so it doesn't prompt you to specify the data type). You can use whatever units you would like for this (feet, meters, etc). Sensor values are specified as 1 byte of physical layer and 16 bytes of ID, but the CLI doesn't know this so you just need to tell it to use a byte[] and enter the data in hex. 2 is the physical layer for WiFi so the first byte is 2. We have to pad the ID with 10 extra bytes (20 zeros) because WiFi only uses 6 bytes of ID. You can also add transmitters as landmarks as well -- these will be used for "live" training data. You should add any objects that you want to localize into the world model as well, but don't put "landmark" in their names and don't give them locations since they are mobile. As a final setup step in the world model you need to set the dimensions of the region. Create another object called "region.<region name>" (for us this is region.winlab) and add a location.maxx and a location.maxy value to set the maximum dimensions of the region. After doing these steps you can run the fingerprint_solver and localization_solver2 and the system will begin to localize by modifying the location.xoffset and locaiont.yoffset values of any non-landmark devices. If you don't want to use live training data from landmark transmitters you can also collect static training points. The gen_training_points.rb script in the grail3_ruby/tools directory can be used to do that. Hopefully that was clear. -Ben > Hello Ben > Many thanks for your previous answer. > We have compiled GRAIL on Ubuntu 11.04 (where we found some mismatch on > makefile execution) and we are performing some tests and trying to > understand how to configure the whole system. > We have a doubt that the documentation has not solved: what is the way (or > convention, or tool...) to setup the network infrastructure (i.e. a 2.4 > Ghz 802.11.x network)? > In other words: what is the way GRAIL identify the devices used as > reference for positioning calculation from other devices i.e. mobile > devices? > > Regards > Giuseppe > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Grailrtls-developers mailing list > Gra...@li... > https://lists.sourceforge.net/lists/listinfo/grailrtls-developers > |
From: Giuseppe O. <be...@op...> - 2012-07-17 17:02:30
|
Hello Ben Many thanks for your previous answer. We have compiled GRAIL on Ubuntu 11.04 (where we found some mismatch on makefile execution) and we are performing some tests and trying to understand how to configure the whole system. We have a doubt that the documentation has not solved: what is the way (or convention, or tool...) to setup the network infrastructure (i.e. a 2.4 Ghz 802.11.x network)? In other words: what is the way GRAIL identify the devices used as reference for positioning calculation from other devices i.e. mobile devices? Regards Giuseppe |
From: <bf...@ed...> - 2012-07-12 03:15:23
|
Hello Giuseppe, The GRAIL platfom itself is agnostic to the hardware that is being used to collect data so long as you can get some basic statistics, like signal strength, from the system. Once you get the RSSI values you can send them into the system and the RSS algorithms, such as localization and mobility detection, will operate as expected without caring about what hardware is providing the data. To capture data we use libpcap with radiotap. Libpcap allows us to see wifi packets and radiotap adds some additional information (such as RSSI) into the packet headers. Read the radiotap page for more information on that: http://www.radiotap.org/ We've written interfaces to the GRAIL system in Java, C++, and Ruby so you could either try to get the code in grailrtls/grail-solvers/src/wifi_sense_layer.cpp to work with your card or you could try to write a small program, for instance with RubyPcap (http://sourceforge.net/projects/rubypcap/) in Ruby or JNetPCap (http://jnetpcap.com/) in Java. A C++ program would use the C interface to libpcap as in our wifi_sense_layer program. I wasn't the person who originally wrote this code, but if you get the RSS values I can help you with the rest of the GRAIL system. -Ben Firner > We are working on the feasibility of a network of environmental sensors in > collaboration with the Earth Sciences Department of Bologna University > (Italy). > Probably we'll have to face the use of embedded pc without Atheros > chipset, so we have a few questions: > Is it possible to configure and use GRAIL for access to wifi cards other > than atheros compatible? > It is for some time that MADWIFI is no longer available on repository for > latest release of Ubuntu. > Is it still needed to support the setup of wireless networks, or can we > use other tools? > > Best Regards > Giuseppe Onorevoli > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Grailrtls-developers mailing list > Gra...@li... > https://lists.sourceforge.net/lists/listinfo/grailrtls-developers > |
From: Giuseppe O. <be...@op...> - 2012-07-11 18:37:54
|
We are working on the feasibility of a network of environmental sensors in collaboration with the Earth Sciences Department of Bologna University (Italy). Probably we'll have to face the use of embedded pc without Atheros chipset, so we have a few questions: Is it possible to configure and use GRAIL for access to wifi cards other than atheros compatible? It is for some time that MADWIFI is no longer available on repository for latest release of Ubuntu. Is it still needed to support the setup of wireless networks, or can we use other tools? Best Regards Giuseppe Onorevoli |
From: <bf...@ed...> - 2012-05-09 15:01:18
|
Do you two need a ref- I mean moderator? -Ben > I'm trying to not get into implementation (where a lot of differences in > opinion take place). > > Let's just say that I think what would be valuable is that returned sets > of uri/aname/cdate/edate/origin/data be returned (best effort) in cdate > order across all entries. (I say bet effort because with streaming this > may not happen and I don't know how such a case should be handled). > > My opinion is that this sorting should be done server side. Others may > have other opinions. > > If you want to discuss actually implementation, email might not be the > best communication channel...we will not be able to appreciate each > others looks of disgust or enjoy each other hitting our own head against > the desk in frustration :) > > Doug > > On 5/8/12 1:57 PM, Robert Moore wrote: >> Do you want to add more parameters to the REST call? A pair of order-by >> (field) and sort (ascending/descending) values? >> >> Do you want to translate from what the world model produces to the >> object you have below (ordereditems/item)? In general I think I want >> the REST interface to be as thin as possible, and returning what the >> World Model returns is the easiest way to do that. >> >> --Rob >> >> On 05/08/2012 12:54 PM, Douglas Motto wrote: >>> I think you are tying this too much to our other disagreement of what >>> you consider a "state". I'm trying NOT to get back into that. >>> >>> >>> My point is simply that the data is date unordered because of the >>> return >>> structure. If you want to keep your structure, then the clients would >>> have to resort if they want that. (I just had this discuss three weeks >>> with a green freshmen student who had issues doing just this "sort" of >>> thing). >>> >>> There's plenty of ways which accomplishes the date order constraint >>> while keeping in-line with json-to-object...I believe the following >>> would be one that works... >>> >>> {ordereditems: >>> [ >>> item:{uri:,n:,l:,o:,c:,e:,d:}, >>> item:{uri:,n:,l:,o:,c:,e:,d:}, >>> ... >>> ] >>> } >>> >>> I don't suggest this naming convention...just trying to be vanilla. >>> >>> My main argument is that if someone requests multiple uris, they'd want >>> them all in order. If they wanted them grouped by uri, they'd make >>> multiple individual requests. Take this argument as you will. >>> >>> >>> Doug >>> >>> On 5/8/12 12:09 PM, Robert Moore wrote: >>>> Our current model of a response is an array of World State objects, >>>> where each World State is: >>>> >>>> WorldState: { >>>> uri:String, >>>> attributes:[attribute1, attribute2, attribute3, ...] >>>> } >>>> >>>> And each attribute is defined as a 5-tuple: >>>> Attribute: { >>>> attributeName:String, >>>> origin:String, >>>> creationDate:Number, >>>> expirationDate:Number, >>>> data:<Variable> >>>> } >>>> >>>> So a response is [WorldState1, WorldState2, WorldState3]. >>>> >>>> You think that the only object should be the response itself (or none >>>> at >>>> all), and each response is then simply an array of scalars and arrays? >>>> I'm a little hesitant to avoid objects completely, since JavaScript >>>> has >>>> such nice object modeling properties, and many JS libraries work well >>>> with objects. >>>> >>>> >>>> >>>> --Rob >>>> >>>> On 05/08/2012 11:55 AM, Douglas Motto wrote: >>>>> Rob, >>>>> >>>>> I think you want to use an array for the uri and attributes to make >>>>> it >>>>> ordered (otherwise it's up to the parser). For example... >>>>> >>>>> Instead of >>>>> >>>>> { >>>>> {uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]}, >>>>> {uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]}, >>>>> ... >>>>> } >>>>> >>>>> you want... >>>>> >>>>> { >>>>> [uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]], >>>>> [uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]], >>>>> ... >>>>> } >>>>> >>>>> or >>>>> >>>>> [ >>>>> [uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]], >>>>> [uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]], >>>>> ... >>>>> ] >>>>> >>>>> >>>>> The important part is to use the array "[]" around each >>>>> uri/attributes, >>>>> not the unordered "{}". >>>>> >>>>> >>>>> >>> Along that same notion, you may even want return an more >>>>> flat >>>>> structured >>>>> >>> return (including uri, and attributes in an array of >>>>> objects), so that >>>>> >>> multi uri returns can be date sorted across all uris >>>>> (not just within a >>>>> >>> uri). >>>>> >>> >>>>> >> >>>>> >> Could you provide a bit more clarity? The attributes are >>>>> an array >>>>> >> already (within a uri), and the uris themselves are >>>>> arrays in a larger >>>>> >> query (I just didn't want to spam one). Do you have an >>>>> example of what >>>>> >> you mean? >>>>> >>>>> Your example of the uri's ee.door.lower and ee.door.upper can be used >>>>> to >>>>> illustrate what I mean....take... >>>>> >>>>> {"uri":"ee.door.lower","attributes":[{"attributeName":"location.xoffset","origin":"Ben","creationDate":1335561756627,"expirationDate":0,"data":"1900.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335622077280,"expirationDate":1335622091279,"data":"1400.0"},{"attributeName":"location. >>>>> xoffset","origin":"romoore","creationDate":1335622091279,"expirationDate":1335622167961,"data":"1350.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335622167961,"expirationDate":0,"data":"1375.0"}]},{"uri":"ee.door.upper","attributes":[{"attributeName":"location.xoffset","origin":"Ben","creationDate":1335562058392,"expirationDate":0,"data":"1900.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335626135385,"expirationDate":1335626166973,"data":"675.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335626166973,"expirationDate":0,"data":"1900.0"}]}, >>>>> >>>>> >>>>> The order of creation dates, if read from top to bottom is... >>>>> >>>>> 1335561756627 >>>>> 1335622077280 >>>>> 1335622167961 >>>>> 1335622167961 >>>>> 1335562058392 >>>>> 1335626135385 >>>>> 1335626166973 >>>>> >>>>> >>>>> Which because of the uri groups is not in order. If one wanted to >>>>> process these in order across all uris, then one would have to do it >>>>> client side and resort....which for a stream would might be an issue >>>>> if >>>>> having to wait till all data is received. A suggestion is to >>>>> flattening >>>>> the return as... >>>>> >>>>> [ >>>>> {uri:,n:,l:,o:,c:,e:,d:}, >>>>> {uri:,n:,l:,o:,c:,e:,d:}, >>>>> {uri:,n:,l:,o:,c:,e:,d:}, >>>>> {uri:,n:,l:,o:,c:,e:,d:}, >>>>> ... >>>>> ] >>>>> >>>>> But then you are sending a lot more "uris". >>>>> >>>>> >>>>> >>>>> Doug >>>>> >>>>> On 5/8/12 10:55 AM, Robert Moore wrote: >>>>>> I've updated it a bit per Doug's suggestion about the uri. >>>>>> >>>>>> URL: >>>>>> http://localhost:9998/grailrest/snapshot/?uri=core.3.anchor.wifi.receiver.060B6BD8.*&attribute=location.xoffset×tamp=1333256400000 >>>>>> >>>>>> Response: >>>>>> [{"uri":"core.3.anchor.wifi.receiver.060B6BD8AED6","attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332887102428,"expirationDate":0,"data":"69.5"}]},{"uri":"core.3.anchor.wifi.receiver.060B6BD8AED5","attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332886618186,"expirationDate":0,"data":"69.0"}]}] >>>>>> >>>>>> URL: >>>>>> http://localhost:9998/grailrest/range/?uri=ee.*&start=0&end=1336453781000&attribute=location.xoffset >>>>>> >>>>>> [{"uri":"ee.chair.105","attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335564959603,"expirationDate":1335565050704,"data":"1600.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335565050704,"expirationDate":1335625674435,"data":"1550.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625674435,"expirationDate":1335625685412,"data":"1500.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625685412,"expirationDate":1335625714146,"data":"1450.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625714146,"expirationDate":0,"data":"1425.0"}]},{"uri":"ee.door.lower","attributes":[{"attributeName":"location.xoffset","origin":"Ben","creationDate":1335561756627,"expirationDate":0,"data":"1900.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335622077280,"expirationDate":1335622091279,"data":"1400.0"},{"attribute N > ame":"loc > a >> t >>> i >>>> o >>>>> n. >>>>>> xoffset","origin":"romoore","creationDate":1335622091279,"expirationDate":1335622167961,"data":"1350.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335622167961,"expirationDate":0,"data":"1375.0"}]},{"uri":"ee.door.upper","attributes":[{"attributeName":"location.xoffset","origin":"Ben","creationDate":1335562058392,"expirationDate":0,"data":"1900.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335626135385,"expirationDate":1335626166973,"data":"675.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335626166973,"expirationDate":0,"data":"1900.0"}]},{"uri":"ee.screen.105","attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335624925370,"expirationDate":0,"data":"1500.0"}]}] >>>>>> >>>>>> URL (error): >>>>>> http://localhost:9998/grailrest/snapshot?url=core.3 >>>>>> >>>>>> Response: >>>>>> [{"uri":"error.missing >>>>>> parameter","attributes":[{"attributeName":"error.message","origin":"grail-rest-server","creationDate":0,"expirationDate":0,"data":"Missing >>>>>> required parameter \"uri\"."}]}] >>>>>> >>>>>> Feedback? >>>>>> >>>>>> --Rob >>>>>> >>>>>> >>>>>> On 05/08/2012 09:51 AM, Robert Moore wrote: >>>>>>> >>>>>>> >>>>>>> On 05/08/2012 08:24 AM, Douglas Motto wrote: >>>>>>>> You may want to put uri first in your json array so that if you >>>>>>>> stream >>>>>>>> parse your response you know the uri before reading the attributes >>>>>>>> for >>>>>>>> mutliple uri returns. >>>>>>> >>>>>>> That makes sense. I'll tweak it to return uri before the >>>>>>> attributes. >>>>>>> >>>>>>>> Along that same notion, you may even want return an more flat >>>>>>>> structured >>>>>>>> return (including uri, and attributes in an array of objects), so >>>>>>>> that >>>>>>>> multi uri returns can be date sorted across all uris (not just >>>>>>>> within a >>>>>>>> uri). >>>>>>>> >>>>>>> >>>>>>> Could you provide a bit more clarity? The attributes are an array >>>>>>> already (within a uri), and the uris themselves are arrays in a >>>>>>> larger >>>>>>> query (I just didn't want to spam one). Do you have an example of >>>>>>> what >>>>>>> you mean? >>>>>>> >>>>>>>> Doug >>>>>>>> >>>>>>>> >>>>>>>> On 5/8/12 12:29 AM, Robert Moore wrote: >>>>>>>>> Since I missed it earlier, an "empty" response looks like this: >>>>>>>>> >>>>>>>>> URL: >>>>>>>>> http://localhost:9998/grailrest/snapshot/?uri=non.existent >>>>>>>>> >>>>>>>>> Response: >>>>>>>>> [] >>>>>>>>> >>>>>>>>> On 05/08/2012 12:22 AM, Robert Moore wrote: >>>>>>>>>> Following-up on my earlier email, a minor tweak in the URI: >>>>>>>>>> >>>>>>>>>> The snapshot URL: >>>>>>>>>> http://localhost:9998/grailrest/snapshot/?uri=core.3.anchor.wifi.receiver.060B6BD8.*&attribute=location.xoffset×tamp=1333256400000 >>>>>>>>>> >>>>>>>>>> Returns: >>>>>>>>>> [{"attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332887102428,"expirationDate":0,"data":"69.5"}],"uri":"core.3.anchor.wifi.receiver.060B6BD8AED6"},{"attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332886618186,"expirationDate":0,"data":"69.0"}],"uri":"core.3.anchor.wifi.receiver.060B6BD8AED5"}] >>>>>>>>>> >>>>>>>>>> The range request URL: >>>>>>>>>> http://localhost:9998/grailrest/range/?uri=ee.*&start=0&end=1336453781000&attribute=location.xoffset >>>>>>>>>> >>>>>>>>>> Returns: >>>>>>>>>> [{"attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335564959603,"expirationDate":1335565050704,"data":"1600.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335565050704,"expirationDate":1335625674435,"data":"1550.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625674435,"expirationDate":1335625685412,"data":"1500.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625685412,"expirationDate":1335625714146,"data":"1450.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625714146,"expirationDate":0,"data":"1425.0"}],"uri":"ee.chair.105"}] >>>>>>>>>> >>>>>>>>>> What does everyone think? I have it in a private repo on >>>>>>>>>> bitbucket >>>>>>>>>> right now, I'll push to Grail later this week after I get some >>>>>>>>>> feedback. >>>>>>>>>> >>>>>>>>>> --Rob >>>>>>>>>> >>>>>>>>>> On 05/07/2012 11:29 PM, Robert Moore wrote: >>>>>>>>>>> Hi GRAIL developers, >>>>>>>>>>> >>>>>>>>>>> I'm putting together a rather quick-and-dirty RESTful >>>>>>>>>>> interface for >>>>>>>>>>> GRAIL that produces JSON output. Here's the first example I >>>>>>>>>>> have, which >>>>>>>>>>> is a simple URI snapshot search: >>>>>>>>>>> >>>>>>>>>>> http://localhost:9998/snapshot?uri=core.2 >>>>>>>>>>> >>>>>>>>>>> [{"attributes":[{"attributeName":"creation","origin":"test.solver","creationDate":1328650583130,"expirationDate":0,"data":""},{"attributeName":"dimension.width","origin":"test.solver","creationDate":1331156841221,"expirationDate":0,"data":"200.0"},{"attributeName":"dimension.height","origin":"test.solver","creationDate":1331156855931,"expirationDate":0,"data":"88.0"},{"attributeName":"dimension.units","origin":"test.solver","creationDate":1331157674031,"expirationDate":0,"data":"feet"},{"attributeName":"image.url","origin":"test.solver","creationDate":1331161316404,"expirationDate":0,"data":"http://eden.rutgers.edu/~romoore/core2.jpg"}],"uri":"core.2"}] >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Just a taste of the JSON being returned. Feel free to comment >>>>>>>>>>> on how we >>>>>>>>>>> should handle things. Obviously I'll be creating more complex >>>>>>>>>>> URL >>>>>>>>>>> parsing, including support for POST and perhaps even session >>>>>>>>>>> management >>>>>>>>>>> later on. >>>>>>>>>>> >>>>>>>>>>> What does everyone think? >>>>>>>>>>> >>>>>>>>>>> --Rob >>>>>>>>>>> >>>>>>>>>>> ------------------------------------------------------------------------------ >>>>>>>>>>> Live Security Virtual Conference >>>>>>>>>>> Exclusive live event will cover all the ways today's security >>>>>>>>>>> and >>>>>>>>>>> threat landscape has changed and how IT managers can respond. >>>>>>>>>>> Discussions >>>>>>>>>>> will include endpoint security, mobile security and the latest >>>>>>>>>>> in malware >>>>>>>>>>> threats. >>>>>>>>>>> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Grailrtls-developers mailing list >>>>>>>>>>> Gra...@li... >>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>>>>>>>>> >>>>>>>>>> ------------------------------------------------------------------------------ >>>>>>>>>> Live Security Virtual Conference >>>>>>>>>> Exclusive live event will cover all the ways today's security >>>>>>>>>> and >>>>>>>>>> threat landscape has changed and how IT managers can respond. >>>>>>>>>> Discussions >>>>>>>>>> will include endpoint security, mobile security and the latest >>>>>>>>>> in malware >>>>>>>>>> threats. >>>>>>>>>> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>>>>>> _______________________________________________ >>>>>>>>>> Grailrtls-developers mailing list >>>>>>>>>> Gra...@li... >>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>>>>>>>> >>>>>>>>> ------------------------------------------------------------------------------ >>>>>>>>> Live Security Virtual Conference >>>>>>>>> Exclusive live event will cover all the ways today's security and >>>>>>>>> threat landscape has changed and how IT managers can respond. >>>>>>>>> Discussions >>>>>>>>> will include endpoint security, mobile security and the latest in >>>>>>>>> malware >>>>>>>>> threats. >>>>>>>>> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>>>>> _______________________________________________ >>>>>>>>> Grailrtls-developers mailing list >>>>>>>>> Gra...@li... >>>>>>>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> ------------------------------------------------------------------------------ >>>>>>> Live Security Virtual Conference >>>>>>> Exclusive live event will cover all the ways today's security and >>>>>>> threat landscape has changed and how IT managers can respond. >>>>>>> Discussions >>>>>>> will include endpoint security, mobile security and the latest in >>>>>>> malware >>>>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>>> _______________________________________________ >>>>>>> Grailrtls-developers mailing list >>>>>>> Gra...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> Live Security Virtual Conference >>>>>> Exclusive live event will cover all the ways today's security and >>>>>> threat landscape has changed and how IT managers can respond. >>>>>> Discussions >>>>>> will include endpoint security, mobile security and the latest in >>>>>> malware >>>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>> _______________________________________________ >>>>>> Grailrtls-developers mailing list >>>>>> Gra...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>>>> >>>>> >>>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Live Security Virtual Conference >>>> Exclusive live event will cover all the ways today's security and >>>> threat landscape has changed and how IT managers can respond. >>>> Discussions >>>> will include endpoint security, mobile security and the latest in >>>> malware >>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>> _______________________________________________ >>>> Grailrtls-developers mailing list >>>> Gra...@li... >>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>> >>> >>> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. >> Discussions >> will include endpoint security, mobile security and the latest in >> malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Grailrtls-developers mailing list >> Gra...@li... >> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers > > > > -- > -------------------------------------------------------- > Douglas Motto > dm...@cs... > > Systems Administrator/Programmer -- LCSR/DCS > Rutgers, The State University of New Jersey > -------------------------------------------------------- > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Grailrtls-developers mailing list > Gra...@li... > https://lists.sourceforge.net/lists/listinfo/grailrtls-developers > |
From: Douglas M. <dm...@cs...> - 2012-05-09 14:58:09
|
I'm trying to not get into implementation (where a lot of differences in opinion take place). Let's just say that I think what would be valuable is that returned sets of uri/aname/cdate/edate/origin/data be returned (best effort) in cdate order across all entries. (I say bet effort because with streaming this may not happen and I don't know how such a case should be handled). My opinion is that this sorting should be done server side. Others may have other opinions. If you want to discuss actually implementation, email might not be the best communication channel...we will not be able to appreciate each others looks of disgust or enjoy each other hitting our own head against the desk in frustration :) Doug On 5/8/12 1:57 PM, Robert Moore wrote: > Do you want to add more parameters to the REST call? A pair of order-by > (field) and sort (ascending/descending) values? > > Do you want to translate from what the world model produces to the > object you have below (ordereditems/item)? In general I think I want > the REST interface to be as thin as possible, and returning what the > World Model returns is the easiest way to do that. > > --Rob > > On 05/08/2012 12:54 PM, Douglas Motto wrote: >> I think you are tying this too much to our other disagreement of what >> you consider a "state". I'm trying NOT to get back into that. >> >> >> My point is simply that the data is date unordered because of the return >> structure. If you want to keep your structure, then the clients would >> have to resort if they want that. (I just had this discuss three weeks >> with a green freshmen student who had issues doing just this "sort" of >> thing). >> >> There's plenty of ways which accomplishes the date order constraint >> while keeping in-line with json-to-object...I believe the following >> would be one that works... >> >> {ordereditems: >> [ >> item:{uri:,n:,l:,o:,c:,e:,d:}, >> item:{uri:,n:,l:,o:,c:,e:,d:}, >> ... >> ] >> } >> >> I don't suggest this naming convention...just trying to be vanilla. >> >> My main argument is that if someone requests multiple uris, they'd want >> them all in order. If they wanted them grouped by uri, they'd make >> multiple individual requests. Take this argument as you will. >> >> >> Doug >> >> On 5/8/12 12:09 PM, Robert Moore wrote: >>> Our current model of a response is an array of World State objects, >>> where each World State is: >>> >>> WorldState: { >>> uri:String, >>> attributes:[attribute1, attribute2, attribute3, ...] >>> } >>> >>> And each attribute is defined as a 5-tuple: >>> Attribute: { >>> attributeName:String, >>> origin:String, >>> creationDate:Number, >>> expirationDate:Number, >>> data:<Variable> >>> } >>> >>> So a response is [WorldState1, WorldState2, WorldState3]. >>> >>> You think that the only object should be the response itself (or none at >>> all), and each response is then simply an array of scalars and arrays? >>> I'm a little hesitant to avoid objects completely, since JavaScript has >>> such nice object modeling properties, and many JS libraries work well >>> with objects. >>> >>> >>> >>> --Rob >>> >>> On 05/08/2012 11:55 AM, Douglas Motto wrote: >>>> Rob, >>>> >>>> I think you want to use an array for the uri and attributes to make it >>>> ordered (otherwise it's up to the parser). For example... >>>> >>>> Instead of >>>> >>>> { >>>> {uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]}, >>>> {uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]}, >>>> ... >>>> } >>>> >>>> you want... >>>> >>>> { >>>> [uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]], >>>> [uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]], >>>> ... >>>> } >>>> >>>> or >>>> >>>> [ >>>> [uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]], >>>> [uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]], >>>> ... >>>> ] >>>> >>>> >>>> The important part is to use the array "[]" around each uri/attributes, >>>> not the unordered "{}". >>>> >>>> >>>> >>> Along that same notion, you may even want return an more flat >>>> structured >>>> >>> return (including uri, and attributes in an array of objects), so that >>>> >>> multi uri returns can be date sorted across all uris (not just within a >>>> >>> uri). >>>> >>> >>>> >> >>>> >> Could you provide a bit more clarity? The attributes are an array >>>> >> already (within a uri), and the uris themselves are arrays in a larger >>>> >> query (I just didn't want to spam one). Do you have an example of what >>>> >> you mean? >>>> >>>> Your example of the uri's ee.door.lower and ee.door.upper can be used to >>>> illustrate what I mean....take... >>>> >>>> {"uri":"ee.door.lower","attributes":[{"attributeName":"location.xoffset","origin":"Ben","creationDate":1335561756627,"expirationDate":0,"data":"1900.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335622077280,"expirationDate":1335622091279,"data":"1400.0"},{"attributeName":"location. >>>> xoffset","origin":"romoore","creationDate":1335622091279,"expirationDate":1335622167961,"data":"1350.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335622167961,"expirationDate":0,"data":"1375.0"}]},{"uri":"ee.door.upper","attributes":[{"attributeName":"location.xoffset","origin":"Ben","creationDate":1335562058392,"expirationDate":0,"data":"1900.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335626135385,"expirationDate":1335626166973,"data":"675.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335626166973,"expirationDate":0,"data":"1900.0"}]}, >>>> >>>> >>>> The order of creation dates, if read from top to bottom is... >>>> >>>> 1335561756627 >>>> 1335622077280 >>>> 1335622167961 >>>> 1335622167961 >>>> 1335562058392 >>>> 1335626135385 >>>> 1335626166973 >>>> >>>> >>>> Which because of the uri groups is not in order. If one wanted to >>>> process these in order across all uris, then one would have to do it >>>> client side and resort....which for a stream would might be an issue if >>>> having to wait till all data is received. A suggestion is to flattening >>>> the return as... >>>> >>>> [ >>>> {uri:,n:,l:,o:,c:,e:,d:}, >>>> {uri:,n:,l:,o:,c:,e:,d:}, >>>> {uri:,n:,l:,o:,c:,e:,d:}, >>>> {uri:,n:,l:,o:,c:,e:,d:}, >>>> ... >>>> ] >>>> >>>> But then you are sending a lot more "uris". >>>> >>>> >>>> >>>> Doug >>>> >>>> On 5/8/12 10:55 AM, Robert Moore wrote: >>>>> I've updated it a bit per Doug's suggestion about the uri. >>>>> >>>>> URL: >>>>> http://localhost:9998/grailrest/snapshot/?uri=core.3.anchor.wifi.receiver.060B6BD8.*&attribute=location.xoffset×tamp=1333256400000 >>>>> >>>>> Response: >>>>> [{"uri":"core.3.anchor.wifi.receiver.060B6BD8AED6","attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332887102428,"expirationDate":0,"data":"69.5"}]},{"uri":"core.3.anchor.wifi.receiver.060B6BD8AED5","attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332886618186,"expirationDate":0,"data":"69.0"}]}] >>>>> >>>>> URL: >>>>> http://localhost:9998/grailrest/range/?uri=ee.*&start=0&end=1336453781000&attribute=location.xoffset >>>>> >>>>> [{"uri":"ee.chair.105","attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335564959603,"expirationDate":1335565050704,"data":"1600.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335565050704,"expirationDate":1335625674435,"data":"1550.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625674435,"expirationDate":1335625685412,"data":"1500.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625685412,"expirationDate":1335625714146,"data":"1450.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625714146,"expirationDate":0,"data":"1425.0"}]},{"uri":"ee.door.lower","attributes":[{"attributeName":"location.xoffset","origin":"Ben","creationDate":1335561756627,"expirationDate":0,"data":"1900.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335622077280,"expirationDate":1335622091279,"data":"1400.0"},{"attributeName":"loc a > t >> i >>> o >>>> n. >>>>> xoffset","origin":"romoore","creationDate":1335622091279,"expirationDate":1335622167961,"data":"1350.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335622167961,"expirationDate":0,"data":"1375.0"}]},{"uri":"ee.door.upper","attributes":[{"attributeName":"location.xoffset","origin":"Ben","creationDate":1335562058392,"expirationDate":0,"data":"1900.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335626135385,"expirationDate":1335626166973,"data":"675.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335626166973,"expirationDate":0,"data":"1900.0"}]},{"uri":"ee.screen.105","attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335624925370,"expirationDate":0,"data":"1500.0"}]}] >>>>> >>>>> URL (error): >>>>> http://localhost:9998/grailrest/snapshot?url=core.3 >>>>> >>>>> Response: >>>>> [{"uri":"error.missing >>>>> parameter","attributes":[{"attributeName":"error.message","origin":"grail-rest-server","creationDate":0,"expirationDate":0,"data":"Missing >>>>> required parameter \"uri\"."}]}] >>>>> >>>>> Feedback? >>>>> >>>>> --Rob >>>>> >>>>> >>>>> On 05/08/2012 09:51 AM, Robert Moore wrote: >>>>>> >>>>>> >>>>>> On 05/08/2012 08:24 AM, Douglas Motto wrote: >>>>>>> You may want to put uri first in your json array so that if you stream >>>>>>> parse your response you know the uri before reading the attributes for >>>>>>> mutliple uri returns. >>>>>> >>>>>> That makes sense. I'll tweak it to return uri before the attributes. >>>>>> >>>>>>> Along that same notion, you may even want return an more flat structured >>>>>>> return (including uri, and attributes in an array of objects), so that >>>>>>> multi uri returns can be date sorted across all uris (not just within a >>>>>>> uri). >>>>>>> >>>>>> >>>>>> Could you provide a bit more clarity? The attributes are an array >>>>>> already (within a uri), and the uris themselves are arrays in a larger >>>>>> query (I just didn't want to spam one). Do you have an example of what >>>>>> you mean? >>>>>> >>>>>>> Doug >>>>>>> >>>>>>> >>>>>>> On 5/8/12 12:29 AM, Robert Moore wrote: >>>>>>>> Since I missed it earlier, an "empty" response looks like this: >>>>>>>> >>>>>>>> URL: >>>>>>>> http://localhost:9998/grailrest/snapshot/?uri=non.existent >>>>>>>> >>>>>>>> Response: >>>>>>>> [] >>>>>>>> >>>>>>>> On 05/08/2012 12:22 AM, Robert Moore wrote: >>>>>>>>> Following-up on my earlier email, a minor tweak in the URI: >>>>>>>>> >>>>>>>>> The snapshot URL: >>>>>>>>> http://localhost:9998/grailrest/snapshot/?uri=core.3.anchor.wifi.receiver.060B6BD8.*&attribute=location.xoffset×tamp=1333256400000 >>>>>>>>> >>>>>>>>> Returns: >>>>>>>>> [{"attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332887102428,"expirationDate":0,"data":"69.5"}],"uri":"core.3.anchor.wifi.receiver.060B6BD8AED6"},{"attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332886618186,"expirationDate":0,"data":"69.0"}],"uri":"core.3.anchor.wifi.receiver.060B6BD8AED5"}] >>>>>>>>> >>>>>>>>> The range request URL: >>>>>>>>> http://localhost:9998/grailrest/range/?uri=ee.*&start=0&end=1336453781000&attribute=location.xoffset >>>>>>>>> >>>>>>>>> Returns: >>>>>>>>> [{"attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335564959603,"expirationDate":1335565050704,"data":"1600.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335565050704,"expirationDate":1335625674435,"data":"1550.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625674435,"expirationDate":1335625685412,"data":"1500.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625685412,"expirationDate":1335625714146,"data":"1450.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625714146,"expirationDate":0,"data":"1425.0"}],"uri":"ee.chair.105"}] >>>>>>>>> >>>>>>>>> What does everyone think? I have it in a private repo on bitbucket >>>>>>>>> right now, I'll push to Grail later this week after I get some feedback. >>>>>>>>> >>>>>>>>> --Rob >>>>>>>>> >>>>>>>>> On 05/07/2012 11:29 PM, Robert Moore wrote: >>>>>>>>>> Hi GRAIL developers, >>>>>>>>>> >>>>>>>>>> I'm putting together a rather quick-and-dirty RESTful interface for >>>>>>>>>> GRAIL that produces JSON output. Here's the first example I have, which >>>>>>>>>> is a simple URI snapshot search: >>>>>>>>>> >>>>>>>>>> http://localhost:9998/snapshot?uri=core.2 >>>>>>>>>> >>>>>>>>>> [{"attributes":[{"attributeName":"creation","origin":"test.solver","creationDate":1328650583130,"expirationDate":0,"data":""},{"attributeName":"dimension.width","origin":"test.solver","creationDate":1331156841221,"expirationDate":0,"data":"200.0"},{"attributeName":"dimension.height","origin":"test.solver","creationDate":1331156855931,"expirationDate":0,"data":"88.0"},{"attributeName":"dimension.units","origin":"test.solver","creationDate":1331157674031,"expirationDate":0,"data":"feet"},{"attributeName":"image.url","origin":"test.solver","creationDate":1331161316404,"expirationDate":0,"data":"http://eden.rutgers.edu/~romoore/core2.jpg"}],"uri":"core.2"}] >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Just a taste of the JSON being returned. Feel free to comment on how we >>>>>>>>>> should handle things. Obviously I'll be creating more complex URL >>>>>>>>>> parsing, including support for POST and perhaps even session management >>>>>>>>>> later on. >>>>>>>>>> >>>>>>>>>> What does everyone think? >>>>>>>>>> >>>>>>>>>> --Rob >>>>>>>>>> >>>>>>>>>> ------------------------------------------------------------------------------ >>>>>>>>>> Live Security Virtual Conference >>>>>>>>>> Exclusive live event will cover all the ways today's security and >>>>>>>>>> threat landscape has changed and how IT managers can respond. Discussions >>>>>>>>>> will include endpoint security, mobile security and the latest in malware >>>>>>>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>>>>>> _______________________________________________ >>>>>>>>>> Grailrtls-developers mailing list >>>>>>>>>> Gra...@li... >>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>>>>>>>> >>>>>>>>> ------------------------------------------------------------------------------ >>>>>>>>> Live Security Virtual Conference >>>>>>>>> Exclusive live event will cover all the ways today's security and >>>>>>>>> threat landscape has changed and how IT managers can respond. Discussions >>>>>>>>> will include endpoint security, mobile security and the latest in malware >>>>>>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>>>>> _______________________________________________ >>>>>>>>> Grailrtls-developers mailing list >>>>>>>>> Gra...@li... >>>>>>>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>>>>>>> >>>>>>>> ------------------------------------------------------------------------------ >>>>>>>> Live Security Virtual Conference >>>>>>>> Exclusive live event will cover all the ways today's security and >>>>>>>> threat landscape has changed and how IT managers can respond. Discussions >>>>>>>> will include endpoint security, mobile security and the latest in malware >>>>>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>>>> _______________________________________________ >>>>>>>> Grailrtls-developers mailing list >>>>>>>> Gra...@li... >>>>>>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> Live Security Virtual Conference >>>>>> Exclusive live event will cover all the ways today's security and >>>>>> threat landscape has changed and how IT managers can respond. Discussions >>>>>> will include endpoint security, mobile security and the latest in malware >>>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>> _______________________________________________ >>>>>> Grailrtls-developers mailing list >>>>>> Gra...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Live Security Virtual Conference >>>>> Exclusive live event will cover all the ways today's security and >>>>> threat landscape has changed and how IT managers can respond. Discussions >>>>> will include endpoint security, mobile security and the latest in malware >>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>> _______________________________________________ >>>>> Grailrtls-developers mailing list >>>>> Gra...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>>> >>>> >>>> >>> >>> ------------------------------------------------------------------------------ >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. Discussions >>> will include endpoint security, mobile security and the latest in malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> Grailrtls-developers mailing list >>> Gra...@li... >>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >> >> >> > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Grailrtls-developers mailing list > Gra...@li... > https://lists.sourceforge.net/lists/listinfo/grailrtls-developers -- -------------------------------------------------------- Douglas Motto dm...@cs... Systems Administrator/Programmer -- LCSR/DCS Rutgers, The State University of New Jersey -------------------------------------------------------- |
From: Robert M. <ro...@cs...> - 2012-05-08 17:57:09
|
Do you want to add more parameters to the REST call? A pair of order-by (field) and sort (ascending/descending) values? Do you want to translate from what the world model produces to the object you have below (ordereditems/item)? In general I think I want the REST interface to be as thin as possible, and returning what the World Model returns is the easiest way to do that. --Rob On 05/08/2012 12:54 PM, Douglas Motto wrote: > I think you are tying this too much to our other disagreement of what > you consider a "state". I'm trying NOT to get back into that. > > > My point is simply that the data is date unordered because of the return > structure. If you want to keep your structure, then the clients would > have to resort if they want that. (I just had this discuss three weeks > with a green freshmen student who had issues doing just this "sort" of > thing). > > There's plenty of ways which accomplishes the date order constraint > while keeping in-line with json-to-object...I believe the following > would be one that works... > > {ordereditems: > [ > item:{uri:,n:,l:,o:,c:,e:,d:}, > item:{uri:,n:,l:,o:,c:,e:,d:}, > ... > ] > } > > I don't suggest this naming convention...just trying to be vanilla. > > My main argument is that if someone requests multiple uris, they'd want > them all in order. If they wanted them grouped by uri, they'd make > multiple individual requests. Take this argument as you will. > > > Doug > > On 5/8/12 12:09 PM, Robert Moore wrote: >> Our current model of a response is an array of World State objects, >> where each World State is: >> >> WorldState: { >> uri:String, >> attributes:[attribute1, attribute2, attribute3, ...] >> } >> >> And each attribute is defined as a 5-tuple: >> Attribute: { >> attributeName:String, >> origin:String, >> creationDate:Number, >> expirationDate:Number, >> data:<Variable> >> } >> >> So a response is [WorldState1, WorldState2, WorldState3]. >> >> You think that the only object should be the response itself (or none at >> all), and each response is then simply an array of scalars and arrays? >> I'm a little hesitant to avoid objects completely, since JavaScript has >> such nice object modeling properties, and many JS libraries work well >> with objects. >> >> >> >> --Rob >> >> On 05/08/2012 11:55 AM, Douglas Motto wrote: >>> Rob, >>> >>> I think you want to use an array for the uri and attributes to make it >>> ordered (otherwise it's up to the parser). For example... >>> >>> Instead of >>> >>> { >>> {uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]}, >>> {uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]}, >>> ... >>> } >>> >>> you want... >>> >>> { >>> [uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]], >>> [uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]], >>> ... >>> } >>> >>> or >>> >>> [ >>> [uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]], >>> [uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]], >>> ... >>> ] >>> >>> >>> The important part is to use the array "[]" around each uri/attributes, >>> not the unordered "{}". >>> >>> >>> >>> Along that same notion, you may even want return an more flat >>> structured >>> >>> return (including uri, and attributes in an array of objects), so that >>> >>> multi uri returns can be date sorted across all uris (not just within a >>> >>> uri). >>> >>> >>> >> >>> >> Could you provide a bit more clarity? The attributes are an array >>> >> already (within a uri), and the uris themselves are arrays in a larger >>> >> query (I just didn't want to spam one). Do you have an example of what >>> >> you mean? >>> >>> Your example of the uri's ee.door.lower and ee.door.upper can be used to >>> illustrate what I mean....take... >>> >>> {"uri":"ee.door.lower","attributes":[{"attributeName":"location.xoffset","origin":"Ben","creationDate":1335561756627,"expirationDate":0,"data":"1900.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335622077280,"expirationDate":1335622091279,"data":"1400.0"},{"attributeName":"location. >>> xoffset","origin":"romoore","creationDate":1335622091279,"expirationDate":1335622167961,"data":"1350.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335622167961,"expirationDate":0,"data":"1375.0"}]},{"uri":"ee.door.upper","attributes":[{"attributeName":"location.xoffset","origin":"Ben","creationDate":1335562058392,"expirationDate":0,"data":"1900.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335626135385,"expirationDate":1335626166973,"data":"675.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335626166973,"expirationDate":0,"data":"1900.0"}]}, >>> >>> >>> The order of creation dates, if read from top to bottom is... >>> >>> 1335561756627 >>> 1335622077280 >>> 1335622167961 >>> 1335622167961 >>> 1335562058392 >>> 1335626135385 >>> 1335626166973 >>> >>> >>> Which because of the uri groups is not in order. If one wanted to >>> process these in order across all uris, then one would have to do it >>> client side and resort....which for a stream would might be an issue if >>> having to wait till all data is received. A suggestion is to flattening >>> the return as... >>> >>> [ >>> {uri:,n:,l:,o:,c:,e:,d:}, >>> {uri:,n:,l:,o:,c:,e:,d:}, >>> {uri:,n:,l:,o:,c:,e:,d:}, >>> {uri:,n:,l:,o:,c:,e:,d:}, >>> ... >>> ] >>> >>> But then you are sending a lot more "uris". >>> >>> >>> >>> Doug >>> >>> On 5/8/12 10:55 AM, Robert Moore wrote: >>>> I've updated it a bit per Doug's suggestion about the uri. >>>> >>>> URL: >>>> http://localhost:9998/grailrest/snapshot/?uri=core.3.anchor.wifi.receiver.060B6BD8.*&attribute=location.xoffset×tamp=1333256400000 >>>> >>>> Response: >>>> [{"uri":"core.3.anchor.wifi.receiver.060B6BD8AED6","attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332887102428,"expirationDate":0,"data":"69.5"}]},{"uri":"core.3.anchor.wifi.receiver.060B6BD8AED5","attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332886618186,"expirationDate":0,"data":"69.0"}]}] >>>> >>>> URL: >>>> http://localhost:9998/grailrest/range/?uri=ee.*&start=0&end=1336453781000&attribute=location.xoffset >>>> >>>> [{"uri":"ee.chair.105","attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335564959603,"expirationDate":1335565050704,"data":"1600.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335565050704,"expirationDate":1335625674435,"data":"1550.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625674435,"expirationDate":1335625685412,"data":"1500.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625685412,"expirationDate":1335625714146,"data":"1450.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625714146,"expirationDate":0,"data":"1425.0"}]},{"uri":"ee.door.lower","attributes":[{"attributeName":"location.xoffset","origin":"Ben","creationDate":1335561756627,"expirationDate":0,"data":"1900.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335622077280,"expirationDate":1335622091279,"data":"1400.0"},{"attributeName":"loca t > i >> o >>> n. >>>> xoffset","origin":"romoore","creationDate":1335622091279,"expirationDate":1335622167961,"data":"1350.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335622167961,"expirationDate":0,"data":"1375.0"}]},{"uri":"ee.door.upper","attributes":[{"attributeName":"location.xoffset","origin":"Ben","creationDate":1335562058392,"expirationDate":0,"data":"1900.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335626135385,"expirationDate":1335626166973,"data":"675.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335626166973,"expirationDate":0,"data":"1900.0"}]},{"uri":"ee.screen.105","attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335624925370,"expirationDate":0,"data":"1500.0"}]}] >>>> >>>> URL (error): >>>> http://localhost:9998/grailrest/snapshot?url=core.3 >>>> >>>> Response: >>>> [{"uri":"error.missing >>>> parameter","attributes":[{"attributeName":"error.message","origin":"grail-rest-server","creationDate":0,"expirationDate":0,"data":"Missing >>>> required parameter \"uri\"."}]}] >>>> >>>> Feedback? >>>> >>>> --Rob >>>> >>>> >>>> On 05/08/2012 09:51 AM, Robert Moore wrote: >>>>> >>>>> >>>>> On 05/08/2012 08:24 AM, Douglas Motto wrote: >>>>>> You may want to put uri first in your json array so that if you stream >>>>>> parse your response you know the uri before reading the attributes for >>>>>> mutliple uri returns. >>>>> >>>>> That makes sense. I'll tweak it to return uri before the attributes. >>>>> >>>>>> Along that same notion, you may even want return an more flat structured >>>>>> return (including uri, and attributes in an array of objects), so that >>>>>> multi uri returns can be date sorted across all uris (not just within a >>>>>> uri). >>>>>> >>>>> >>>>> Could you provide a bit more clarity? The attributes are an array >>>>> already (within a uri), and the uris themselves are arrays in a larger >>>>> query (I just didn't want to spam one). Do you have an example of what >>>>> you mean? >>>>> >>>>>> Doug >>>>>> >>>>>> >>>>>> On 5/8/12 12:29 AM, Robert Moore wrote: >>>>>>> Since I missed it earlier, an "empty" response looks like this: >>>>>>> >>>>>>> URL: >>>>>>> http://localhost:9998/grailrest/snapshot/?uri=non.existent >>>>>>> >>>>>>> Response: >>>>>>> [] >>>>>>> >>>>>>> On 05/08/2012 12:22 AM, Robert Moore wrote: >>>>>>>> Following-up on my earlier email, a minor tweak in the URI: >>>>>>>> >>>>>>>> The snapshot URL: >>>>>>>> http://localhost:9998/grailrest/snapshot/?uri=core.3.anchor.wifi.receiver.060B6BD8.*&attribute=location.xoffset×tamp=1333256400000 >>>>>>>> >>>>>>>> Returns: >>>>>>>> [{"attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332887102428,"expirationDate":0,"data":"69.5"}],"uri":"core.3.anchor.wifi.receiver.060B6BD8AED6"},{"attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332886618186,"expirationDate":0,"data":"69.0"}],"uri":"core.3.anchor.wifi.receiver.060B6BD8AED5"}] >>>>>>>> >>>>>>>> The range request URL: >>>>>>>> http://localhost:9998/grailrest/range/?uri=ee.*&start=0&end=1336453781000&attribute=location.xoffset >>>>>>>> >>>>>>>> Returns: >>>>>>>> [{"attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335564959603,"expirationDate":1335565050704,"data":"1600.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335565050704,"expirationDate":1335625674435,"data":"1550.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625674435,"expirationDate":1335625685412,"data":"1500.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625685412,"expirationDate":1335625714146,"data":"1450.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625714146,"expirationDate":0,"data":"1425.0"}],"uri":"ee.chair.105"}] >>>>>>>> >>>>>>>> What does everyone think? I have it in a private repo on bitbucket >>>>>>>> right now, I'll push to Grail later this week after I get some feedback. >>>>>>>> >>>>>>>> --Rob >>>>>>>> >>>>>>>> On 05/07/2012 11:29 PM, Robert Moore wrote: >>>>>>>>> Hi GRAIL developers, >>>>>>>>> >>>>>>>>> I'm putting together a rather quick-and-dirty RESTful interface for >>>>>>>>> GRAIL that produces JSON output. Here's the first example I have, which >>>>>>>>> is a simple URI snapshot search: >>>>>>>>> >>>>>>>>> http://localhost:9998/snapshot?uri=core.2 >>>>>>>>> >>>>>>>>> [{"attributes":[{"attributeName":"creation","origin":"test.solver","creationDate":1328650583130,"expirationDate":0,"data":""},{"attributeName":"dimension.width","origin":"test.solver","creationDate":1331156841221,"expirationDate":0,"data":"200.0"},{"attributeName":"dimension.height","origin":"test.solver","creationDate":1331156855931,"expirationDate":0,"data":"88.0"},{"attributeName":"dimension.units","origin":"test.solver","creationDate":1331157674031,"expirationDate":0,"data":"feet"},{"attributeName":"image.url","origin":"test.solver","creationDate":1331161316404,"expirationDate":0,"data":"http://eden.rutgers.edu/~romoore/core2.jpg"}],"uri":"core.2"}] >>>>>>>>> >>>>>>>>> >>>>>>>>> Just a taste of the JSON being returned. Feel free to comment on how we >>>>>>>>> should handle things. Obviously I'll be creating more complex URL >>>>>>>>> parsing, including support for POST and perhaps even session management >>>>>>>>> later on. >>>>>>>>> >>>>>>>>> What does everyone think? >>>>>>>>> >>>>>>>>> --Rob >>>>>>>>> >>>>>>>>> ------------------------------------------------------------------------------ >>>>>>>>> Live Security Virtual Conference >>>>>>>>> Exclusive live event will cover all the ways today's security and >>>>>>>>> threat landscape has changed and how IT managers can respond. Discussions >>>>>>>>> will include endpoint security, mobile security and the latest in malware >>>>>>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>>>>> _______________________________________________ >>>>>>>>> Grailrtls-developers mailing list >>>>>>>>> Gra...@li... >>>>>>>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>>>>>>> >>>>>>>> ------------------------------------------------------------------------------ >>>>>>>> Live Security Virtual Conference >>>>>>>> Exclusive live event will cover all the ways today's security and >>>>>>>> threat landscape has changed and how IT managers can respond. Discussions >>>>>>>> will include endpoint security, mobile security and the latest in malware >>>>>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>>>> _______________________________________________ >>>>>>>> Grailrtls-developers mailing list >>>>>>>> Gra...@li... >>>>>>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>>>>>> >>>>>>> ------------------------------------------------------------------------------ >>>>>>> Live Security Virtual Conference >>>>>>> Exclusive live event will cover all the ways today's security and >>>>>>> threat landscape has changed and how IT managers can respond. Discussions >>>>>>> will include endpoint security, mobile security and the latest in malware >>>>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>>> _______________________________________________ >>>>>>> Grailrtls-developers mailing list >>>>>>> Gra...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>>>>> >>>>>> >>>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Live Security Virtual Conference >>>>> Exclusive live event will cover all the ways today's security and >>>>> threat landscape has changed and how IT managers can respond. Discussions >>>>> will include endpoint security, mobile security and the latest in malware >>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>> _______________________________________________ >>>>> Grailrtls-developers mailing list >>>>> Gra...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>>> >>>> ------------------------------------------------------------------------------ >>>> Live Security Virtual Conference >>>> Exclusive live event will cover all the ways today's security and >>>> threat landscape has changed and how IT managers can respond. Discussions >>>> will include endpoint security, mobile security and the latest in malware >>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>> _______________________________________________ >>>> Grailrtls-developers mailing list >>>> Gra...@li... >>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>> >>> >>> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Grailrtls-developers mailing list >> Gra...@li... >> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers > > > |
From: Douglas M. <dm...@cs...> - 2012-05-08 16:54:48
|
I think you are tying this too much to our other disagreement of what you consider a "state". I'm trying NOT to get back into that. My point is simply that the data is date unordered because of the return structure. If you want to keep your structure, then the clients would have to resort if they want that. (I just had this discuss three weeks with a green freshmen student who had issues doing just this "sort" of thing). There's plenty of ways which accomplishes the date order constraint while keeping in-line with json-to-object...I believe the following would be one that works... {ordereditems: [ item:{uri:,n:,l:,o:,c:,e:,d:}, item:{uri:,n:,l:,o:,c:,e:,d:}, ... ] } I don't suggest this naming convention...just trying to be vanilla. My main argument is that if someone requests multiple uris, they'd want them all in order. If they wanted them grouped by uri, they'd make multiple individual requests. Take this argument as you will. Doug On 5/8/12 12:09 PM, Robert Moore wrote: > Our current model of a response is an array of World State objects, > where each World State is: > > WorldState: { > uri:String, > attributes:[attribute1, attribute2, attribute3, ...] > } > > And each attribute is defined as a 5-tuple: > Attribute: { > attributeName:String, > origin:String, > creationDate:Number, > expirationDate:Number, > data:<Variable> > } > > So a response is [WorldState1, WorldState2, WorldState3]. > > You think that the only object should be the response itself (or none at > all), and each response is then simply an array of scalars and arrays? > I'm a little hesitant to avoid objects completely, since JavaScript has > such nice object modeling properties, and many JS libraries work well > with objects. > > > > --Rob > > On 05/08/2012 11:55 AM, Douglas Motto wrote: >> Rob, >> >> I think you want to use an array for the uri and attributes to make it >> ordered (otherwise it's up to the parser). For example... >> >> Instead of >> >> { >> {uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]}, >> {uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]}, >> ... >> } >> >> you want... >> >> { >> [uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]], >> [uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]], >> ... >> } >> >> or >> >> [ >> [uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]], >> [uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]], >> ... >> ] >> >> >> The important part is to use the array "[]" around each uri/attributes, >> not the unordered "{}". >> >> >> >>> Along that same notion, you may even want return an more flat >> structured >> >>> return (including uri, and attributes in an array of objects), so that >> >>> multi uri returns can be date sorted across all uris (not just within a >> >>> uri). >> >>> >> >> >> >> Could you provide a bit more clarity? The attributes are an array >> >> already (within a uri), and the uris themselves are arrays in a larger >> >> query (I just didn't want to spam one). Do you have an example of what >> >> you mean? >> >> Your example of the uri's ee.door.lower and ee.door.upper can be used to >> illustrate what I mean....take... >> >> {"uri":"ee.door.lower","attributes":[{"attributeName":"location.xoffset","origin":"Ben","creationDate":1335561756627,"expirationDate":0,"data":"1900.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335622077280,"expirationDate":1335622091279,"data":"1400.0"},{"attributeName":"location. >> xoffset","origin":"romoore","creationDate":1335622091279,"expirationDate":1335622167961,"data":"1350.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335622167961,"expirationDate":0,"data":"1375.0"}]},{"uri":"ee.door.upper","attributes":[{"attributeName":"location.xoffset","origin":"Ben","creationDate":1335562058392,"expirationDate":0,"data":"1900.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335626135385,"expirationDate":1335626166973,"data":"675.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335626166973,"expirationDate":0,"data":"1900.0"}]}, >> >> >> The order of creation dates, if read from top to bottom is... >> >> 1335561756627 >> 1335622077280 >> 1335622167961 >> 1335622167961 >> 1335562058392 >> 1335626135385 >> 1335626166973 >> >> >> Which because of the uri groups is not in order. If one wanted to >> process these in order across all uris, then one would have to do it >> client side and resort....which for a stream would might be an issue if >> having to wait till all data is received. A suggestion is to flattening >> the return as... >> >> [ >> {uri:,n:,l:,o:,c:,e:,d:}, >> {uri:,n:,l:,o:,c:,e:,d:}, >> {uri:,n:,l:,o:,c:,e:,d:}, >> {uri:,n:,l:,o:,c:,e:,d:}, >> ... >> ] >> >> But then you are sending a lot more "uris". >> >> >> >> Doug >> >> On 5/8/12 10:55 AM, Robert Moore wrote: >>> I've updated it a bit per Doug's suggestion about the uri. >>> >>> URL: >>> http://localhost:9998/grailrest/snapshot/?uri=core.3.anchor.wifi.receiver.060B6BD8.*&attribute=location.xoffset×tamp=1333256400000 >>> >>> Response: >>> [{"uri":"core.3.anchor.wifi.receiver.060B6BD8AED6","attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332887102428,"expirationDate":0,"data":"69.5"}]},{"uri":"core.3.anchor.wifi.receiver.060B6BD8AED5","attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332886618186,"expirationDate":0,"data":"69.0"}]}] >>> >>> URL: >>> http://localhost:9998/grailrest/range/?uri=ee.*&start=0&end=1336453781000&attribute=location.xoffset >>> >>> [{"uri":"ee.chair.105","attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335564959603,"expirationDate":1335565050704,"data":"1600.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335565050704,"expirationDate":1335625674435,"data":"1550.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625674435,"expirationDate":1335625685412,"data":"1500.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625685412,"expirationDate":1335625714146,"data":"1450.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625714146,"expirationDate":0,"data":"1425.0"}]},{"uri":"ee.door.lower","attributes":[{"attributeName":"location.xoffset","origin":"Ben","creationDate":1335561756627,"expirationDate":0,"data":"1900.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335622077280,"expirationDate":1335622091279,"data":"1400.0"},{"attributeName":"locat i > o >> n. >>> xoffset","origin":"romoore","creationDate":1335622091279,"expirationDate":1335622167961,"data":"1350.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335622167961,"expirationDate":0,"data":"1375.0"}]},{"uri":"ee.door.upper","attributes":[{"attributeName":"location.xoffset","origin":"Ben","creationDate":1335562058392,"expirationDate":0,"data":"1900.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335626135385,"expirationDate":1335626166973,"data":"675.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335626166973,"expirationDate":0,"data":"1900.0"}]},{"uri":"ee.screen.105","attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335624925370,"expirationDate":0,"data":"1500.0"}]}] >>> >>> URL (error): >>> http://localhost:9998/grailrest/snapshot?url=core.3 >>> >>> Response: >>> [{"uri":"error.missing >>> parameter","attributes":[{"attributeName":"error.message","origin":"grail-rest-server","creationDate":0,"expirationDate":0,"data":"Missing >>> required parameter \"uri\"."}]}] >>> >>> Feedback? >>> >>> --Rob >>> >>> >>> On 05/08/2012 09:51 AM, Robert Moore wrote: >>>> >>>> >>>> On 05/08/2012 08:24 AM, Douglas Motto wrote: >>>>> You may want to put uri first in your json array so that if you stream >>>>> parse your response you know the uri before reading the attributes for >>>>> mutliple uri returns. >>>> >>>> That makes sense. I'll tweak it to return uri before the attributes. >>>> >>>>> Along that same notion, you may even want return an more flat structured >>>>> return (including uri, and attributes in an array of objects), so that >>>>> multi uri returns can be date sorted across all uris (not just within a >>>>> uri). >>>>> >>>> >>>> Could you provide a bit more clarity? The attributes are an array >>>> already (within a uri), and the uris themselves are arrays in a larger >>>> query (I just didn't want to spam one). Do you have an example of what >>>> you mean? >>>> >>>>> Doug >>>>> >>>>> >>>>> On 5/8/12 12:29 AM, Robert Moore wrote: >>>>>> Since I missed it earlier, an "empty" response looks like this: >>>>>> >>>>>> URL: >>>>>> http://localhost:9998/grailrest/snapshot/?uri=non.existent >>>>>> >>>>>> Response: >>>>>> [] >>>>>> >>>>>> On 05/08/2012 12:22 AM, Robert Moore wrote: >>>>>>> Following-up on my earlier email, a minor tweak in the URI: >>>>>>> >>>>>>> The snapshot URL: >>>>>>> http://localhost:9998/grailrest/snapshot/?uri=core.3.anchor.wifi.receiver.060B6BD8.*&attribute=location.xoffset×tamp=1333256400000 >>>>>>> >>>>>>> Returns: >>>>>>> [{"attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332887102428,"expirationDate":0,"data":"69.5"}],"uri":"core.3.anchor.wifi.receiver.060B6BD8AED6"},{"attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332886618186,"expirationDate":0,"data":"69.0"}],"uri":"core.3.anchor.wifi.receiver.060B6BD8AED5"}] >>>>>>> >>>>>>> The range request URL: >>>>>>> http://localhost:9998/grailrest/range/?uri=ee.*&start=0&end=1336453781000&attribute=location.xoffset >>>>>>> >>>>>>> Returns: >>>>>>> [{"attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335564959603,"expirationDate":1335565050704,"data":"1600.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335565050704,"expirationDate":1335625674435,"data":"1550.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625674435,"expirationDate":1335625685412,"data":"1500.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625685412,"expirationDate":1335625714146,"data":"1450.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625714146,"expirationDate":0,"data":"1425.0"}],"uri":"ee.chair.105"}] >>>>>>> >>>>>>> What does everyone think? I have it in a private repo on bitbucket >>>>>>> right now, I'll push to Grail later this week after I get some feedback. >>>>>>> >>>>>>> --Rob >>>>>>> >>>>>>> On 05/07/2012 11:29 PM, Robert Moore wrote: >>>>>>>> Hi GRAIL developers, >>>>>>>> >>>>>>>> I'm putting together a rather quick-and-dirty RESTful interface for >>>>>>>> GRAIL that produces JSON output. Here's the first example I have, which >>>>>>>> is a simple URI snapshot search: >>>>>>>> >>>>>>>> http://localhost:9998/snapshot?uri=core.2 >>>>>>>> >>>>>>>> [{"attributes":[{"attributeName":"creation","origin":"test.solver","creationDate":1328650583130,"expirationDate":0,"data":""},{"attributeName":"dimension.width","origin":"test.solver","creationDate":1331156841221,"expirationDate":0,"data":"200.0"},{"attributeName":"dimension.height","origin":"test.solver","creationDate":1331156855931,"expirationDate":0,"data":"88.0"},{"attributeName":"dimension.units","origin":"test.solver","creationDate":1331157674031,"expirationDate":0,"data":"feet"},{"attributeName":"image.url","origin":"test.solver","creationDate":1331161316404,"expirationDate":0,"data":"http://eden.rutgers.edu/~romoore/core2.jpg"}],"uri":"core.2"}] >>>>>>>> >>>>>>>> >>>>>>>> Just a taste of the JSON being returned. Feel free to comment on how we >>>>>>>> should handle things. Obviously I'll be creating more complex URL >>>>>>>> parsing, including support for POST and perhaps even session management >>>>>>>> later on. >>>>>>>> >>>>>>>> What does everyone think? >>>>>>>> >>>>>>>> --Rob >>>>>>>> >>>>>>>> ------------------------------------------------------------------------------ >>>>>>>> Live Security Virtual Conference >>>>>>>> Exclusive live event will cover all the ways today's security and >>>>>>>> threat landscape has changed and how IT managers can respond. Discussions >>>>>>>> will include endpoint security, mobile security and the latest in malware >>>>>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>>>> _______________________________________________ >>>>>>>> Grailrtls-developers mailing list >>>>>>>> Gra...@li... >>>>>>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>>>>>> >>>>>>> ------------------------------------------------------------------------------ >>>>>>> Live Security Virtual Conference >>>>>>> Exclusive live event will cover all the ways today's security and >>>>>>> threat landscape has changed and how IT managers can respond. Discussions >>>>>>> will include endpoint security, mobile security and the latest in malware >>>>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>>> _______________________________________________ >>>>>>> Grailrtls-developers mailing list >>>>>>> Gra...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> Live Security Virtual Conference >>>>>> Exclusive live event will cover all the ways today's security and >>>>>> threat landscape has changed and how IT managers can respond. Discussions >>>>>> will include endpoint security, mobile security and the latest in malware >>>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>> _______________________________________________ >>>>>> Grailrtls-developers mailing list >>>>>> Gra...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>>>> >>>>> >>>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Live Security Virtual Conference >>>> Exclusive live event will cover all the ways today's security and >>>> threat landscape has changed and how IT managers can respond. Discussions >>>> will include endpoint security, mobile security and the latest in malware >>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>> _______________________________________________ >>>> Grailrtls-developers mailing list >>>> Gra...@li... >>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>> >>> ------------------------------------------------------------------------------ >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. Discussions >>> will include endpoint security, mobile security and the latest in malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> Grailrtls-developers mailing list >>> Gra...@li... >>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >> >> >> > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Grailrtls-developers mailing list > Gra...@li... > https://lists.sourceforge.net/lists/listinfo/grailrtls-developers -- -------------------------------------------------------- Douglas Motto dm...@cs... Systems Administrator/Programmer -- LCSR/DCS Rutgers, The State University of New Jersey -------------------------------------------------------- |
From: Robert M. <ro...@cs...> - 2012-05-08 16:09:59
|
Our current model of a response is an array of World State objects, where each World State is: WorldState: { uri:String, attributes:[attribute1, attribute2, attribute3, ...] } And each attribute is defined as a 5-tuple: Attribute: { attributeName:String, origin:String, creationDate:Number, expirationDate:Number, data:<Variable> } So a response is [WorldState1, WorldState2, WorldState3]. You think that the only object should be the response itself (or none at all), and each response is then simply an array of scalars and arrays? I'm a little hesitant to avoid objects completely, since JavaScript has such nice object modeling properties, and many JS libraries work well with objects. --Rob On 05/08/2012 11:55 AM, Douglas Motto wrote: > Rob, > > I think you want to use an array for the uri and attributes to make it > ordered (otherwise it's up to the parser). For example... > > Instead of > > { > {uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]}, > {uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]}, > ... > } > > you want... > > { > [uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]], > [uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]], > ... > } > > or > > [ > [uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]], > [uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]], > ... > ] > > > The important part is to use the array "[]" around each uri/attributes, > not the unordered "{}". > > > >>> Along that same notion, you may even want return an more flat > structured > >>> return (including uri, and attributes in an array of objects), so that > >>> multi uri returns can be date sorted across all uris (not just within a > >>> uri). > >>> > >> > >> Could you provide a bit more clarity? The attributes are an array > >> already (within a uri), and the uris themselves are arrays in a larger > >> query (I just didn't want to spam one). Do you have an example of what > >> you mean? > > Your example of the uri's ee.door.lower and ee.door.upper can be used to > illustrate what I mean....take... > > {"uri":"ee.door.lower","attributes":[{"attributeName":"location.xoffset","origin":"Ben","creationDate":1335561756627,"expirationDate":0,"data":"1900.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335622077280,"expirationDate":1335622091279,"data":"1400.0"},{"attributeName":"location. > xoffset","origin":"romoore","creationDate":1335622091279,"expirationDate":1335622167961,"data":"1350.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335622167961,"expirationDate":0,"data":"1375.0"}]},{"uri":"ee.door.upper","attributes":[{"attributeName":"location.xoffset","origin":"Ben","creationDate":1335562058392,"expirationDate":0,"data":"1900.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335626135385,"expirationDate":1335626166973,"data":"675.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335626166973,"expirationDate":0,"data":"1900.0"}]}, > > > The order of creation dates, if read from top to bottom is... > > 1335561756627 > 1335622077280 > 1335622167961 > 1335622167961 > 1335562058392 > 1335626135385 > 1335626166973 > > > Which because of the uri groups is not in order. If one wanted to > process these in order across all uris, then one would have to do it > client side and resort....which for a stream would might be an issue if > having to wait till all data is received. A suggestion is to flattening > the return as... > > [ > {uri:,n:,l:,o:,c:,e:,d:}, > {uri:,n:,l:,o:,c:,e:,d:}, > {uri:,n:,l:,o:,c:,e:,d:}, > {uri:,n:,l:,o:,c:,e:,d:}, > ... > ] > > But then you are sending a lot more "uris". > > > > Doug > > On 5/8/12 10:55 AM, Robert Moore wrote: >> I've updated it a bit per Doug's suggestion about the uri. >> >> URL: >> http://localhost:9998/grailrest/snapshot/?uri=core.3.anchor.wifi.receiver.060B6BD8.*&attribute=location.xoffset×tamp=1333256400000 >> >> Response: >> [{"uri":"core.3.anchor.wifi.receiver.060B6BD8AED6","attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332887102428,"expirationDate":0,"data":"69.5"}]},{"uri":"core.3.anchor.wifi.receiver.060B6BD8AED5","attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332886618186,"expirationDate":0,"data":"69.0"}]}] >> >> URL: >> http://localhost:9998/grailrest/range/?uri=ee.*&start=0&end=1336453781000&attribute=location.xoffset >> >> [{"uri":"ee.chair.105","attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335564959603,"expirationDate":1335565050704,"data":"1600.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335565050704,"expirationDate":1335625674435,"data":"1550.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625674435,"expirationDate":1335625685412,"data":"1500.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625685412,"expirationDate":1335625714146,"data":"1450.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625714146,"expirationDate":0,"data":"1425.0"}]},{"uri":"ee.door.lower","attributes":[{"attributeName":"location.xoffset","origin":"Ben","creationDate":1335561756627,"expirationDate":0,"data":"1900.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335622077280,"expirationDate":1335622091279,"data":"1400.0"},{"attributeName":"locati o > n. >> xoffset","origin":"romoore","creationDate":1335622091279,"expirationDate":1335622167961,"data":"1350.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335622167961,"expirationDate":0,"data":"1375.0"}]},{"uri":"ee.door.upper","attributes":[{"attributeName":"location.xoffset","origin":"Ben","creationDate":1335562058392,"expirationDate":0,"data":"1900.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335626135385,"expirationDate":1335626166973,"data":"675.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335626166973,"expirationDate":0,"data":"1900.0"}]},{"uri":"ee.screen.105","attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335624925370,"expirationDate":0,"data":"1500.0"}]}] >> >> URL (error): >> http://localhost:9998/grailrest/snapshot?url=core.3 >> >> Response: >> [{"uri":"error.missing >> parameter","attributes":[{"attributeName":"error.message","origin":"grail-rest-server","creationDate":0,"expirationDate":0,"data":"Missing >> required parameter \"uri\"."}]}] >> >> Feedback? >> >> --Rob >> >> >> On 05/08/2012 09:51 AM, Robert Moore wrote: >>> >>> >>> On 05/08/2012 08:24 AM, Douglas Motto wrote: >>>> You may want to put uri first in your json array so that if you stream >>>> parse your response you know the uri before reading the attributes for >>>> mutliple uri returns. >>> >>> That makes sense. I'll tweak it to return uri before the attributes. >>> >>>> Along that same notion, you may even want return an more flat structured >>>> return (including uri, and attributes in an array of objects), so that >>>> multi uri returns can be date sorted across all uris (not just within a >>>> uri). >>>> >>> >>> Could you provide a bit more clarity? The attributes are an array >>> already (within a uri), and the uris themselves are arrays in a larger >>> query (I just didn't want to spam one). Do you have an example of what >>> you mean? >>> >>>> Doug >>>> >>>> >>>> On 5/8/12 12:29 AM, Robert Moore wrote: >>>>> Since I missed it earlier, an "empty" response looks like this: >>>>> >>>>> URL: >>>>> http://localhost:9998/grailrest/snapshot/?uri=non.existent >>>>> >>>>> Response: >>>>> [] >>>>> >>>>> On 05/08/2012 12:22 AM, Robert Moore wrote: >>>>>> Following-up on my earlier email, a minor tweak in the URI: >>>>>> >>>>>> The snapshot URL: >>>>>> http://localhost:9998/grailrest/snapshot/?uri=core.3.anchor.wifi.receiver.060B6BD8.*&attribute=location.xoffset×tamp=1333256400000 >>>>>> >>>>>> Returns: >>>>>> [{"attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332887102428,"expirationDate":0,"data":"69.5"}],"uri":"core.3.anchor.wifi.receiver.060B6BD8AED6"},{"attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332886618186,"expirationDate":0,"data":"69.0"}],"uri":"core.3.anchor.wifi.receiver.060B6BD8AED5"}] >>>>>> >>>>>> The range request URL: >>>>>> http://localhost:9998/grailrest/range/?uri=ee.*&start=0&end=1336453781000&attribute=location.xoffset >>>>>> >>>>>> Returns: >>>>>> [{"attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335564959603,"expirationDate":1335565050704,"data":"1600.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335565050704,"expirationDate":1335625674435,"data":"1550.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625674435,"expirationDate":1335625685412,"data":"1500.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625685412,"expirationDate":1335625714146,"data":"1450.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625714146,"expirationDate":0,"data":"1425.0"}],"uri":"ee.chair.105"}] >>>>>> >>>>>> What does everyone think? I have it in a private repo on bitbucket >>>>>> right now, I'll push to Grail later this week after I get some feedback. >>>>>> >>>>>> --Rob >>>>>> >>>>>> On 05/07/2012 11:29 PM, Robert Moore wrote: >>>>>>> Hi GRAIL developers, >>>>>>> >>>>>>> I'm putting together a rather quick-and-dirty RESTful interface for >>>>>>> GRAIL that produces JSON output. Here's the first example I have, which >>>>>>> is a simple URI snapshot search: >>>>>>> >>>>>>> http://localhost:9998/snapshot?uri=core.2 >>>>>>> >>>>>>> [{"attributes":[{"attributeName":"creation","origin":"test.solver","creationDate":1328650583130,"expirationDate":0,"data":""},{"attributeName":"dimension.width","origin":"test.solver","creationDate":1331156841221,"expirationDate":0,"data":"200.0"},{"attributeName":"dimension.height","origin":"test.solver","creationDate":1331156855931,"expirationDate":0,"data":"88.0"},{"attributeName":"dimension.units","origin":"test.solver","creationDate":1331157674031,"expirationDate":0,"data":"feet"},{"attributeName":"image.url","origin":"test.solver","creationDate":1331161316404,"expirationDate":0,"data":"http://eden.rutgers.edu/~romoore/core2.jpg"}],"uri":"core.2"}] >>>>>>> >>>>>>> >>>>>>> Just a taste of the JSON being returned. Feel free to comment on how we >>>>>>> should handle things. Obviously I'll be creating more complex URL >>>>>>> parsing, including support for POST and perhaps even session management >>>>>>> later on. >>>>>>> >>>>>>> What does everyone think? >>>>>>> >>>>>>> --Rob >>>>>>> >>>>>>> ------------------------------------------------------------------------------ >>>>>>> Live Security Virtual Conference >>>>>>> Exclusive live event will cover all the ways today's security and >>>>>>> threat landscape has changed and how IT managers can respond. Discussions >>>>>>> will include endpoint security, mobile security and the latest in malware >>>>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>>> _______________________________________________ >>>>>>> Grailrtls-developers mailing list >>>>>>> Gra...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> Live Security Virtual Conference >>>>>> Exclusive live event will cover all the ways today's security and >>>>>> threat landscape has changed and how IT managers can respond. Discussions >>>>>> will include endpoint security, mobile security and the latest in malware >>>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>> _______________________________________________ >>>>>> Grailrtls-developers mailing list >>>>>> Gra...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Live Security Virtual Conference >>>>> Exclusive live event will cover all the ways today's security and >>>>> threat landscape has changed and how IT managers can respond. Discussions >>>>> will include endpoint security, mobile security and the latest in malware >>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>> _______________________________________________ >>>>> Grailrtls-developers mailing list >>>>> Gra...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>>> >>>> >>>> >>> >>> ------------------------------------------------------------------------------ >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. Discussions >>> will include endpoint security, mobile security and the latest in malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> Grailrtls-developers mailing list >>> Gra...@li... >>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Grailrtls-developers mailing list >> Gra...@li... >> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers > > > |
From: Douglas M. <dm...@cs...> - 2012-05-08 15:55:18
|
Rob, I think you want to use an array for the uri and attributes to make it ordered (otherwise it's up to the parser). For example... Instead of { {uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]}, {uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]}, ... } you want... { [uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]], [uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]], ... } or [ [uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]], [uri:stuff,atrributes:[{n:,l:,o:,c:,e:,d:},{n:,l:,o:,c:,e:,d:},...]], ... ] The important part is to use the array "[]" around each uri/attributes, not the unordered "{}". >>> Along that same notion, you may even want return an more flat structured >>> return (including uri, and attributes in an array of objects), so that >>> multi uri returns can be date sorted across all uris (not just within a >>> uri). >>> >> >> Could you provide a bit more clarity? The attributes are an array >> already (within a uri), and the uris themselves are arrays in a larger >> query (I just didn't want to spam one). Do you have an example of what >> you mean? Your example of the uri's ee.door.lower and ee.door.upper can be used to illustrate what I mean....take... {"uri":"ee.door.lower","attributes":[{"attributeName":"location.xoffset","origin":"Ben","creationDate":1335561756627,"expirationDate":0,"data":"1900.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335622077280,"expirationDate":1335622091279,"data":"1400.0"},{"attributeName":"location. xoffset","origin":"romoore","creationDate":1335622091279,"expirationDate":1335622167961,"data":"1350.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335622167961,"expirationDate":0,"data":"1375.0"}]},{"uri":"ee.door.upper","attributes":[{"attributeName":"location.xoffset","origin":"Ben","creationDate":1335562058392,"expirationDate":0,"data":"1900.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335626135385,"expirationDate":1335626166973,"data":"675.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335626166973,"expirationDate":0,"data":"1900.0"}]}, The order of creation dates, if read from top to bottom is... 1335561756627 1335622077280 1335622167961 1335622167961 1335562058392 1335626135385 1335626166973 Which because of the uri groups is not in order. If one wanted to process these in order across all uris, then one would have to do it client side and resort....which for a stream would might be an issue if having to wait till all data is received. A suggestion is to flattening the return as... [ {uri:,n:,l:,o:,c:,e:,d:}, {uri:,n:,l:,o:,c:,e:,d:}, {uri:,n:,l:,o:,c:,e:,d:}, {uri:,n:,l:,o:,c:,e:,d:}, ... ] But then you are sending a lot more "uris". Doug On 5/8/12 10:55 AM, Robert Moore wrote: > I've updated it a bit per Doug's suggestion about the uri. > > URL: > http://localhost:9998/grailrest/snapshot/?uri=core.3.anchor.wifi.receiver.060B6BD8.*&attribute=location.xoffset×tamp=1333256400000 > > Response: > [{"uri":"core.3.anchor.wifi.receiver.060B6BD8AED6","attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332887102428,"expirationDate":0,"data":"69.5"}]},{"uri":"core.3.anchor.wifi.receiver.060B6BD8AED5","attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332886618186,"expirationDate":0,"data":"69.0"}]}] > > URL: > http://localhost:9998/grailrest/range/?uri=ee.*&start=0&end=1336453781000&attribute=location.xoffset > > [{"uri":"ee.chair.105","attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335564959603,"expirationDate":1335565050704,"data":"1600.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335565050704,"expirationDate":1335625674435,"data":"1550.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625674435,"expirationDate":1335625685412,"data":"1500.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625685412,"expirationDate":1335625714146,"data":"1450.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625714146,"expirationDate":0,"data":"1425.0"}]},{"uri":"ee.door.lower","attributes":[{"attributeName":"location.xoffset","origin":"Ben","creationDate":1335561756627,"expirationDate":0,"data":"1900.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335622077280,"expirationDate":1335622091279,"data":"1400.0"},{"attributeName":"locatio n. > xoffset","origin":"romoore","creationDate":1335622091279,"expirationDate":1335622167961,"data":"1350.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335622167961,"expirationDate":0,"data":"1375.0"}]},{"uri":"ee.door.upper","attributes":[{"attributeName":"location.xoffset","origin":"Ben","creationDate":1335562058392,"expirationDate":0,"data":"1900.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335626135385,"expirationDate":1335626166973,"data":"675.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335626166973,"expirationDate":0,"data":"1900.0"}]},{"uri":"ee.screen.105","attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335624925370,"expirationDate":0,"data":"1500.0"}]}] > > URL (error): > http://localhost:9998/grailrest/snapshot?url=core.3 > > Response: > [{"uri":"error.missing > parameter","attributes":[{"attributeName":"error.message","origin":"grail-rest-server","creationDate":0,"expirationDate":0,"data":"Missing > required parameter \"uri\"."}]}] > > Feedback? > > --Rob > > > On 05/08/2012 09:51 AM, Robert Moore wrote: >> >> >> On 05/08/2012 08:24 AM, Douglas Motto wrote: >>> You may want to put uri first in your json array so that if you stream >>> parse your response you know the uri before reading the attributes for >>> mutliple uri returns. >> >> That makes sense. I'll tweak it to return uri before the attributes. >> >>> Along that same notion, you may even want return an more flat structured >>> return (including uri, and attributes in an array of objects), so that >>> multi uri returns can be date sorted across all uris (not just within a >>> uri). >>> >> >> Could you provide a bit more clarity? The attributes are an array >> already (within a uri), and the uris themselves are arrays in a larger >> query (I just didn't want to spam one). Do you have an example of what >> you mean? >> >>> Doug >>> >>> >>> On 5/8/12 12:29 AM, Robert Moore wrote: >>>> Since I missed it earlier, an "empty" response looks like this: >>>> >>>> URL: >>>> http://localhost:9998/grailrest/snapshot/?uri=non.existent >>>> >>>> Response: >>>> [] >>>> >>>> On 05/08/2012 12:22 AM, Robert Moore wrote: >>>>> Following-up on my earlier email, a minor tweak in the URI: >>>>> >>>>> The snapshot URL: >>>>> http://localhost:9998/grailrest/snapshot/?uri=core.3.anchor.wifi.receiver.060B6BD8.*&attribute=location.xoffset×tamp=1333256400000 >>>>> >>>>> Returns: >>>>> [{"attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332887102428,"expirationDate":0,"data":"69.5"}],"uri":"core.3.anchor.wifi.receiver.060B6BD8AED6"},{"attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332886618186,"expirationDate":0,"data":"69.0"}],"uri":"core.3.anchor.wifi.receiver.060B6BD8AED5"}] >>>>> >>>>> The range request URL: >>>>> http://localhost:9998/grailrest/range/?uri=ee.*&start=0&end=1336453781000&attribute=location.xoffset >>>>> >>>>> Returns: >>>>> [{"attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335564959603,"expirationDate":1335565050704,"data":"1600.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335565050704,"expirationDate":1335625674435,"data":"1550.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625674435,"expirationDate":1335625685412,"data":"1500.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625685412,"expirationDate":1335625714146,"data":"1450.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625714146,"expirationDate":0,"data":"1425.0"}],"uri":"ee.chair.105"}] >>>>> >>>>> What does everyone think? I have it in a private repo on bitbucket >>>>> right now, I'll push to Grail later this week after I get some feedback. >>>>> >>>>> --Rob >>>>> >>>>> On 05/07/2012 11:29 PM, Robert Moore wrote: >>>>>> Hi GRAIL developers, >>>>>> >>>>>> I'm putting together a rather quick-and-dirty RESTful interface for >>>>>> GRAIL that produces JSON output. Here's the first example I have, which >>>>>> is a simple URI snapshot search: >>>>>> >>>>>> http://localhost:9998/snapshot?uri=core.2 >>>>>> >>>>>> [{"attributes":[{"attributeName":"creation","origin":"test.solver","creationDate":1328650583130,"expirationDate":0,"data":""},{"attributeName":"dimension.width","origin":"test.solver","creationDate":1331156841221,"expirationDate":0,"data":"200.0"},{"attributeName":"dimension.height","origin":"test.solver","creationDate":1331156855931,"expirationDate":0,"data":"88.0"},{"attributeName":"dimension.units","origin":"test.solver","creationDate":1331157674031,"expirationDate":0,"data":"feet"},{"attributeName":"image.url","origin":"test.solver","creationDate":1331161316404,"expirationDate":0,"data":"http://eden.rutgers.edu/~romoore/core2.jpg"}],"uri":"core.2"}] >>>>>> >>>>>> >>>>>> Just a taste of the JSON being returned. Feel free to comment on how we >>>>>> should handle things. Obviously I'll be creating more complex URL >>>>>> parsing, including support for POST and perhaps even session management >>>>>> later on. >>>>>> >>>>>> What does everyone think? >>>>>> >>>>>> --Rob >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> Live Security Virtual Conference >>>>>> Exclusive live event will cover all the ways today's security and >>>>>> threat landscape has changed and how IT managers can respond. Discussions >>>>>> will include endpoint security, mobile security and the latest in malware >>>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>> _______________________________________________ >>>>>> Grailrtls-developers mailing list >>>>>> Gra...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Live Security Virtual Conference >>>>> Exclusive live event will cover all the ways today's security and >>>>> threat landscape has changed and how IT managers can respond. Discussions >>>>> will include endpoint security, mobile security and the latest in malware >>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>> _______________________________________________ >>>>> Grailrtls-developers mailing list >>>>> Gra...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>>> >>>> ------------------------------------------------------------------------------ >>>> Live Security Virtual Conference >>>> Exclusive live event will cover all the ways today's security and >>>> threat landscape has changed and how IT managers can respond. Discussions >>>> will include endpoint security, mobile security and the latest in malware >>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>> _______________________________________________ >>>> Grailrtls-developers mailing list >>>> Gra...@li... >>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>> >>> >>> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Grailrtls-developers mailing list >> Gra...@li... >> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Grailrtls-developers mailing list > Gra...@li... > https://lists.sourceforge.net/lists/listinfo/grailrtls-developers -- -------------------------------------------------------- Douglas Motto dm...@cs... Systems Administrator/Programmer -- LCSR/DCS Rutgers, The State University of New Jersey -------------------------------------------------------- |
From: Robert M. <ro...@cs...> - 2012-05-08 14:55:24
|
I've updated it a bit per Doug's suggestion about the uri. URL: http://localhost:9998/grailrest/snapshot/?uri=core.3.anchor.wifi.receiver.060B6BD8.*&attribute=location.xoffset×tamp=1333256400000 Response: [{"uri":"core.3.anchor.wifi.receiver.060B6BD8AED6","attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332887102428,"expirationDate":0,"data":"69.5"}]},{"uri":"core.3.anchor.wifi.receiver.060B6BD8AED5","attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332886618186,"expirationDate":0,"data":"69.0"}]}] URL: http://localhost:9998/grailrest/range/?uri=ee.*&start=0&end=1336453781000&attribute=location.xoffset [{"uri":"ee.chair.105","attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335564959603,"expirationDate":1335565050704,"data":"1600.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335565050704,"expirationDate":1335625674435,"data":"1550.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625674435,"expirationDate":1335625685412,"data":"1500.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625685412,"expirationDate":1335625714146,"data":"1450.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625714146,"expirationDate":0,"data":"1425.0"}]},{"uri":"ee.door.lower","attributes":[{"attributeName":"location.xoffset","origin":"Ben","creationDate":1335561756627,"expirationDate":0,"data":"1900.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335622077280,"expirationDate":1335622091279,"data":"1400.0"},{"attributeName":"location. xoffset","origin":"romoore","creationDate":1335622091279,"expirationDate":1335622167961,"data":"1350.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335622167961,"expirationDate":0,"data":"1375.0"}]},{"uri":"ee.door.upper","attributes":[{"attributeName":"location.xoffset","origin":"Ben","creationDate":1335562058392,"expirationDate":0,"data":"1900.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335626135385,"expirationDate":1335626166973,"data":"675.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335626166973,"expirationDate":0,"data":"1900.0"}]},{"uri":"ee.screen.105","attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335624925370,"expirationDate":0,"data":"1500.0"}]}] URL (error): http://localhost:9998/grailrest/snapshot?url=core.3 Response: [{"uri":"error.missing parameter","attributes":[{"attributeName":"error.message","origin":"grail-rest-server","creationDate":0,"expirationDate":0,"data":"Missing required parameter \"uri\"."}]}] Feedback? --Rob On 05/08/2012 09:51 AM, Robert Moore wrote: > > > On 05/08/2012 08:24 AM, Douglas Motto wrote: >> You may want to put uri first in your json array so that if you stream >> parse your response you know the uri before reading the attributes for >> mutliple uri returns. > > That makes sense. I'll tweak it to return uri before the attributes. > >> Along that same notion, you may even want return an more flat structured >> return (including uri, and attributes in an array of objects), so that >> multi uri returns can be date sorted across all uris (not just within a >> uri). >> > > Could you provide a bit more clarity? The attributes are an array > already (within a uri), and the uris themselves are arrays in a larger > query (I just didn't want to spam one). Do you have an example of what > you mean? > >> Doug >> >> >> On 5/8/12 12:29 AM, Robert Moore wrote: >>> Since I missed it earlier, an "empty" response looks like this: >>> >>> URL: >>> http://localhost:9998/grailrest/snapshot/?uri=non.existent >>> >>> Response: >>> [] >>> >>> On 05/08/2012 12:22 AM, Robert Moore wrote: >>>> Following-up on my earlier email, a minor tweak in the URI: >>>> >>>> The snapshot URL: >>>> http://localhost:9998/grailrest/snapshot/?uri=core.3.anchor.wifi.receiver.060B6BD8.*&attribute=location.xoffset×tamp=1333256400000 >>>> >>>> Returns: >>>> [{"attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332887102428,"expirationDate":0,"data":"69.5"}],"uri":"core.3.anchor.wifi.receiver.060B6BD8AED6"},{"attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332886618186,"expirationDate":0,"data":"69.0"}],"uri":"core.3.anchor.wifi.receiver.060B6BD8AED5"}] >>>> >>>> The range request URL: >>>> http://localhost:9998/grailrest/range/?uri=ee.*&start=0&end=1336453781000&attribute=location.xoffset >>>> >>>> Returns: >>>> [{"attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335564959603,"expirationDate":1335565050704,"data":"1600.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335565050704,"expirationDate":1335625674435,"data":"1550.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625674435,"expirationDate":1335625685412,"data":"1500.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625685412,"expirationDate":1335625714146,"data":"1450.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625714146,"expirationDate":0,"data":"1425.0"}],"uri":"ee.chair.105"}] >>>> >>>> What does everyone think? I have it in a private repo on bitbucket >>>> right now, I'll push to Grail later this week after I get some feedback. >>>> >>>> --Rob >>>> >>>> On 05/07/2012 11:29 PM, Robert Moore wrote: >>>>> Hi GRAIL developers, >>>>> >>>>> I'm putting together a rather quick-and-dirty RESTful interface for >>>>> GRAIL that produces JSON output. Here's the first example I have, which >>>>> is a simple URI snapshot search: >>>>> >>>>> http://localhost:9998/snapshot?uri=core.2 >>>>> >>>>> [{"attributes":[{"attributeName":"creation","origin":"test.solver","creationDate":1328650583130,"expirationDate":0,"data":""},{"attributeName":"dimension.width","origin":"test.solver","creationDate":1331156841221,"expirationDate":0,"data":"200.0"},{"attributeName":"dimension.height","origin":"test.solver","creationDate":1331156855931,"expirationDate":0,"data":"88.0"},{"attributeName":"dimension.units","origin":"test.solver","creationDate":1331157674031,"expirationDate":0,"data":"feet"},{"attributeName":"image.url","origin":"test.solver","creationDate":1331161316404,"expirationDate":0,"data":"http://eden.rutgers.edu/~romoore/core2.jpg"}],"uri":"core.2"}] >>>>> >>>>> >>>>> Just a taste of the JSON being returned. Feel free to comment on how we >>>>> should handle things. Obviously I'll be creating more complex URL >>>>> parsing, including support for POST and perhaps even session management >>>>> later on. >>>>> >>>>> What does everyone think? >>>>> >>>>> --Rob >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Live Security Virtual Conference >>>>> Exclusive live event will cover all the ways today's security and >>>>> threat landscape has changed and how IT managers can respond. Discussions >>>>> will include endpoint security, mobile security and the latest in malware >>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>> _______________________________________________ >>>>> Grailrtls-developers mailing list >>>>> Gra...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>>> >>>> ------------------------------------------------------------------------------ >>>> Live Security Virtual Conference >>>> Exclusive live event will cover all the ways today's security and >>>> threat landscape has changed and how IT managers can respond. Discussions >>>> will include endpoint security, mobile security and the latest in malware >>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>> _______________________________________________ >>>> Grailrtls-developers mailing list >>>> Gra...@li... >>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>> >>> ------------------------------------------------------------------------------ >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. Discussions >>> will include endpoint security, mobile security and the latest in malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> Grailrtls-developers mailing list >>> Gra...@li... >>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >> >> >> > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Grailrtls-developers mailing list > Gra...@li... > https://lists.sourceforge.net/lists/listinfo/grailrtls-developers |
From: Robert M. <ro...@cs...> - 2012-05-08 13:51:16
|
On 05/08/2012 08:24 AM, Douglas Motto wrote: > You may want to put uri first in your json array so that if you stream > parse your response you know the uri before reading the attributes for > mutliple uri returns. That makes sense. I'll tweak it to return uri before the attributes. > Along that same notion, you may even want return an more flat structured > return (including uri, and attributes in an array of objects), so that > multi uri returns can be date sorted across all uris (not just within a > uri). > Could you provide a bit more clarity? The attributes are an array already (within a uri), and the uris themselves are arrays in a larger query (I just didn't want to spam one). Do you have an example of what you mean? > Doug > > > On 5/8/12 12:29 AM, Robert Moore wrote: >> Since I missed it earlier, an "empty" response looks like this: >> >> URL: >> http://localhost:9998/grailrest/snapshot/?uri=non.existent >> >> Response: >> [] >> >> On 05/08/2012 12:22 AM, Robert Moore wrote: >>> Following-up on my earlier email, a minor tweak in the URI: >>> >>> The snapshot URL: >>> http://localhost:9998/grailrest/snapshot/?uri=core.3.anchor.wifi.receiver.060B6BD8.*&attribute=location.xoffset×tamp=1333256400000 >>> >>> Returns: >>> [{"attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332887102428,"expirationDate":0,"data":"69.5"}],"uri":"core.3.anchor.wifi.receiver.060B6BD8AED6"},{"attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332886618186,"expirationDate":0,"data":"69.0"}],"uri":"core.3.anchor.wifi.receiver.060B6BD8AED5"}] >>> >>> The range request URL: >>> http://localhost:9998/grailrest/range/?uri=ee.*&start=0&end=1336453781000&attribute=location.xoffset >>> >>> Returns: >>> [{"attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335564959603,"expirationDate":1335565050704,"data":"1600.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335565050704,"expirationDate":1335625674435,"data":"1550.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625674435,"expirationDate":1335625685412,"data":"1500.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625685412,"expirationDate":1335625714146,"data":"1450.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625714146,"expirationDate":0,"data":"1425.0"}],"uri":"ee.chair.105"}] >>> >>> What does everyone think? I have it in a private repo on bitbucket >>> right now, I'll push to Grail later this week after I get some feedback. >>> >>> --Rob >>> >>> On 05/07/2012 11:29 PM, Robert Moore wrote: >>>> Hi GRAIL developers, >>>> >>>> I'm putting together a rather quick-and-dirty RESTful interface for >>>> GRAIL that produces JSON output. Here's the first example I have, which >>>> is a simple URI snapshot search: >>>> >>>> http://localhost:9998/snapshot?uri=core.2 >>>> >>>> [{"attributes":[{"attributeName":"creation","origin":"test.solver","creationDate":1328650583130,"expirationDate":0,"data":""},{"attributeName":"dimension.width","origin":"test.solver","creationDate":1331156841221,"expirationDate":0,"data":"200.0"},{"attributeName":"dimension.height","origin":"test.solver","creationDate":1331156855931,"expirationDate":0,"data":"88.0"},{"attributeName":"dimension.units","origin":"test.solver","creationDate":1331157674031,"expirationDate":0,"data":"feet"},{"attributeName":"image.url","origin":"test.solver","creationDate":1331161316404,"expirationDate":0,"data":"http://eden.rutgers.edu/~romoore/core2.jpg"}],"uri":"core.2"}] >>>> >>>> >>>> Just a taste of the JSON being returned. Feel free to comment on how we >>>> should handle things. Obviously I'll be creating more complex URL >>>> parsing, including support for POST and perhaps even session management >>>> later on. >>>> >>>> What does everyone think? >>>> >>>> --Rob >>>> >>>> ------------------------------------------------------------------------------ >>>> Live Security Virtual Conference >>>> Exclusive live event will cover all the ways today's security and >>>> threat landscape has changed and how IT managers can respond. Discussions >>>> will include endpoint security, mobile security and the latest in malware >>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>> _______________________________________________ >>>> Grailrtls-developers mailing list >>>> Gra...@li... >>>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >>> >>> ------------------------------------------------------------------------------ >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. Discussions >>> will include endpoint security, mobile security and the latest in malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> Grailrtls-developers mailing list >>> Gra...@li... >>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Grailrtls-developers mailing list >> Gra...@li... >> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers > > > |
From: Douglas M. <dm...@cs...> - 2012-05-08 12:24:50
|
You may want to put uri first in your json array so that if you stream parse your response you know the uri before reading the attributes for mutliple uri returns. Along that same notion, you may even want return an more flat structured return (including uri, and attributes in an array of objects), so that multi uri returns can be date sorted across all uris (not just within a uri). Doug On 5/8/12 12:29 AM, Robert Moore wrote: > Since I missed it earlier, an "empty" response looks like this: > > URL: > http://localhost:9998/grailrest/snapshot/?uri=non.existent > > Response: > [] > > On 05/08/2012 12:22 AM, Robert Moore wrote: >> Following-up on my earlier email, a minor tweak in the URI: >> >> The snapshot URL: >> http://localhost:9998/grailrest/snapshot/?uri=core.3.anchor.wifi.receiver.060B6BD8.*&attribute=location.xoffset×tamp=1333256400000 >> >> Returns: >> [{"attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332887102428,"expirationDate":0,"data":"69.5"}],"uri":"core.3.anchor.wifi.receiver.060B6BD8AED6"},{"attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332886618186,"expirationDate":0,"data":"69.0"}],"uri":"core.3.anchor.wifi.receiver.060B6BD8AED5"}] >> >> The range request URL: >> http://localhost:9998/grailrest/range/?uri=ee.*&start=0&end=1336453781000&attribute=location.xoffset >> >> Returns: >> [{"attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335564959603,"expirationDate":1335565050704,"data":"1600.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335565050704,"expirationDate":1335625674435,"data":"1550.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625674435,"expirationDate":1335625685412,"data":"1500.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625685412,"expirationDate":1335625714146,"data":"1450.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625714146,"expirationDate":0,"data":"1425.0"}],"uri":"ee.chair.105"}] >> >> What does everyone think? I have it in a private repo on bitbucket >> right now, I'll push to Grail later this week after I get some feedback. >> >> --Rob >> >> On 05/07/2012 11:29 PM, Robert Moore wrote: >>> Hi GRAIL developers, >>> >>> I'm putting together a rather quick-and-dirty RESTful interface for >>> GRAIL that produces JSON output. Here's the first example I have, which >>> is a simple URI snapshot search: >>> >>> http://localhost:9998/snapshot?uri=core.2 >>> >>> [{"attributes":[{"attributeName":"creation","origin":"test.solver","creationDate":1328650583130,"expirationDate":0,"data":""},{"attributeName":"dimension.width","origin":"test.solver","creationDate":1331156841221,"expirationDate":0,"data":"200.0"},{"attributeName":"dimension.height","origin":"test.solver","creationDate":1331156855931,"expirationDate":0,"data":"88.0"},{"attributeName":"dimension.units","origin":"test.solver","creationDate":1331157674031,"expirationDate":0,"data":"feet"},{"attributeName":"image.url","origin":"test.solver","creationDate":1331161316404,"expirationDate":0,"data":"http://eden.rutgers.edu/~romoore/core2.jpg"}],"uri":"core.2"}] >>> >>> >>> Just a taste of the JSON being returned. Feel free to comment on how we >>> should handle things. Obviously I'll be creating more complex URL >>> parsing, including support for POST and perhaps even session management >>> later on. >>> >>> What does everyone think? >>> >>> --Rob >>> >>> ------------------------------------------------------------------------------ >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. Discussions >>> will include endpoint security, mobile security and the latest in malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> Grailrtls-developers mailing list >>> Gra...@li... >>> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Grailrtls-developers mailing list >> Gra...@li... >> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Grailrtls-developers mailing list > Gra...@li... > https://lists.sourceforge.net/lists/listinfo/grailrtls-developers -- -------------------------------------------------------- Douglas Motto dm...@cs... Systems Administrator/Programmer -- LCSR/DCS Rutgers, The State University of New Jersey -------------------------------------------------------- |
From: Robert M. <ro...@cs...> - 2012-05-08 04:29:59
|
Since I missed it earlier, an "empty" response looks like this: URL: http://localhost:9998/grailrest/snapshot/?uri=non.existent Response: [] On 05/08/2012 12:22 AM, Robert Moore wrote: > Following-up on my earlier email, a minor tweak in the URI: > > The snapshot URL: > http://localhost:9998/grailrest/snapshot/?uri=core.3.anchor.wifi.receiver.060B6BD8.*&attribute=location.xoffset×tamp=1333256400000 > > Returns: > [{"attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332887102428,"expirationDate":0,"data":"69.5"}],"uri":"core.3.anchor.wifi.receiver.060B6BD8AED6"},{"attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1332886618186,"expirationDate":0,"data":"69.0"}],"uri":"core.3.anchor.wifi.receiver.060B6BD8AED5"}] > > The range request URL: > http://localhost:9998/grailrest/range/?uri=ee.*&start=0&end=1336453781000&attribute=location.xoffset > > Returns: > [{"attributes":[{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335564959603,"expirationDate":1335565050704,"data":"1600.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335565050704,"expirationDate":1335625674435,"data":"1550.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625674435,"expirationDate":1335625685412,"data":"1500.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625685412,"expirationDate":1335625714146,"data":"1450.0"},{"attributeName":"location.xoffset","origin":"romoore","creationDate":1335625714146,"expirationDate":0,"data":"1425.0"}],"uri":"ee.chair.105"}] > > What does everyone think? I have it in a private repo on bitbucket > right now, I'll push to Grail later this week after I get some feedback. > > --Rob > > On 05/07/2012 11:29 PM, Robert Moore wrote: >> Hi GRAIL developers, >> >> I'm putting together a rather quick-and-dirty RESTful interface for >> GRAIL that produces JSON output. Here's the first example I have, which >> is a simple URI snapshot search: >> >> http://localhost:9998/snapshot?uri=core.2 >> >> [{"attributes":[{"attributeName":"creation","origin":"test.solver","creationDate":1328650583130,"expirationDate":0,"data":""},{"attributeName":"dimension.width","origin":"test.solver","creationDate":1331156841221,"expirationDate":0,"data":"200.0"},{"attributeName":"dimension.height","origin":"test.solver","creationDate":1331156855931,"expirationDate":0,"data":"88.0"},{"attributeName":"dimension.units","origin":"test.solver","creationDate":1331157674031,"expirationDate":0,"data":"feet"},{"attributeName":"image.url","origin":"test.solver","creationDate":1331161316404,"expirationDate":0,"data":"http://eden.rutgers.edu/~romoore/core2.jpg"}],"uri":"core.2"}] >> >> >> Just a taste of the JSON being returned. Feel free to comment on how we >> should handle things. Obviously I'll be creating more complex URL >> parsing, including support for POST and perhaps even session management >> later on. >> >> What does everyone think? >> >> --Rob >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Grailrtls-developers mailing list >> Gra...@li... >> https://lists.sourceforge.net/lists/listinfo/grailrtls-developers > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Grailrtls-developers mailing list > Gra...@li... > https://lists.sourceforge.net/lists/listinfo/grailrtls-developers |