US 2012/0131555 A1 HOSSAN Et Al
Total Page:16
File Type:pdf, Size:1020Kb
US 2012013 1555A1 (19) United States (12) Patent Application Publication (10) Pub. No.: US 2012/0131555 A1 HOSSAN et al. (43) Pub. Date: May 24, 2012 (54) METHOD AND SYSTEM FOR REMOTE (22) Filed: May 17, 2011 DEBUG PROTOCOL PROXYING FOR PRODUCTION DEBUGGING: SELECTIVE Related U.S. Application Data SESSION AND USERROUTING FOR (60) Provisional application No. 61/395,832, filed on May DEBUGGING IN MULT-TENANT CLOUD 17, 2010. COMPUTING INFRASTRUCTURE Publication Classification (51) Int. Cl. (75) Inventors: FIAZ HOSSAIN, San Francisco, G06F 9/44 (2006.01) CA (US); James Iry, Richmond, CA (US); Nagraj Kulkami, Santa (52) U.S. Cl. ........................................................ 717/124 Clara, CA (US); Zuye Zheng, San (57) ABSTRACT Francisco, CA (US) A proxy server receives requests, and determines which application server of a cluster of servers to send the request. (73) Assignee: Salesforce.com, Inc., San The determination may be based on a load balancing algo rithm. The proxy server determines whether each request is a Francisco, CA (US) debug request. The proxy server send the debug request to a debug server, but blocks unsafe debug Statements from reach (21) Appl. No.: 13/109.720 ing the debug server. User Session Started 402 User Session is Flagged 404 De-Bugging Request is sent to a load balancing proxy 406 Load balancing proxy sends De bug request to debug server 408 Debug server receives debug requests 410 Debug server determines the access level of the session 413 Debug server blocks unsafe debugging Code 414 Debug server passes through all Safe debugging Code 416 Debug server Logs all actions taken in the session 418 Patent Application Publication May 24, 2012 Sheet 1 of 6 US 2012/0131555 A1 Program COCle Application Platform Environment 10 Patent Application Publication May 24, 2012 Sheet 2 of 6 US 2012/0131555 A1 Tenant Data Application MetaData Tenant DB Application System eC3SE|| "E"p | ProcessSpace 16 Save 110 102 ROutines 36 PL/SOOL 34 18 Environment 10 Patent Application Publication May 24, 2012 Sheet 3 of 6 US 2012/0131555 A1 Proxy Server 122 Memory 300 LOad Balancer 301 Debug Filter 304 Read Only 306 ExeCute 308 Write 310 All 312 Other Debug Processes 314 Load ROuter 316 Event Recorder 318 Log 320 FIG. 3 Patent Application Publication May 24, 2012 Sheet 4 of 6 US 2012/0131555 A1 400O O User Session Started 402O User Session is Flagged 4 O 4 De-Bugging Request is sent to a load balancing proxy 406 Load balancing proxy Sends De bug request to debug Server 408 Debug server receives debug requestS 410 Debug server determines the aCCeSS level of the Session 413 Debug server blocks unsafe debugging COce 414 Debug Server passes through all Safe debugging COcle 416 Debug server Logs all actions taken in the Session 418 FIG. 4 Patent Application Publication May 24, 2012 Sheet 5 of 6 US 2012/0131555 A1 Establish ACCOUnt 510 Initiate Tenant PrOCeSSeS 512 Upload Tenant Data 514 Add Data Object to Tenant Data 516 FIG. 5 Patent Application Publication May 24, 2012 Sheet 6 of 6 US 2012/0131555 A1 ASSembleUser System 602 ASSemble Tenant Database System 604 COnnect User System to Network 606 COnnect Tenant Database System to Network 608 FIG. 6 US 2012/013 1555 A1 May 24, 2012 METHOD AND SYSTEM FOR REMOTE The Subject matter in the background section merely repre DEBUG PROTOCOL PROXYING FOR sents different approaches, which in and of themselves may PRODUCTION DEBUGGING: SELECTIVE also be inventions. SESSION AND USERROUTING FOR 0008. In conventional database systems, users access their DEBUGGING IN MULT-TENANT CLOUD data resources in one logical database. A user of Such a COMPUTING INFRASTRUCTURE conventional system typically retrieves data from and stores data on the system using the user's own systems. A user CLAIM OF PRIORITY system might remotely access one of a plurality of server systems that might in turn access the database system. Data 0001. This application claims the benefit of U.S. Provi retrieval from the system might include the issuance of a sional Patent Application 61/395,832 entitled METHOD query from the user system to the database system. The data AND SYSTEM FOR REMOTE DEBUG PROTOCOL base system might process the request for information PROXYING FOR PRODUCTION DEBUGGING: SELEC received in the query and send to the user system information TIVE SESSION AND USER ROUTING FOR DEBUG relevant to the request. The secure efficient retrieval of accu GING IN A MULTI-TENANT CLOUD COMPUTING rate information and Subsequent delivery of this information INFRASTRUCTURE, by Fiaz Hossain et al., filed May 17, to the user system has been and continues to be a goal of 2010 (Attorney Docket No. 48-25/333 PROV), the entire con administrators of database systems. Secure and efficient tents of which are incorporated herein by reference. retrieval of data can be hampered if the system needs to be shutdown to be maintained or is difficult to debug and main CROSS REFERENCE TO RELATED tain for other reasons. APPLICATIONS 0009. The present specification recognizes that debugging 0002 The following commonly owned, co-pending or and maintaining clustered servers in a multi-tenant cloud other United States patents and patent applications, including computing infrastructure adds to the complexity of debug the present application, are related to each other. Each of the ging and maintaining the database system. other patents/applications listed below are incorporated by reference herein in its entirety: BRIEF SUMMARY 0003 U.S. Provisional Patent Application 61/395,832 0010. In accordance with embodiments, there are pro entitled METHOD AND SYSTEM FOR REMOTE DEBUG vided mechanisms and techniques for implementing a remote PROTOCOL PROXYING FOR PRODUCTION DEBUG debugging protocol that may be used in a production envi GING: SELECTIVE SESSION AND USER ROUTING ronment of a multi-tenant cloud computing infrastructure. In FORDEBUGGING IN A MULTI-TENANT CLOUD COM one implementation, the mechanisms and techniques include PUTING INFRASTRUCTURE, by Fiaz Hossain et al., filed mechanisms and techniques for selectively routing requests May 17, 2010 (Attorney Docket No. 48-25/333 PROV), and based on sessions and user 0004 U.S. patent application Ser. No. entitled, 0011. In a cloud computing infrastructure, it is often hard METHOD AND SYSTEM FOR REMOTE DEBUG PRO to replicate and debug production issues and situations on TOCOL PROXYING FOR PRODUCTION DEBUGGING: simulated test environments. One or more mechanisms and SELECTIVE SESSION AND USER ROUTING FOR techniques for securely debugging specific production user DEBUGGING IN MULTI-TENANT CLOUD COMPUT requests in web application servers, which may be JAVA ING INFRASTRUCTURE, by Fiaz Hossain et al., filed based in a multi-tenant cloud computing infrastructure may , 2011 (Attorney Docket No. 48-36/333US). facilitate debugging production user requests. For example, a debug protocol may be used to debug production requests by COPYRIGHT NOTICE first isolating specific user and sessions requests that are normally forwarded to an application server, but instead are 0005. A portion of the disclosure of this patent document forwarded to a production debugging server. The debug contains material which is subject to copyright protection. server may be virtually identical to all of the other application The copyright owner has no objection to the facsimile repro servers in the cloud computing cluster except it accepts duction by anyone of the patent document or the patent dis requests via a remote debugging protocol. In an embodiment, closure, as it appears in the Patent and Trademark Office a remote debugging protocol. Such as Java DebugWire Pro patent file or records, but otherwise reserves all copyright tocol (JDWP), (which is being used for debugging) enables rights whatsoever. users to implement traditional debugging functionality Such as setting breakpoints, hot Swapping code (that is changing FIELD OF THE INVENTION the code while the code is running), examining and modifying 0006. The subject matter described herein relates to the data, and replaying stack frames (the JDWP is just one non real-time debugging of production applications and servers in limiting example of a remote debugging protocol that may be a multi-tenant cloud computing infrastructure. used). Much of this functionality is crucial for diagnosing and debugging code. However in the context of a real-time pro BACKGROUND duction environment, e.g., debugging while the code is run ning, some of the standard remote debugging protocol. Such 0007. The subject matter discussed in the background sec as some of the JDWP functionality, poses risks for misuse. tion should not be assumed to be prior art merely as a result of (e.g., Such as the ability to change production code or data its mention in the background section. Similarly, a problem during debugging). Consequently, in an embodiment, proxy mentioned in the background section or associated with the mechanisms and techniques are used in a production environ subject matter of the background section should not be ment to intercept debugging instructions from a remote assumed to have been previously recognized in the prior art. debugger to a debugging server. In one implementation, the US 2012/013 1555 A1 May 24, 2012 mechanisms and techniques examine the debugging instruc server may simultaneously process requests for a great num tions for potentially unsafe or unauthorized actions and block ber of customers, and a given database table may store rows the instructions that are determined to be unsafe.