Questions about Ghini.Web

12 views
Skip to first unread message

thay...@yahoo.com

unread,
Apr 29, 2019, 3:09:44 PM4/29/19
to ghini/bauble
Hi Mario,

I have some questions about Ghini.Web:

1) Using the directions in the readme, I have gotten Ghini.Web to work over localhost. I have read that Node can be used as a web-server, instead of Apache. Can you provide some insight on how to open Node to serve the Ghini.Web application over the web?

2) Is there a functional reason for why MongoDB is used instead of PostgreSQL?

-Thayer

Mario Frasca

unread,
Apr 30, 2019, 8:01:17 AM4/30/19
to thayeray via ghini/bauble

Dear Thayer,

ghini.web is a series of prototypes (is it three?), each produced while attempting to get the interest of a garden, or a garden network, or maybe while I was learning some new technology.  the one running on web.ghini.me, that's thought for garden networks.

the directions in the readme are very possibly not quite self-contained.  if you managed to get the software running on localhost, then their goal is achieved!  :-)  if you want to have it visible from outside your local network, you need to dive into security management, maybe you need to set up virtual hosts, I am not so sure, it depends on what's your environment.  you mention Apache, I don't use that.  on ghini.me I have nginx, and I sincerely do not remember all that I had to do in order to securely expose ghini.web as web.ghini.me.  it was all just ordinary reading manuals, following guidelines, checking again with the manuals, and maybe on online communities like stackoverflow.  I do not remember, and since it was just standard stuff that any sysop needs to manage, I did not take notes.  ask your sysop, I would say.

as for why mongodb instead of postgresql… the first prototype (https://github.com/mfrasca/ghini-inception) was indeed using postgresql, connecting to a ghini.desktop database, it was able to show live data, and even to update the view reacting to database changes.  but as said, I did not find any garden sponsoring this development, and I dropped that line.  the second prototype (https://github.com/Ghini/ghini.web) uses mongodb because I hoped to save on development time, and make a start while the requirements hadn't frozen yet.  schema-less mongodb allows me to define database fields just as I need them, try out, go back, without changing existing data.

there's a third prototype (https://github.com/mfrasca/ghini) at which I'm working currently, I'm writing it in Python (server side), using Django, and it's obviously JavaScript client side.  it is a single-page app, will inherit the geographic interface from ghini.web, and the ultimate goal is to have it replace ghini.desktop-3.1.  it is in a very early stage, so don't consider this even as an announcement.  Django is proving itself a great tool.

except for the second ghini.web prototype, you won't find them in the Ghini organization, you have to look into my own github.com/mfrasca profile, that's what I consider my sandbox.

does this answer your questions?  if not, please ask again.  sorry for the delay: we had 10h power outage yesterday, and no internet connection after the first 2h.

cheers,

Mario

--
You received this message because you are subscribed to the Google Groups "ghini/bauble" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bauble+un...@googlegroups.com.
To post to this group, send email to bau...@googlegroups.com.
Visit this group at https://groups.google.com/group/bauble.
For more options, visit https://groups.google.com/d/optout.

thay...@yahoo.com

unread,
Apr 30, 2019, 10:00:16 AM4/30/19
to ghini/bauble
Thanks for this Mario, this is helpful. 
With respect to the schema issues with relational databases being a reason for using MongoDb. I have noticed that you don't use views at all. While I understand that you are trying to be database agnostic, to maintain portability between databases, I am wondering if views would be a possible workaround that would give you greater flexibility for GhiniWeb and other data export functions? 

-Thayer

To unsubscribe from this group and stop receiving emails from it, send an email to bau...@googlegroups.com.

Mario Frasca

unread,
Apr 30, 2019, 11:49:46 AM4/30/19
to thayeray via ghini/bauble
On 30/04/2019 09:00, thayeray via ghini/bauble wrote:
> Thanks for this Mario, this is helpful. 
> With respect to the schema issues with relational databases being a
> reason for using MongoDb.

well, no, not exactly: there is no schema issue in general.  it would be
correct if you added "at this stage in prototyping".


> I have noticed that you don't use views at all. While I understand
> that you are trying to be database agnostic, to maintain portability
> between databases, I am wondering if views would be a possible
> workaround that would give you greater flexibility for GhiniWeb and
> other data export functions?

I don't see the need and I don't see how.  when working relationally,
I'm using a database framework, it was SQLAlchemy, it's become Django. 
in both cases, the database schema is produced by the framework, not by
me manually.  if the framework chooses to go through relational views,
it may do so, I prefer not to know about it, and to focus on using the
framework. 

if you look in the code (query builder, quick csv export), you will see
that ghini.desktop is able to navigate the database structure thanks to
the framework.  even more so when executing queries, where the software
parses the query string, builds a query object, again very much
database-agnostic, the framework then evaluates this query object by
translating, optimizing and executing it against the concrete database
engine, to produce a result set.  it's a bit complex and rewriting the
query parser was a very interesting part to do.

I'm not sure if you (or the garden you work for) have a concrete
question, if so, please contact me in private: at the moment I'm
available for a professional assignment. 

in the meanwhile, I'm working at the ghini reloaded family, and I hope
to publish a new on-line site sometime in June.  if you want to make
sure the first versions of ghini reloaded satisfies your needs, please
share your database export.  (https://github.com/mfrasca/ghini/issues/1)

cheers,

Mario


>
> -Thayer
>

Reply all
Reply to author
Forward
0 new messages