Question about combining a web controller and an app component

12 views
Skip to first unread message

Austin Holland

unread,
May 29, 2014, 12:14:11 PM5/29/14
to circuit...@googlegroups.com
So currently I am starting my web interface separate from my main application as can be seen below.  I would like to be able to submit events from my web interface that would be recognized by my RTapp.  What is the best way to go about that. ? 

There are number of ways I can think of using circuits to crack the nut, but looking for some wise input.  

I couldn't really determine from the docs what the difference between a Controller and a Component are and how they may or may not interact.

Thanks in advance for any advice, Austin

from seiproc import *
import seiproc_conf as cfg
import seiproc.web as web

if __name__=="__main__":
  rtapp=RTapp()
  if sys.argv[1]=='rt':
    (RTapp() + Debugger()).run()
  if sys.argv[1]=='cmd':
    # Open a command line interface to interact with system
    pass
  if sys.argv[1]=='web':
    webapp=app=web.Server(("0.0.0.0",8080)) + web.WebRoot() + web.Static("/icons", docroot="/home/analyst/seiproc/tmplt/icons/") + web.Sessions()
    (webapp).run()
  if sys.argv[1]=='rt_graph':
    rt_app=RTapp() 
    print(graph(rt_app))

James Mills

unread,
May 29, 2014, 5:03:24 PM5/29/14
to circuit...@googlegroups.com

Hi Austin,

So running web components along side other parts of your system is totally fine.

You could also think about running your app and web app subsystems separately and connecting them via circuits.node or other api mechanisms.

Cheers
James

--
You received this message because you are subscribed to the Google Groups "circuits" group.
To unsubscribe from this group and stop receiving emails from it, send an email to circuits-user...@googlegroups.com.
To post to this group, send email to circuit...@googlegroups.com.
Visit this group at http://groups.google.com/group/circuits-users.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages