Skip to main content

Home/ SoftwareEngineering/ Group items tagged concurrency

Rss Feed Group items tagged

kuni katsuya

graniteds - can newer web containers having Servlet 3 extend BlazeDS max # of simultane... - 0 views

  • GraniteDS & Asynchronous Servlets
  • to handle many thousands concurrent users, you can even
  • create a cluster of GraniteDS servers
  • ...9 more annotations...
  • Asynchronous Servlets Performance
  • 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.
  • Classical synchronous model: 10,000 concurrent users -> 11,000 server threads. 1.1 ratio.
  • Comet asynchronous model: 10,000 concurrent users -> 250 server threads. 0.025 ratio.
  • classical (synchronous) servlet model
  • request -> immediate processing -> response
  • Comet implementations rely on a different model:
  • request -> wait for available data -> response
  • With synchronous servlet processing, each request is handled by one dedicated server thread
kuni katsuya

MySQL :: MySQL 5.7 Reference Manual :: 5.4.4.2 Configurable InnoDB Auto-Increment Locking - 0 views

  • Configurable
    • kuni katsuya
       
      new and improved!(?)
  • table-level locks held until the end of a statement make INSERT statements using auto-increment safe for use with
  • statement-based replication
  • ...24 more annotations...
  • 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
  • innodb_autoinc_lock_mode = 0 (“traditional” lock mode)
  • special table-level AUTO-INC lock is obtained and held to the end of the statement
  • lock mode is provided for:
  • Backward compatibility.
  • innodb_autoinc_lock_mode = 1 (“consecutive” lock mode)
  • important impact of this lock mode is significantly better scalability
  • This mode is safe for use with
  • statement-based replication
  • innodb_autoinc_lock_mode = 2 (“interleaved” lock mode)
  • This is the fastest and most scalable lock mode
  • but it is
  • not safe
  • when using
  • statement-based replication
  • 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
  • If you are using
  • row-based replication
  • all of the auto-increment lock modes are safe
kuni katsuya

Hibernate - 0 views

  • what-when-how In Depth Tutorials and Information
  • Understanding object/relational persistence (Hibernate)
  • Mapping persistent classes (Hibernate)
  • ...5 more annotations...
  • Mapping collections and entity associations (Hibernate)
  • Advanced entity association mappings (Hibernate)
  • Inheritance and custom types (Hibernate)
  • Domain models and metadata (Hibernate)
  • Transactions and concurrency (Hibernate)
kuni katsuya

Enterprise JavaBeans 3.1 with Contexts and Dependency Injection: The Perfect Synergy - 0 views

  • EJB beans cannot be directly exposed to JSF or JSP without a little help from CDI
  • CDI doesn't provide any transactional, monitoring, or concurrency aspect out of the box
  • stateless EJB 3.1 bean as boundary (Facade)
  • ...1 more annotation...
  • injected managed beans (controls) results in the simplest possible architecture
kuni katsuya

Chapter 16. Extensibilty - 0 views

  • 16.2. Writing a Security Service
  • login(Object credentials)
  • authorize(AbstractSecurityContext context)
  • ...20 more annotations...
  •  logout() 
  • 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
  • configure
  • login
  • authorize
  • logout
  • handleSecurityException
1 - 8 of 8
Showing 20 items per page