Skip to content

HTTPS clone URL

Subversion checkout URL

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