]> asedeno.scripts.mit.edu Git - cl-protobufs.git/commitdiff
Tsunami framework + use tsunami in customer profiles
authorSergey Vasilyev <svas@google.com>
Fri, 14 Sep 2012 18:24:30 +0000 (18:24 +0000)
committerSergey Vasilyev <svas@google.com>
Fri, 14 Sep 2012 18:24:30 +0000 (18:24 +0000)
 Testing : precheckin --full (both against Oracle and against megastore for customers)
 Reviewer: eschwartz

 JTB impact: n
 Ops impact: n
 Security impact: n

 Change to config                        : n
 Change to XML schema                    : Y (XMLREQ bug 120820)
 Change to DB schema                     : Y (DBREQ bug 119801)
 Change to transport (timeouts, headers) : n
 Any change (or new use) of OAQs         : n
 Change to inter-component transactions  : sort of (use megastore in development-only environments)
 Depends on any other checkin / bug      : n

 Tests that will verify : tsunami and megastore unit tests + existing customer profile tests

Tsunami is a new layer that sits between business logic code and the
persistence logic. The main manifestation of this layer is
define-domain-class macro that defines an interface to a domain
class. You can then define how to perist in various implementations,
e.g. using define-quake-db-class-bindings for quake and
define-proto-binding & define-megastore-proto-binding for megastore.

Tsunami framework is still a work in progress, and there is a bunch of
outstanding tasks/issues.

As the first application, I refactored customer profile code to use
the tsunami framework. This enables storing of customer profiles in
megastore (or other data stores in the future), while everything else
is stored in Oracle.

Here is the list of other miscellaneous/harder-to-understand changes:

- I changed @id attribute of ContactInfo objects to use the actual
  numeric ID, rather than passing it through encode-record-locator (in
  qres-dev schema only). This required changing XML schema type from
  typeBasicLocatorString to typeBasicID.

- Drop quake/relationships.lisp. Use a more straightforward way to
  associated ADO agencies to customer profiles.

- Customer usernames are now stored as lowercase strings (this means
  that I don't need a separate field in megastore protobuf to
  implement case-insensitive index).

- agency-id permission attribute is now the agency-key (serialized to
  string), not the agency's record ID. This way you don't need to load
  agency to do permission check when all you have is the agency-key

- moved agency-key from core/agencies.lisp to
  lisp/core/agency-types.lisp, so that agency-key type can be used in
  permissions

- add when* test handler that takes a random Lisp expression (as
  opposed to the existing when that takes a variable name and looks at
  whether it is empty)

- remove cc-deleted-error -- there is no such thing as deleting
  cc-info

- refactored cc-information, so that it is used as a value object (ie
  a mostly-immutable object with no identity) in the application. When
  saving to Oracle database, it is saved in the central
  tbl_cc_information table with appropriately populated ownership
  columns (pointing to the customer, journey,
  accountable_doc_container, etc)

- drop unneeded tbl_cc_transaction columns that were caching cc_info
  values

git-svn-id: http://svn.internal.itasoftware.com/svn/ita/trunk/qres/lisp/libs/cl-protobufs@562275 f8382938-511b-0410-9cdd-bb47b084005c

define-proto.lisp
printer.lisp

index d3e91f0f4a71c2abaccbab6c4e63f0494dfeb727..8af06a08ea5f51f1b870b75d35fac5f9c68f6811 100644 (file)
 (defun conc-name-for-type (type conc-name)
   (and conc-name
        (typecase conc-name
-         ((member t) (format nil "~A-" type))
-         ((or string symbol) (string conc-name))
+         ((member t) (format nil "~:@(~A~)-" type))
+         ((or string symbol) (string-upcase (string conc-name)))
          (t nil))))
 
 (defmacro define-extension (from to)
index 75cfcb6ba5a2249c97933ac4b61cebf6bbf6936c..9dcd2c3fe2a76d31b1ac7dea28a98cf22bed35ec 100644 (file)
 
 ;; Export just the slot accessor name
 (defmethod collect-exports ((field protobuf-field))
-  (list (proto-slot field)))
+  (list (or (proto-reader field)
+            (proto-slot field))))
 
 ;; Export the names of all the methods
 (defmethod collect-exports ((service protobuf-service))