home *** CD-ROM | disk | FTP | other *** search
/ ftp.pasteur.org/FAQ/ / ftp-pasteur-org-FAQ.zip / FAQ / databases / GemStone-FAQ < prev    next >
Encoding:
Internet Message Format  |  2004-04-18  |  12.8 KB

  1. Path: senator-bedfellow.mit.edu!dreaderd!not-for-mail
  2. Message-ID: <databases/GemStone-FAQ_1082200966@rtfm.mit.edu>
  3. Supersedes: <databases/GemStone-FAQ_1079601013@rtfm.mit.edu>
  4. Expires: 31 May 2004 11:22:46 GMT
  5. X-Last-Updated: 1998/01/11
  6. Organization: none
  7. From: vmalik@ipass.net (Vikas Malik)
  8. Newsgroups: comp.lang.smalltalk,comp.answers,news.answers
  9. Subject: GemStone FAQ (v.1.0)
  10. Followup-To: poster
  11. Approved: news-answers-request@MIT.EDU
  12. Originator: faqserv@penguin-lust.MIT.EDU
  13. Date: 17 Apr 2004 11:27:56 GMT
  14. Lines: 360
  15. NNTP-Posting-Host: penguin-lust.mit.edu
  16. X-Trace: 1082201276 senator-bedfellow.mit.edu 569 18.181.0.29
  17. Xref: senator-bedfellow.mit.edu comp.lang.smalltalk:144697 comp.answers:56873 news.answers:269925
  18.  
  19. Archive-name: databases/GemStone-FAQ
  20. Posting-Frequency: monthly
  21. Last-modified: Oct 26,1997
  22. Version: 1.0
  23. URL: http://www.ipass.net/~vmalik/gemstone.html
  24.  
  25. ____________________________________________________________________________
  26.  
  27. GemStone Frequently Asked Questions
  28. Copyright =A9 1994 Vikas Malik
  29. All Rights Reserved
  30.  
  31. This FAQ may be posted to any USENET newsgroup, on-line service, or BBS
  32. as long as it is posted in its entirety and includes this copyright=
  33.  statement.
  34.  
  35. This FAQ may not be distributed for financial gain.
  36.  
  37. This FAQ may not be included in commercial collections or compilations
  38. without express permission from the author.
  39. ____________________________________________________________________________
  40.  
  41. Vikas Malik - vmalik@ipass.net
  42. Knowledge Systems Corporation
  43. ____________________________________________________________________________
  44.  
  45. Contents
  46.  
  47. Q. What is GemStone?=20
  48. Q. How do I spell GemStone?
  49. Q. What is the Stone?
  50. Q. What is a Gem?
  51. Q. What is a Repository?
  52. Q. What is the difference between a linked and RPC application?
  53. Q. What is GemBuilder?
  54. Q. What is GBSM?
  55. Q. How do I log into GemStone programmatically?
  56. Q. What are the two different types of transaction modes in GemStone?
  57. Q. What is a connector?
  58. Q. What are the different kinds of connectors?
  59. Q. What is the difference between a global connector and a session=
  60.  connector?
  61. Q. Do I need to define a connector for every object in my application?
  62. Q. What is a root object?
  63. Q  What is a symbol list?
  64. Q. What are the names of default symbol dictionaries of a GemStone user?
  65. Q. How do I invoke a debugger in GemStone?
  66. Q. What is the difference between the terms faulting and flushing?
  67. Q. How do I remotely excute code in GemStone from Smalltalk side?
  68. Q. What is a forwarder?
  69. Q. How do I create a forwarder?
  70. Q. What is the difference in results of sending the following messages to a=
  71. =20
  72. forwarder?
  73.     aGSForwarder   name    and   aGSForwarder   fwname
  74. Q. What is a replicate?
  75. Q. What is a stub?
  76. Q. How do I control the number of levels to replicate when updating an=
  77.  object=20
  78. from GemStone to Smalltalk?
  79. Q. How do I unstub a stub?
  80. Q. Can I pass a stub as an argument to a primitive method?
  81. Q. How do I ensure that an object is never replicated to contain a stub down=
  82.  to=20
  83. a certain level?
  84. Q. How do I convert a replicate into a stub?
  85. Q. What is the result of sending a message to a stub?
  86. Q. What is the difference between lazy and immediate fault policy?
  87. Q. What do I mean by class history of a GemStone class?
  88. Q. How do I remove a version of GemStone class?
  89. Q. How do I find the latest version of a GemStone class?
  90. Q. How do I migrate all the instances of a class to its latest version?
  91. Q. How do I remove all the old versions of a class?
  92. Q. What is the difference between the results of sending #asLocalObject and=
  93. =20
  94. #asLocalObjectCopy messages to  aGSObject?
  95. Q. How do I mark a Smalltalk object as dirty?
  96. Q. How do I mark objects dirty automatically without sending #markDirty in=
  97. =20
  98. setter methods?
  99.  
  100.  
  101. Q. What is GemStone?
  102. Ans. GemStone is an Object- Oriented database.
  103.  
  104. Q. How do I spell GemStone?
  105. Ans. GemStone is always spelled with upper case S. Some smart recruiters=
  106.  will=20
  107. look for upper case S in your resume.
  108.  
  109. Q. What is the Stone?
  110. Ans. The stone process handles locking and concurrent access to objects in=
  111.  the=20
  112. repository. Each repository is monitored by a single stone.
  113.  
  114. Q. What is a Gem?
  115. Ans. Gem is the object server for user application. The Gem reads the
  116. repository=20
  117. as the application accesses objects, and it updates the repository when an
  118. application=20
  119. commits a transaction. A repository can have more than one Gem process.
  120.  
  121. Q. What is a Repository?
  122. Ans. Repository stores GemStone classes and persistent objects.
  123.  
  124. Q. What is the difference between a linked and RPC application?
  125. Ans. In a linked application, Gem is integarted with the application into a
  126. single=20
  127. process whereas in a RPC application, Gem runs as a separate process and
  128. responds=20
  129. to RPCs from the application.
  130.  
  131. Q. What is GemBuilder?
  132. Ans. GemBuilder is a set of classes and primitives installed in client
  133. smalltalk=20
  134. image to facilitate working with the two object spaces (Smalltalk-Client &=
  135. =20
  136. GemStone-Server).=20
  137.  
  138. Q. What is GBSM?
  139. Ans. GBSM is global that refers to the sole instance of GbsSessionManager
  140. class.=20
  141. GBSM manages all known GemStone sessions and keeps track of the current=
  142.  session.
  143.  
  144. Q. How do I log into GemStone programmatically?
  145. Ans.     GBSM   loginWithParameters: aGbsSessionParameters.
  146.     or
  147.     aGbsSessionParameters login.
  148.  
  149. Q. What are the two different types of transaction modes in GemStone?
  150. Ans. 1. Automatic transaction mode: A new transaction begins automatically=
  151.  when=20
  152. one commits or aborts a transaction.
  153. 2. Manual transaction mode: Transactions begin as a result of explicit=
  154.  request.
  155.  
  156. Q. What is a connector?
  157. Ans. A connector connects a GemStone object and a client smalltalk object
  158. when a=20
  159. session logs in to the database.
  160.  
  161. Q. What are the different kinds of connectors?
  162. Ans. 1. Name connector connects a smalltalk object with a GemStone object=
  163.  based=20
  164. on their names (which can be different).
  165. 2. Fast connector keeps a direct reference to a smalltalk object and a=
  166.  GemStone=20
  167. object id. This makes the connection fast because no resolution is=
  168.  necessary.
  169.  
  170. Q. What is the difference between a global connector and a session=
  171.  connector?
  172. Ans. A global connector connects two objects whenever any session is logged=
  173.  in=20
  174. whereas a session connector connects two objects only when a specific=
  175.  session=20
  176. is logged in.
  177.  
  178. Q. Do I need to define a connector for every object in my application?
  179. Ans No, because a connector connects not only the immediate object but also=
  180.  all=20
  181. those objects that can be reached from it. Define connectors for only the=
  182.  root=20
  183. objects of the persistent subsystems.
  184.  
  185. Q.What is a root object?
  186. Ans. Root objects of an application are the persistent objects from which=
  187.  all=20
  188. other persistent objects can be reached. The most common kinds of root
  189. objects are
  190. (i) Global variables
  191. (ii) Class variables
  192. (iii) Class instance variables
  193.  
  194. Q What is a symbol list?
  195. Ans. A symbol list is an array of symbol dictionaries. Symbol list is used=
  196.  in=20
  197. compilation of GemStone code, in order to resolve references to objects by
  198. name.=20
  199. Each GemStone user has a symbol list. Only objects named in symbol=
  200.  dictionaries=20
  201. in a user=92s symbol list are visible to that user.
  202.  
  203. Q. What are the names of default symbol dictionaries of a GemStone user?
  204. Ans. Globals, UserGlobals, Published and UserClasses.
  205.  
  206. Q. How do I invoke a debugger in GemStone?
  207. Ans. Insert    self pause.    in a GemStone method.
  208.  
  209. Q. What is the difference between the terms faulting and flushing?
  210. Ans. The term faulting refers to moving modified GemStone objects into the
  211. client=20
  212. Smalltalk , either creating a client Smalltalk replicate or updating an
  213. existing=20
  214. replicate. The term flushing refers to moving modified client Smalltalk=
  215.  objects=20
  216. into GemStone.
  217.  
  218. Q. How do I remotely excute code in GemStone from Smalltalk side?
  219. Ans.     aGSSession   excute: aString
  220.     aString contains GemStone smalltalk code.
  221.  
  222.     aGSObject   remotePerform: aSelector.
  223.  
  224. Q. What is a forwarder?
  225. Ans. A forwarder is a client smalltalk object whose state and behavior are
  226. actually=20
  227. in GemStone. The forwarder knows which GemStone object it represents, and
  228. responds=20
  229. to all messages by passing them to appropriate GemStone object. Forwarders=
  230.  are=20
  231. implemented by class GSForwarder. Its gsObj instance variable points to the
  232. proxy=20
  233. representing the GemStone object.
  234.  
  235. GSForwarder implements #doesNotUnderstand: as following.
  236. #doesNotUnderstand: aMessage
  237.  
  238.     ^gsObj=20
  239.         remotePerform: aMessage selector
  240.         withArgs: aMessage arguments
  241.  
  242. Q. How do I create a forwarder?
  243. Ans. 1. aGSConnector   postConnectAction: #forwader
  244. 2.  aGSSession   fwat: anObject
  245. 3.  by implementing  class method #instancesAreForwarders to specify all
  246. instances=20
  247. of a class are forwarders.
  248. 4.  by sending #asForwarder message to an instance of GSObject class.
  249.  
  250. Q. What is the difference in results of sending the following messages to a
  251. forwarder?
  252.     aGSForwarder   name    and   aGSForwarder   fwname.
  253. Ans.   aGSForwarder    name   returns a replicate.
  254.        aGSForwarder    fwname   returns a forwarder.
  255.  
  256. Q. What is a replicate?
  257. Ans. A replicate is a Smalltalk copy of a GemStone object. Messages sent to=
  258. =20
  259. replicates require no communication with GemStone for processing.
  260.  
  261. Q. What is a stub?
  262. Ans. A stub is an empty placeholder that knows nothing except which object=
  263.  it=20
  264. represents in GemStone. It is implemented by GSObjectStub class.=20
  265.  
  266. Q. How do I control the number of levels to replicate when updating an=
  267.  object=20
  268. from GemStone to Smalltalk?
  269. Ans. By implementing #defaultGStoSTLevel method of GSSession class. A level=
  270.  of=20
  271. 0 means no limit, replicate the entire object. A level of 2 means retrieve=
  272.  root=20
  273. object and each object it references . Objects at level 3 are converted into
  274. stubs.
  275.  
  276. Q. How do I unstub a stub?
  277. Ans. By sending #fault message to a stub.
  278.  
  279. Q. Can I pass a stub as an argument to a primitive method?
  280. Ans. No.
  281.  
  282. Q. How do I ensure that an object is never replicated to contain a stub down=
  283.  to=20
  284. a certain level?
  285. Ans. Implement class method #noStubLevel. Its return value should be an=
  286.  integer=20
  287. specifying the number of levels to replicate.
  288.  
  289. Q. How do I convert a replicate into a stub?
  290. Ans. By sending #stubYourself message to replicate.
  291.  
  292. Q. What is the result of sending a message to a stub?
  293. Ans. It replicates the GemStone object it represents as a Smalltalk object,
  294. then=20
  295. become that object and forwards the message. GSObjectStub implements
  296. #doesNotUnderstand:=20
  297. as following.
  298.  
  299. #doesNotUnderstand: aMessage
  300.     ^self fault=20
  301.         perform: aMessage selector
  302.         withArguments: aMessage arguments.
  303.  
  304. Q. What is the difference between lazy and immediate fault policy?
  305. Ans. In lazy faultPolicy a change initiated in GemStone causes Smalltalk
  306. replicate=20
  307. to be turned into a stub whereas in immediate faultPolicy a chage initiated
  308. in GemStone=20
  309. replicates  the client Smalltalk immediately.
  310.  
  311. Q. What do I mean by class history of a GemStone class?
  312. Ans.  GemStone supports multiple versions of a class. It keeps track of=
  313.  these=20
  314. versions in a class history object. Sending #classHistory message to a class=
  315. =20
  316. returns its class history.
  317.  
  318. Q. How do I remove a version of GemStone class?
  319. Ans=20
  320.     aClassHistory  removeVersion: aClass
  321.  
  322. Q. How do I find the latest version of a GemStone class?
  323. Ans  aClass classHistory last.
  324.  
  325. Q. How do I migrate all the instances of a class to its latest version?
  326. Ans.  aClass migrateInstancesTo: aClass classHistory last.
  327.  
  328. Q. How do I remove all the old versions of a class?
  329. Ans.=20
  330.     1 to: ( aClass classHistory size - 1)
  331.             do: [ :each |=20
  332.                 aClass classHistory removeVersion: ( aClass classHistory at: each)].
  333.  
  334. Q. What is the difference between the results of sending #asLocalObject and=
  335. =20
  336. #asLocalObjectCopy messages to  aGSObject?
  337. Ans. #asLocalObject returns a replicate. #asLocalObjectCopy returns a local
  338. deep=20
  339. copy of the GemStone object repesented by the receiver. This resultant=
  340.  object=20
  341. doesn=92t maintain the transparency between Smalltalk and GemStone.
  342.  
  343. Q. How do I mark a Smalltalk object as dirty?
  344. Ans    anObject markDirty. It is generally included in the setter methods=
  345.  for=20
  346. the object.=20
  347.  
  348. Q. How do I mark objects dirty automatically without sending #markDirty in=
  349. =20
  350. setter methods?
  351. Ans     aClass  markDirtyOnInstVarAssign  marks the objects of aClass dirty on=
  352. =20
  353. assignment of instance variables.
  354.     aClass  markDirtyOnAtPut  marks the objects of aClass dirty if they receive=
  355. =20
  356. #at:put: messages.
  357. *********************************************************************
  358.  
  359.          _________
  360.          \        \
  361.           \        \               ___    __
  362.            \        \              \  \  / |
  363.            /\        \              \  \/  |
  364.          O/  \ *****  \____________  \ /   |
  365.      \ /   ############## ***+++^^^^^^^\   \
  366.       X **################***+++^^^^^^^ \   \
  367.      / \   ############## ***+++^^^^^    \___\
  368.                / \       \          \o
  369.              O/   \       \
  370.                    \       \
  371.                     \       \
  372.                      \       \
  373.                       \_______\    =20
  374.                                   =20
  375.  
  376.  
  377.          I'D  RATHER  BE  FLYING  !!!
  378.  
  379.