This document discusses the development of high-performance services at Mail.ru for tasks like serving avatars. It describes how they use technologies like Perl, AnyEvent, IProto and Tarantool to process over 100,000 requests per second on a single server. Key points are:
1. Mail.ru uses Perl 7 with AnyEvent and IProto to build asynchronous services that can handle 40,000-120,000 requests per second per core.
2. They store data in the Tarantool NoSQL database for its performance and ability to handle multiple indexes.
3. By using these technologies like async Perl and Tarantool, they can process over 100,000 requests per second with a
The document discusses touch and gesture handling in modern web applications. It covers touch events like touchstart, touchmove, touchend and their mouse event equivalents. It also describes how to implement swipe/scroll gestures, zooming functionality using touch inputs, and pull to refresh features using touchstart and touchmove events. Key aspects covered include detecting swipe direction, translating pages on swipe, handling touch and click events for links and taps, and transforming elements on zoom gestures.
3. public final class RequestCreateAvatar {
private final String avatarName;
}
S
private final Character character;
R
void createAvatar(String avatarName, Character character) {
MsgRequest
sendCmd(new RequestCreateAvatar(avatarName, character));
Async<Void> createAvatar(String avatarName, Character character) {
}
CreateAvatarResult result = call(avatarManager.createAvatar(
avatarName, characterfinal class CreateAvatarHandler {
public
)); RequestHandler()
public void handle(RequestCreateAvatar msg) {
sendMsgToClient(result); CreateAvatarResult result = avatarManager.createAvatar(msg);
sendMsg(new ResponseCreateAvatar(result));
MsgResponse
return nothing(); }
} }
public final class CreateAvatarResponseHandler {
public void handle(ResponseCreateAvatar msg) {
sendMsgToClient(msg); ResponseHandler()
}
}
26. java.lang.Throwable
at asserts.Verify.fail(Verify.java:47)
at gm.cc.c.t.CmdTeleportRandomByMapType.asyncRun$Async(CmdTeleportRandomByMapType.jav
at gm.cc.c.t.CmdTeleportRandomByMapType$Context_asyncRun_LmsgSystem#locales#Abonent_.
at f.i.AsyncImpl.updateSafe(AsyncImpl.java:37)
at f.i.FiberImpl.updateInternal(FiberImpl.java:154)
at f.i.FiberImpl.update(FiberImpl.java:130)
at f.i.FiberManagerAbstract.updateFiber(FiberManagerAbstract.java:297)
...
at java.lang.Thread.run(Thread.java:722)
Suppressed: f.i.FiberStackTraceHolderException: Fiber stack trace
Caused by: f.i.FiberStackTraceHolderException$Helper
at asserts.Verify.fail(Verify.java:47)
at gm.cc.c.t.CmdTeleportRandomByMapType.asyncRun(CmdTeleportRandomByMapType.java
at ms.l.AsyncMsg.run(AsyncMsg.java:37)
at ms.i.mp.ServerMsgPublisher.processMsg(ServerMsgPublisher.java:331)
at ms.i.mp.ServerMsgPublisher.addMsgFast(ServerMsgPublisher.java:118)
...
at java.lang.Thread.run(Thread.java:722)