~cgb-cs/appscale/appscale-main

« back to all changes in this revision

Viewing changes to AppController/doc/PbServer.html

  • Committer: Chris Bunch
  • Date: 2012-02-26 03:20:57 UTC
  • Revision ID: cgb@cs.ucsb.edu-20120226032057-ad0cy0zgx4we4exc
adding in repo over app engine support, and tests for most of datastore repo on appscale and s3

Show diffs side-by-side

added added

removed removed

Lines of Context:
111
111
        
112
112
          <li><a href="./CronHelper.html">CronHelper</a></li>
113
113
        
 
114
          <li><a href="./Datastore.html">Datastore</a></li>
 
115
        
 
116
          <li><a href="./DatastoreFactory.html">DatastoreFactory</a></li>
 
117
        
 
118
          <li><a href="./DatastoreRepoOnAppScale.html">DatastoreRepoOnAppScale</a></li>
 
119
        
 
120
          <li><a href="./DatastoreS3.html">DatastoreS3</a></li>
 
121
        
114
122
          <li><a href="./Djinn.html">Djinn</a></li>
115
123
        
116
124
          <li><a href="./DjinnJobData.html">DjinnJobData</a></li>
184
192
 
185
193
    <div id="description">
186
194
      
187
 
<p>To support the Google App Engine Datastore API in a way that is
188
 
database-agnostic, App Engine applications store and retrieve data via the
189
 
PBServer. The server inherits this name from the storage format of requests
190
 
in the Datastore API: Protocol Buffers.</p>
 
195
<p>To support the Google App Engine <a href="Datastore.html">Datastore</a> API
 
196
in a way that is database-agnostic, App Engine applications store and
 
197
retrieve data via the PBServer. The server inherits this name from the
 
198
storage format of requests in the <a href="Datastore.html">Datastore</a>
 
199
API: Protocol Buffers.</p>
191
200
 
192
201
    </div>
193
202
 
240
249
within AppScale.</p></dd>
241
250
        
242
251
      
 
252
        <dt><a name="NAME">NAME</a></dt>
 
253
        
 
254
        <dd class="description"><p>The name that nginx should use as the identifier for the PBServer when it
 
255
we write its configuration files.</p></dd>
 
256
        
 
257
      
243
258
      </dl>
244
259
    </div>
245
260
    
275
290
          <div class="method-source-code"
276
291
            id="get_executable_name-source">
277
292
<pre>
278
 
<span class="ruby-comment"># File lib/pbserver.rb, line 112</span>
 
293
<span class="ruby-comment"># File lib/pbserver.rb, line 117</span>
279
294
def self.get_executable_name(table)
280
295
  if <span class="ruby-constant">DBS_WITH_NATIVE_PBSERVER</span>.include?(table)
281
296
    return &quot;#{APPSCALE_HOME}/AppDB/appscale_server_#{table}.py&quot;
313
328
          <div class="method-source-code"
314
329
            id="get_server_ports-source">
315
330
<pre>
316
 
<span class="ruby-comment"># File lib/pbserver.rb, line 89</span>
 
331
<span class="ruby-comment"># File lib/pbserver.rb, line 94</span>
317
332
def self.get_server_ports(table)
318
333
  if <span class="ruby-constant">DBS_NEEDING_ONE_PBSERVER</span>.include?(table)
319
334
    num_pbservers = 1
357
372
          <div class="method-source-code"
358
373
            id="is_running-source">
359
374
<pre>
360
 
<span class="ruby-comment"># File lib/pbserver.rb, line 104</span>
 
375
<span class="ruby-comment"># File lib/pbserver.rb, line 109</span>
361
376
def self.is_running(my_ip)
362
377
  `curl http://#{my_ip}:#{PROXY_PORT}` 
363
378
end</pre>
392
407
          <div class="method-source-code"
393
408
            id="restart-source">
394
409
<pre>
395
 
<span class="ruby-comment"># File lib/pbserver.rb, line 82</span>
 
410
<span class="ruby-comment"># File lib/pbserver.rb, line 87</span>
396
411
def self.restart(master_ip, my_ip, table, zklocations)
397
412
  self.stop()
398
413
  self.start(master_ip, my_ip, table, zklocations)
428
443
          <div class="method-source-code"
429
444
            id="start-source">
430
445
<pre>
431
 
<span class="ruby-comment"># File lib/pbserver.rb, line 53</span>
 
446
<span class="ruby-comment"># File lib/pbserver.rb, line 58</span>
432
447
def self.start(master_ip, db_local_ip, my_ip, table, zklocations)
433
448
  pbserver = self.get_executable_name(table)
434
449
  ports = self.get_server_ports(table)
478
493
          <div class="method-source-code"
479
494
            id="stop-source">
480
495
<pre>
481
 
<span class="ruby-comment"># File lib/pbserver.rb, line 75</span>
 
496
<span class="ruby-comment"># File lib/pbserver.rb, line 80</span>
482
497
def self.stop(table)
483
498
   <span class="ruby-constant">GodInterface</span>.stop(:pbserver)
484
499
end</pre>