Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions #3

Open
seandenigris opened this issue Jun 13, 2018 · 1 comment
Open

Questions #3

seandenigris opened this issue Jun 13, 2018 · 1 comment

Comments

@seandenigris
Copy link
Contributor

seandenigris commented Jun 13, 2018

@hernanmd maybe it would be easier to discuss here as questions arise instead of the Pharo ML (but I copied this into a thread on the users list anyway he he). After we can try to fold back answers into the docs?

Repository Access

The following code seems problematic:

ASRepository class>>#repositoryNamed: aString
	…
	^ self allInstances detect:

Isn't it possible that a rogue instance could be returned instead of the one that's part of the model? For example, some persistence libraries like SimpleImagePersistence replace segments of the object graph and might have the old and new copy present during a load.

Where do Check Points Live?

In the IGEVET app, it seems that each session hasA checkPoint which hasA repository. Is this the way you’d recommend using AS in a real app? It seems that the default repository implementation loads the whole user DB from disk via Fuel, so wouldn’t that happen for each session?!

@hernanmd
Copy link
Owner

Thank you for reporting this Sean, and sorry for the late response.

I never tested for more than 3 or 4 users so it has never been an issue. But you are right, currently the CP loads the whole Fuel DB for each session.

The best I can think to fix both issues would be to make ASRepository a Singleton. Let me know if you have another suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants