HAL config in external database?
5 posts • Page 1 of 1
HAL config in external database?
Following Tim's excellent advice given here:
viewtopic.php?f=1&t=956
I have started to appreciate the ease of use and portability of the database engine.
Just a thought - maybe it would be beneficial to store the config in an external database, accessible by other means? The problem with the current model is that it is pretty closed... The fact that it can be queried by xPL messages does help, but may not be most convenient, especially in the web context (with apps it's easier, as they can maintain their own variables based directly on the received messages).
A simple example: on my control website I want to have an icon which displays dawn/dusk. Extracting the information now from HAL is rather complicated (I think?), while querying a mySQL or SQLlite database would take three php lines.
Alternate route might be a webserver (although I would rather avoid it, as it would be my third!), which responds to specific http queries.
viewtopic.php?f=1&t=956
I have started to appreciate the ease of use and portability of the database engine.
Just a thought - maybe it would be beneficial to store the config in an external database, accessible by other means? The problem with the current model is that it is pretty closed... The fact that it can be queried by xPL messages does help, but may not be most convenient, especially in the web context (with apps it's easier, as they can maintain their own variables based directly on the received messages).
A simple example: on my control website I want to have an icon which displays dawn/dusk. Extracting the information now from HAL is rather complicated (I think?), while querying a mySQL or SQLlite database would take three php lines.
Alternate route might be a webserver (although I would rather avoid it, as it would be my third!), which responds to specific http queries.
- Jabberwock
- Posts: 74
- Joined: Fri May 23, 2008 12:41 pm
- Location: Gniezno, Poland
Re: HAL config in external database?
I'm not sure how you are getting Dawn/Dusk status from HAL, but could you use the xPLDawnDusk app on Tom's site. You could then update your database based on it's messages, and your web app could get the current value from the database?
- Tim
- Posts: 84
- Joined: Thu Dec 29, 2005 10:14 am
Re: HAL config in external database?
Yes, but it still requires an external app that would save the Dawn/Dusk message (or the HAL config value) into mySQL database... Could be done, rather easily (even a script could to that), but it seems a waste to write a database handler if most of what HAL is doing is, well, handling a database (but in different format).
- Jabberwock
- Posts: 74
- Joined: Fri May 23, 2008 12:41 pm
- Location: Gniezno, Poland
Re: HAL config in external database?
Sorry for the slow response.
Yes, it's a good idea - and one of the reasons we have added a few new features into xplhal2.
For a start, there's the GOC - global object cache.
It's going to be used as the state tracking, config storing, event tracking point of truth in the network and will support replication between xplhal installs, and into the new xplcloud service (more about that later)
Secondly, there's the 'not quite ready' web services module in xplhal2. it's in the SVN, but not quite ready for the primetime. it should make the next build though.
That allows you to point a web browser request (so, any ajax library) at the xplhal server, and return (or set) the value of any entry in the GOC.
sound useful? I thought so
Yes, it's a good idea - and one of the reasons we have added a few new features into xplhal2.
For a start, there's the GOC - global object cache.
It's going to be used as the state tracking, config storing, event tracking point of truth in the network and will support replication between xplhal installs, and into the new xplcloud service (more about that later)
Secondly, there's the 'not quite ready' web services module in xplhal2. it's in the SVN, but not quite ready for the primetime. it should make the next build though.
That allows you to point a web browser request (so, any ajax library) at the xplhal server, and return (or set) the value of any entry in the GOC.
sound useful? I thought so
-

Ian Lowe - Site Admin
- Posts: 626
- Joined: Mon Dec 12, 2005 1:17 pm
- Location: Glasgow, Scotland
Re: HAL config in external database?
Yes, exactly what I had in mind! Web requests would do quite nicely...
- Jabberwock
- Posts: 74
- Joined: Fri May 23, 2008 12:41 pm
- Location: Gniezno, Poland
5 posts • Page 1 of 1
Bugtracker Latest
- FS#46: Handling invalid xPL messages
- FS#45: Methods to retrieve version info from a state string return a bad value
- FS#44: ConfigItem.ToString doesn't list all items
- FS#43: Using xPLListner.Shutdown does not send a proper END message
- FS#42: xPLListener 'States' cannot be restored -> exception
- FS#41: State is not restored properly
- FS#40: xPLLib is corrupting any messages where the value pair contains an '='
- FS#39: reordering columns doesn't get restored next session
- FS#38: Config update broken for some apps
- FS#37: Create a troubleshooting checklist on the website
