I'm not familiar with Firebase, but I don't think it is the same thing as
sqlAlchemy. sqlAlchemy is an ORM, which gives you an object-oriented
abstraction around a database using models. It generates the raw queries
for your specific driver, giving you a generic interface to multiple
database drivers like sqlite, postgres, mysql, etc. I haven't used Django
since like 1.4, and back then they had their own built in ORM, as well as
their own template engine. Seems like now they have pluggable ORMs and
template engines.

I think I might understand the communication you are describing, although I
have to admit that the way you described it was a little hard to follow. It
sounds like you want a single network web service running (a backend
powered by either Django or Flask), and for it to provide the RESTful
interface to your Pyblish clients? If that is the case, then I don't think
you need a database anywhere in that mix unless your web service needs to
save state. If it isn't meant to store real production data (as it may just
be delegating out to other existing services), but you do want it to have
some persistent storage, then it could use an sqlite database for storing
state. sqlite isn't really a scalable solution, in the case where you want
to have two instances of your Pyblish server. Each one would have to store
its own private state. Anyways, it just comes down to whether the service
needs to track stuff like the progress of tasks it might be doing.

Did I follow that architecture properly? The only other thing I could guess
you might have meant was to have a local Pyblish service on each host...
but I highly doubt that is something you meant.



On Mon, Sep 29, 2014 at 7:56 PM, Asi Sudai <[email protected]> wrote:

>  How would the communication look with a database involved? What does a
>> database provide to this picture?
>
>
> I think you would be better off separating between Pyblish and
> Django/Flask where Pyblish don't know about Django and Django don't know
> about Pyblish.
> instead they both communicate to the database like this:
> Pyblish ---> Database <--- Django/Flask
>
> what type of communication you need from between Pyblish and Django
> directly?
>
>
>
>
>
> On Sunday, 28 September 2014 22:47:00 UTC-7, Marcus Ottosson wrote:
>>
>> Thanks Cesar and Asi, it’s getting more clear to me what they both are
>> used for.
>>
>> About sqlAlchemy, or any database such as Firebase like I had considered
>> initially. Ideally, there’d be as few players involved as possible, and it
>> sounds like just using either Flask or Django would be enough to handle
>> this task.
>>
>> Here’s how I’m imagining the communication between the two.
>>
>>    1. Pyblish sends an HTTP request (RESTful or whatever)
>>    2. Django/Flask receives it
>>    3. Django/Flask generates HTML for it
>>    4. User browses to Django/Flask address, e.g.
>>    http://192.168.0.100/pyblish
>>    5. User’s browser polls from address every second, so as to not need
>>    push notifications
>>
>> The request would contain something like:
>>
>> {
>>   "name": "publish",
>>   "source": "\\projects\spiderman\asset\my_asset.mb",
>>   "ip": "192.168.0.20",
>>   "time": "2014-09-29 6:44:12"}
>>
>> From which either Django or Flask could browse to the directory and fetch
>> whatever data is related to the source and gather username and host-name
>> from the ip.
>>
>> How would the communication look with a database involved? What does a
>> database provide to this picture?
>>
>> Best,
>> Marcus
>> ​
>>
>> On 29 September 2014 06:01, Asi Sudai <[email protected]> wrote:
>>
>>> Like Justin said, Django gives you more of a framework, which you may or
>>> may not need.
>>> but what's nice, both are using Jinja template engine, so moving from
>>> one to the other can be easy for little site.
>>>
>>> We're using Django and sqlAlchemy as the ORM ( it's part of the pipeline
>>> anyways )
>>>
>>> There's a nice book called two scoops of django ( for 1.6 but easy to
>>> get working for 1.7 )
>>> I'm not on their marketing team ;) but it's a good book...
>>>
>>> the authors made a great start_project template on github,
>>> I think iit's a good base to start a django project running:
>>> https://github.com/twoscoops/django-twoscoops-project
>>>
>>> hope that helps :)
>>>
>>>
>>> On Saturday, 20 September 2014 19:01:54 UTC-7, Cesar Saez wrote:
>>>>
>>>> I'm no expert, but Flask is a great alternative to Django (less
>>>> overhead), there are plugins for everything you could possibly need and the
>>>> template engine (Jinja2) is even better than Django's one.
>>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Python Programming for Autodesk Maya" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/python_inside_maya/ba80ff04-40b3-4f54-975a-
>>> 94a8dc4ec01c%40googlegroups.com
>>> <https://groups.google.com/d/msgid/python_inside_maya/ba80ff04-40b3-4f54-975a-94a8dc4ec01c%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> *Marcus Ottosson*
>> [email protected]
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/54f5f123-e963-49e2-9404-f798e216bf95%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/54f5f123-e963-49e2-9404-f798e216bf95%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3OP2KrmmHbJ7nZZTHRXEy7AWDedLk3U4UDmgQ7qC%2BgKA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to