Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 150 lines (121 sloc) 5.242 kB
ab3d9bb @mmeisinger base service and process, service startup
mmeisinger authored
1 ==================================================
b2b045b @mmeisinger README updated with dependencies
mmeisinger authored
2 LCAarch - OOI Release 1 LCA architecture prototype
ab3d9bb @mmeisinger base service and process, service startup
mmeisinger authored
3 ==================================================
db03ff6 @mmeisinger Bootstrap class and core service structure
mmeisinger authored
4
b2b045b @mmeisinger README updated with dependencies
mmeisinger authored
5 April 2010 - May 2010
ab3d9bb @mmeisinger base service and process, service startup
mmeisinger authored
6
b2b045b @mmeisinger README updated with dependencies
mmeisinger authored
7 This project provides a service framwork and auxilliary functions for running
8 architecturally complete, but functionally limited versions of all the
9 services of the OOI release 1 system with their full architectural dependencies.
10
11 The "core" part of LCAarch provides base classes and a framework for spawnable,
12 message communicating processes, for services with defined names, for
13 bootstrapping the system, for managing logging and configuration etc.
14
15 For more information, plese see:
16 http://www.oceanobservatories.org/spaces/display/CIDev/LCAARCH+Development+Project
ab3d9bb @mmeisinger base service and process, service startup
mmeisinger authored
17
18 This project and relies on selected external packages, such as Magnet, etc.
b2b045b @mmeisinger README updated with dependencies
mmeisinger authored
19 LCAarch is compatible with Python 2.5 and higher, but not Python 3.x
db03ff6 @mmeisinger Bootstrap class and core service structure
mmeisinger authored
20
b2b045b @mmeisinger README updated with dependencies
mmeisinger authored
21 Get LCAarch with
ab3d9bb @mmeisinger base service and process, service startup
mmeisinger authored
22 ::
23 git clone git@amoeba.ucsd.edu:lcaarch.git
4715758 @mmeisinger removed test from boostrap, changed datastore for new msg format
mmeisinger authored
24
ab3d9bb @mmeisinger base service and process, service startup
mmeisinger authored
25 Usage
26 =====
4715758 @mmeisinger removed test from boostrap, changed datastore for new msg format
mmeisinger authored
27
d9eb8b7 @mmeisinger package init, ts test
mmeisinger authored
28 (all subsequent steps assume start from lcaarch/ dir)
29
b2b045b @mmeisinger README updated with dependencies
mmeisinger authored
30 Start empty CC ("Magnet" Python Capability Container) shell with:
ab3d9bb @mmeisinger base service and process, service startup
mmeisinger authored
31 ::
d9eb8b7 @mmeisinger package init, ts test
mmeisinger authored
32 twistd -n magnet -h amoeba.ucsd.edu
3a84fde @mmeisinger Bootstrap improvements, procutils, datastore test
mmeisinger authored
33
e710e44 @mmeisinger CC agent with announcement on identification request; can spawn a pro…
mmeisinger authored
34 (to end a magnet container shell, press Ctrl-D Ctrl-C)
35
3a84fde @mmeisinger Bootstrap improvements, procutils, datastore test
mmeisinger authored
36 Start system by executing within the CC shell:
ab3d9bb @mmeisinger base service and process, service startup
mmeisinger authored
37 ><>
38 from ion.core import bootstrap
39 bootstrap.start()
40
d9eb8b7 @mmeisinger package init, ts test
mmeisinger authored
41 Alternatively from shell executing a script:
42 ::
43 twistd -n magnet -h amoeba.ucsd.edu res/scripts/bootstrap.py
e710e44 @mmeisinger CC agent with announcement on identification request; can spawn a pro…
mmeisinger authored
44 twistd -n magnet -h amoeba.ucsd.edu res/scripts/newcc.py
d9eb8b7 @mmeisinger package init, ts test
mmeisinger authored
45
b78736b @mmeisinger changed readme; make sure to update and install latest magnet
mmeisinger authored
46 Run trial test cases (recursively)
d9eb8b7 @mmeisinger package init, ts test
mmeisinger authored
47 ::
e710e44 @mmeisinger CC agent with announcement on identification request; can spawn a pro…
mmeisinger authored
48 trial ion
b78736b @mmeisinger changed readme; make sure to update and install latest magnet
mmeisinger authored
49 trial ion.core
50 trial ion.services.coi.test.test_resource_registry
d9eb8b7 @mmeisinger package init, ts test
mmeisinger authored
51
cad868a @mmeisinger Updated README to correct magnet dependency: now master
mmeisinger authored
52 A good learning example is the HelloService
53 ::
54 trial ion.play.test.test_hello
55
56 Or in the CC shell:
57 ><>
58 from ion.play import hello_service
59 spawn(hello_service)
60 send(1, {'op':'hello','content':'Hello you there!'})
61
62 from ion.play.hello_service import HelloServiceClient
63 hc = HelloServiceClient()
64 hc.hello()
65
ab3d9bb @mmeisinger base service and process, service startup
mmeisinger authored
66
67 Install the dependencies: Magnet (see Magnet's Readme)
68 ======================================================
69 Recommendation:
70 Create a virtualenv for installing Magnet and its dependencies.
71
b2b045b @mmeisinger README updated with dependencies
mmeisinger authored
72 Twisted Framework
73 -----------------
ab3d9bb @mmeisinger base service and process, service startup
mmeisinger authored
74 ::
75 easy_install twisted
76
77 txAMQP
78 ------
79 ::
80 easy_install txamqp
81
b2b045b @mmeisinger README updated with dependencies
mmeisinger authored
82 SimpleJSON (only when running Python2.5)
83 ----------------------------------------
84 ::
85 easy_install simplejson
86
ab3d9bb @mmeisinger base service and process, service startup
mmeisinger authored
87 carrot (use txamqp branch)
88 ----------------------
89 ::
90 git clone git://amoeba.ucsd.edu/carrot.git
91 (cd carrot; git checkout -b txamqp origin/txamqp)
92 (cd carrot; python setup.py install)
93
cad868a @mmeisinger Updated README to correct magnet dependency: now master
mmeisinger authored
94 Install the Magnet package [NEED Magent 0.3.4] (use master branch)
95 ------------------------------------------------------------------
ab3d9bb @mmeisinger base service and process, service startup
mmeisinger authored
96 Get the latest version of the repository, if you haven't already.
97 ::
98 git clone git://amoeba.ucsd.edu/magnet.git # no ooi credential
99 # OR
100 git clone git@amoeba.ucsd.edu:magnet.git # need ooi credential
101 (cd magnet; python setup.py install)
b78736b @mmeisinger changed readme; make sure to update and install latest magnet
mmeisinger authored
102
103
104 Note:
105 =====
106 This project dependes closely on magnet. Whenever you do a "git pull" on
107 this project, there is a chance that you need to update and install magnet
cad868a @mmeisinger Updated README to correct magnet dependency: now master
mmeisinger authored
108 again (see above). Please review the branch logs for any hints.
c43dc6c @mmeisinger Readme appended with last changes, OTP functions in base_process
mmeisinger authored
109
110
111 ---------------------------------------------------------------------------
112 Change log:
113 ===========
114
e710e44 @mmeisinger CC agent with announcement on identification request; can spawn a pro…
mmeisinger authored
115 2010-05-16:
116 - Removed support for BaseProcess.send_message and reply_message. Always use
117 send, reply and rpc_send now.
118 - Any BaseProcess instance can now spawn_child() other processes.
119 - Removed RpcClient class, because every process can do rpc_send()
120 - Service processes now also listen to their service name's queue. The service
121 name is determined from the service declaration. Two processes will listen
122 to the same queue and take messages round robin from the queue.
123 - Startup arguments evaluated, for instance to start with system name set:
124 twistd -n magnet -a sysname=mysys
125 twistd -n magnet -a "{'sysname':'mysys'}"
126 - Added capability container agent process. Start with:
127 twistd -n magnet res/scripts/newcc.py
128 Agents announce themselves to others in the same system and can spawn procs.
129 - Name scope 'local' for messaging names means now really local to one container.
130 Use scope 'system' for names unique for each bootstrapped system. Do not use
131 global names, because they will clash.
132 - Less verbose trace output for process init messages and changes to other
133 trace output as well.
bc50a38 @mmeisinger Changed BaseServiceClient __init__ args and all client impls; takes n…
mmeisinger authored
134 - Changed BaseServiceClient and tests. Initializer arguments different.
cad868a @mmeisinger Updated README to correct magnet dependency: now master
mmeisinger authored
135 - Using master branch of magnet now
7a9f54a @mmeisinger python 2.5 compatibility: changed .format to % and json import
mmeisinger authored
136 2010-05-10:
137 - Based on entries in config files, service process modules are sought and
138 loaded in order to collect the service process declarations. This enables
139 a registration of services with versions and dependencies on startup
c43dc6c @mmeisinger Readme appended with last changes, OTP functions in base_process
mmeisinger authored
140 2010-05-06:
141 - Refactored the BaseProcess class.
142 - You can now do RPC directly from the process, via self.rpc_send without
5ea10a7 @mmeisinger made IonTestCase and all tests PEP8 compliant
mmeisinger authored
143 the need for an RpcClient. Works even with other messages coming in at the
144 same time (using the conv-id)
c43dc6c @mmeisinger Readme appended with last changes, OTP functions in base_process
mmeisinger authored
145 - Added aliases: self.send, self.reply (use these now)
146 - Process instance can be spawned via self.spawn()
147 - Provided an easier to use BaseServiceClient, which uses a default service
148 name lookup. Accepts BaseProcess instance as argument to use for sending/
149 receiving service calls.
Something went wrong with that request. Please try again.