简体   繁体   English

AKKA:演员路由器消息持久性

[英]AKKA: Actor routers message persistence

I'm writing a webspider and allocating it on Heroku and after the main actor (the one that allocates the router) reaches 512Mb it crashes. 我正在编写一个webspider,并在Heroku上分配它,当主要演员(分配路由器的那个演员)达到512Mb之后,它崩溃了。

Basically every URL parsed is sent to the FetchRouter. 基本上,每个解析的URL都会发送到FetchRouter。 The list of messages of the queue is to big to get in memory. 队列的消息列表很大以获取内存。

Is there any way to store this list in the Disk ? 有什么办法可以将该列表存储在磁盘中?

fetcherRouter = context.actorOf(Props[URLFetcher].withRouter(RandomRouter(30)), name = "fetcherRouter")

Indeed. 确实。

There is FileBasedMailbox . FileBasedMailbox Look in section 7.1, "Durable Mailboxes," of the Akka 2.0.x PDF (or corresponding Web page). 请参阅Akka 2.0.x PDF(或相应的网页)的7.1节“耐用的邮箱”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM