Skip to content
Newer
Older
100644 208 lines (176 sloc) 7.81 KB
ab3d9bb base service and process, service startup
mmeisinger authored Apr 19, 2010
1 ==================================================
b2b045b README updated with dependencies
Michael Meisinger authored May 17, 2010
2 LCAarch - OOI Release 1 LCA architecture prototype
ab3d9bb base service and process, service startup
mmeisinger authored Apr 19, 2010
3 ==================================================
db03ff6 Bootstrap class and core service structure
mmeisinger authored Apr 15, 2010
4
b2b045b README updated with dependencies
Michael Meisinger authored May 17, 2010
5 April 2010 - May 2010
ab3d9bb base service and process, service startup
mmeisinger authored Apr 19, 2010
6
b2b045b README updated with dependencies
Michael Meisinger authored May 17, 2010
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 PEP8 compliance
Michael Meisinger authored May 18, 2010
10 In "shore" a data distribution network based on pub-sub messaging with underlying
11 infrastructure services (security, persistence) and provisioning.
b2b045b README updated with dependencies
Michael Meisinger authored May 17, 2010
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 PEP8 compliance
Michael Meisinger authored May 19, 2010
17 For more information, please see:
b2b045b README updated with dependencies
Michael Meisinger authored May 17, 2010
18 http://www.oceanobservatories.org/spaces/display/CIDev/LCAARCH+Development+Project
ab3d9bb base service and process, service startup
mmeisinger authored Apr 19, 2010
19
b2b045b README updated with dependencies
Michael Meisinger authored May 17, 2010
20 LCAarch is compatible with Python 2.5 and higher, but not Python 3.x
ad37c05 PEP8 compliance
Michael Meisinger authored May 19, 2010
21 This project has as dependencies Magnet, Carrot, txAMQP, Twisted and pycassa,
b93d956 Fixing trial errors and adding comments
David Stuebe authored Jul 23, 2010
22 and msgpack
ad37c05 PEP8 compliance
Michael Meisinger authored May 19, 2010
23 (see below)
db03ff6 Bootstrap class and core service structure
mmeisinger authored Apr 15, 2010
24
b2b045b README updated with dependencies
Michael Meisinger authored May 17, 2010
25 Get LCAarch with
ab3d9bb base service and process, service startup
mmeisinger authored Apr 19, 2010
26 ::
27 git clone git@amoeba.ucsd.edu:lcaarch.git
4715758 removed test from boostrap, changed datastore for new msg format
mmeisinger authored Apr 16, 2010
28
ab3d9bb base service and process, service startup
mmeisinger authored Apr 19, 2010
29 Usage
30 =====
4715758 removed test from boostrap, changed datastore for new msg format
mmeisinger authored Apr 17, 2010
31
d9eb8b7 package init, ts test
Michael Meisinger authored Apr 25, 2010
32 (all subsequent steps assume start from lcaarch/ dir)
33
b2b045b README updated with dependencies
Michael Meisinger authored May 17, 2010
34 Start empty CC ("Magnet" Python Capability Container) shell with:
ab3d9bb base service and process, service startup
mmeisinger authored Apr 19, 2010
35 ::
d9eb8b7 package init, ts test
Michael Meisinger authored Apr 25, 2010
36 twistd -n magnet -h amoeba.ucsd.edu
3a84fde Bootstrap improvements, procutils, datastore test
mmeisinger authored Apr 15, 2010
37
e710e44 CC agent with announcement on identification request; can spawn a pro…
Michael Meisinger authored May 16, 2010
38 (to end a magnet container shell, press Ctrl-D Ctrl-C)
39
3a84fde Bootstrap improvements, procutils, datastore test
mmeisinger authored Apr 16, 2010
40 Start system by executing within the CC shell:
ab3d9bb base service and process, service startup
mmeisinger authored Apr 19, 2010
41 ><>
42 from ion.core import bootstrap
43 bootstrap.start()
44
d9eb8b7 package init, ts test
Michael Meisinger authored Apr 25, 2010
45 Alternatively from shell executing a script:
46 ::
47 twistd -n magnet -h amoeba.ucsd.edu res/scripts/bootstrap.py
e710e44 CC agent with announcement on identification request; can spawn a pro…
Michael Meisinger authored May 17, 2010
48 twistd -n magnet -h amoeba.ucsd.edu res/scripts/newcc.py
d9eb8b7 package init, ts test
Michael Meisinger authored Apr 25, 2010
49
b78736b changed readme; make sure to update and install latest magnet
Michael Meisinger authored May 1, 2010
50 Run trial test cases (recursively)
d9eb8b7 package init, ts test
Michael Meisinger authored Apr 25, 2010
51 ::
e710e44 CC agent with announcement on identification request; can spawn a pro…
Michael Meisinger authored May 17, 2010
52 trial ion
b78736b changed readme; make sure to update and install latest magnet
Michael Meisinger authored May 1, 2010
53 trial ion.core
54 trial ion.services.coi.test.test_resource_registry
d9eb8b7 package init, ts test
Michael Meisinger authored Apr 25, 2010
55
cad868a Updated README to correct magnet dependency: now master
Michael Meisinger authored May 18, 2010
56 A good learning example is the HelloService
57 ::
58 trial ion.play.test.test_hello
59
60 Or in the CC shell:
61 ><>
62 from ion.play import hello_service
63 spawn(hello_service)
64 send(1, {'op':'hello','content':'Hello you there!'})
65
66 from ion.play.hello_service import HelloServiceClient
342829f Local configuration override in ionlocal.config. Unit tests get broke…
Michael Meisinger authored May 20, 2010
67 hc = HelloServiceClient()
cad868a Updated README to correct magnet dependency: now master
Michael Meisinger authored May 18, 2010
68 hc.hello()
69
ab3d9bb base service and process, service startup
mmeisinger authored Apr 19, 2010
70
71 Install the dependencies: Magnet (see Magnet's Readme)
72 ======================================================
73 Recommendation:
74 Create a virtualenv for installing Magnet and its dependencies.
75
b2b045b README updated with dependencies
Michael Meisinger authored May 17, 2010
76 Twisted Framework
77 -----------------
ab3d9bb base service and process, service startup
mmeisinger authored Apr 19, 2010
78 ::
79 easy_install twisted
80
81 txAMQP
82 ------
83 ::
84 easy_install txamqp
85
ad37c05 PEP8 compliance
Michael Meisinger authored May 19, 2010
86 Pycassa
87 -------
88 ::
89 easy_install -U --find-links http://ooici.net/packages pycassa
90
b2b045b README updated with dependencies
Michael Meisinger authored May 17, 2010
91 SimpleJSON (only when running Python2.5)
92 ----------------------------------------
93 ::
94 easy_install simplejson
95
ab3d9bb base service and process, service startup
mmeisinger authored Apr 19, 2010
96 carrot (use txamqp branch)
ad37c05 PEP8 compliance
Michael Meisinger authored May 19, 2010
97 --------------------------
ab3d9bb base service and process, service startup
mmeisinger authored Apr 19, 2010
98 ::
99 git clone git://amoeba.ucsd.edu/carrot.git
100 (cd carrot; git checkout -b txamqp origin/txamqp)
101 (cd carrot; python setup.py install)
b93d956 Fixing trial errors and adding comments
David Stuebe authored Jul 23, 2010
102
103 MsgPack
104 ----------------------------
105 ::
106 easy_install msgpack-python
ab3d9bb base service and process, service startup
mmeisinger authored Apr 19, 2010
107
ad37c05 PEP8 compliance
Michael Meisinger authored May 19, 2010
108 Install the Magnet package [NEED Magent 0.3.4 on master branch]
cad868a Updated README to correct magnet dependency: now master
Michael Meisinger authored May 18, 2010
109 ------------------------------------------------------------------
ab3d9bb base service and process, service startup
mmeisinger authored Apr 19, 2010
110 Get the latest version of the repository, if you haven't already.
111 ::
112 git clone git://amoeba.ucsd.edu/magnet.git # no ooi credential
113 # OR
114 git clone git@amoeba.ucsd.edu:magnet.git # need ooi credential
115 (cd magnet; python setup.py install)
b78736b changed readme; make sure to update and install latest magnet
Michael Meisinger authored May 1, 2010
116
117
118 Note:
119 =====
120 This project dependes closely on magnet. Whenever you do a "git pull" on
121 this project, there is a chance that you need to update and install magnet
cad868a Updated README to correct magnet dependency: now master
Michael Meisinger authored May 18, 2010
122 again (see above). Please review the branch logs for any hints.
c43dc6c Readme appended with last changes, OTP functions in base_process
Michael Meisinger authored May 10, 2010
123
124
125 ---------------------------------------------------------------------------
126 Change log:
127 ===========
128
b93d956 Fixing trial errors and adding comments
David Stuebe authored Jul 23, 2010
129 2010-07-23:
130 - Refactored the Registry Services to inherit from a common base class. This
131 will allow easier implementation of the many registries in the OOICI. The
132 Resource Registry and Service Registry now have basic registration of resource
133 descriptions and services.
134 - The Ion message is now encoded usig the MsgPack library to allow for binary
135 transport of message content. The JSON library was mangleing string content.
136 This is a temporary fix for a wider problem with the encoding structure which
137 needs to be addressed in construction.
138
dfe8bf2 fixed problems with logging change; added log level configuration bas…
Michael Meisinger authored Jun 7, 2010
139 2010-06-07:
140 - Redefined logging import to set as module level logger. Each module has now
141 a different logger that can be configured separately. Don't configure
142 manually though.
143 - Added possibility to modify logging levels by module/package, with support
144 for package hierarchy. See res/logging/loglevels.cfg for standard entries.
145 Do not modify. Add file res/logging/loglevelslocal.cfg for local override.
08d0190 fixed some errors related to logging changes
Michael Meisinger authored Jun 7, 2010
146 Default logging level for all ion code: WARNING
f92eeba Added process shutdown support to BaseProcess; refactored BaseProcess…
Michael Meisinger authored Jun 2, 2010
147 2010-06-02:
148 - BaseProcess self members renamed to conform to PEP8
149 - Added process shutdown to BaseProcess
982030b Refactoring in BaseProcess to support an onspawn hook
Michael Meisinger authored Jun 4, 2010
150 - Added container UNIX shell argument -a processes=<path to filename> used
151 by newcc.py script, with a list of processes to startup in standard format
3f881c9 Changed IStore delete to remove; parameterizable cassandra backend
Michael Meisinger authored May 25, 2010
152 2010-05-25:
153 - Made Cassandra backend parameterizable with keyspace/colfamily and added
154 SuperColumn support.
f2ff6a5 Refactored IStore interface and modified backends, object store, coi …
Michael Meisinger authored May 24, 2010
155 - Modified the IStore interface to support a create_store factory method. This
156 method can yield and return a deferred. Modified and fixed IStore impls.
3f881c9 Changed IStore delete to remove; parameterizable cassandra backend
Michael Meisinger authored May 26, 2010
157 Changed delete to remove to be more compliant with standard collections.
241d1d0 BaseProcess.reply_ok and reply_err added and service operations chang…
Michael Meisinger authored May 22, 2010
158 2010-05-22:
159 - Added timeout to BaseProcess.rpc_send. Use with kwarg timeout=<secs>
160 - CC-Agent detects missing known containers and removes them from the list
161 - Enhanced CC-Agent operations and CC shell helpers
162 - Added sequence numbers for messages
163 - Added glue functions BaseProcess.reply_ok and reply_err and changes some
164 RPC style service operations.
342829f Local configuration override in ionlocal.config. Unit tests get broke…
Michael Meisinger authored May 21, 2010
165 2010-05-20:
166 - The system now looks for a local config file ionlocal.config and if exists,
167 overrides entries in ion.config.
168 - Test cases use the config file to determine the broker host to use. If local
70573b4 added BaseProcessClient and changed all BaseServiceClient subclasses …
Michael Meisinger authored May 20, 2010
169 config override exists, a different broker (e.g. localhost) can be given.
170 - Added BaseProcessClient and changed BaseServiceClient and all clients and
171 all test cases (again).
3827a32 shell helper functions
Michael Meisinger authored May 21, 2010
172 - Added container shell helpers under 'cc', such as cc.spawn('hello')
e710e44 CC agent with announcement on identification request; can spawn a pro…
Michael Meisinger authored May 17, 2010
173 2010-05-16:
174 - Removed support for BaseProcess.send_message and reply_message. Always use
175 send, reply and rpc_send now.
176 - Any BaseProcess instance can now spawn_child() other processes.
177 - Removed RpcClient class, because every process can do rpc_send()
178 - Service processes now also listen to their service name's queue. The service
179 name is determined from the service declaration. Two processes will listen
180 to the same queue and take messages round robin from the queue.
181 - Startup arguments evaluated, for instance to start with system name set:
182 twistd -n magnet -a sysname=mysys
183 twistd -n magnet -a "{'sysname':'mysys'}"
184 - Added capability container agent process. Start with:
185 twistd -n magnet res/scripts/newcc.py
186 Agents announce themselves to others in the same system and can spawn procs.
187 - Name scope 'local' for messaging names means now really local to one container.
188 Use scope 'system' for names unique for each bootstrapped system. Do not use
189 global names, because they will clash.
190 - Less verbose trace output for process init messages and changes to other
191 trace output as well.
bc50a38 Changed BaseServiceClient __init__ args and all client impls; takes n…
Michael Meisinger authored May 16, 2010
192 - Changed BaseServiceClient and tests. Initializer arguments different.
cad868a Updated README to correct magnet dependency: now master
Michael Meisinger authored May 18, 2010
193 - Using master branch of magnet now
7a9f54a python 2.5 compatibility: changed .format to % and json import
Michael Meisinger authored May 11, 2010
194 2010-05-10:
195 - Based on entries in config files, service process modules are sought and
196 loaded in order to collect the service process declarations. This enables
197 a registration of services with versions and dependencies on startup
c43dc6c Readme appended with last changes, OTP functions in base_process
Michael Meisinger authored May 11, 2010
198 2010-05-06:
199 - Refactored the BaseProcess class.
200 - You can now do RPC directly from the process, via self.rpc_send without
5ea10a7 made IonTestCase and all tests PEP8 compliant
Michael Meisinger authored May 10, 2010
201 the need for an RpcClient. Works even with other messages coming in at the
202 same time (using the conv-id)
c43dc6c Readme appended with last changes, OTP functions in base_process
Michael Meisinger authored May 11, 2010
203 - Added aliases: self.send, self.reply (use these now)
204 - Process instance can be spawned via self.spawn()
205 - Provided an easier to use BaseServiceClient, which uses a default service
206 name lookup. Accepts BaseProcess instance as argument to use for sending/
207 receiving service calls.
Something went wrong with that request. Please try again.