With a non NIO or non Continuation based server, this
would require around 11,000 threads to handle 10,000 simultaneous
users. Jetty handles this number of connections with only 250
threads.
However, those locks limit concurrency and scalability when
multiple transactions are executing insert statements at the
same time
For INSERT statements where the
number of rows to be inserted is known at the beginning of
processing the statement, InnoDB quickly
allocates the required number of auto-increment values without
taking any lock, but only if there is no concurrent session
already holding the table-level AUTO-INC lock
(because that other statement will be allocating auto-increment
values one-by-one as it proceeds)
obtains
auto-increment values under the control of a mutex (a
light-weight lock) that is not held until
the statement completes, but only for the duration of the
allocation process
recovery scenarios when SQL statements are
replayed from the binary log
Using auto-increment with replication
set
innodb_autoinc_lock_mode to
0 or 1 and use the same value on the master and its slaves
Auto-increment values are not ensured to be the same on the
slaves as on the master if you use
innodb_autoinc_lock_mode =
2 (“interleaved”) or configurations where the
master and slaves do not use the same lock mode
An implementation of this interface must be thread safe
If authorization fails, either because the user is not logged in or because it doesn't have required rights, it must throw an appropriate
org.granite.messaging.service.security.SecurityServiceException.
Writing a Security Service
SecurityService interface
nothing to do with a true Flex destination
only one instance of this service is used in the entire web-app
and will be called by concurrent threads
configure
login
This method is called upon each and every service method call invocations (RemoteObject)
or subscribe/publish actions (Consumer/Producer). When used with RemoteObjects,
the authorize method is responsible for checking security, calling the service method, and returning the corresponding result.
authorize
logout
handleSecurityException
default implementation of this method in AbstractSecurityService is to do nothing
security services
are not exposed to outside calls