Firebase Flashcards
firebase as api
Because the Database is stored as JSON, we know we can read from it in our applications.
On the Firebase Console, we can find the 2 things we need to get access to our Database as an API. We need our Database Secret and the URL for our Data.
Grand Central Dispatch
GCD is a system you can use for concurrency
GCD sits above manually creating threads and locks, and below NSOperationQueue
GCD feels a lot like NSOperationQueue
GCD is a C-style API, so you don’t call the methods on classes, they are just global functions
synchronous vs. asynchronous
A synchronous function returns only after the completion of tasks that it orders
An asynchronous function returns immediately, ordering the task to be done but does not wait for it (does not block for it)
Race Conditions
The behavior of your app depends on the timing of certain events that are being executed in an uncontrolled concurrent manner
Dead Locks
Two or more threads are deadlocked if one thread is waiting for another thread to finish, while the other thread is waiting for the first thread to finish
Thread safety
Thread safe code is safe to call from multiple threads or concurrent tasks. Code that is not thread safe must be only accessed in one context at a time. An immutable array is thread safe because it cannot be changed, while a mutable array is not thread safe since one thread could be changing it while another is trying to read it.