Permalink
Browse files

Move into the Data.Concurrent.Queue.Roq space

  • Loading branch information...
1 parent 8b27a83 commit fc2ac6dbd99812ec2753af48d8191e1e0e3781cf Alan Zimmerman committed Mar 3, 2014
Showing with 138 additions and 138 deletions.
  1. +30 −30 main.hs
  2. +6 −6 src/Data/{HroqAlarmServer.hs → Concurrent/Queue/Roq/AlarmServer.hs}
  3. +7 −7 src/Data/{HroqApp.hs → Concurrent/Queue/Roq/App.hs}
  4. +9 −9 src/Data/{HroqConsumer.hs → Concurrent/Queue/Roq/Consumer.hs}
  5. +5 −5 src/Data/{HroqConsumerTH.hs → Concurrent/Queue/Roq/ConsumerTH.hs}
  6. +5 −5 src/Data/{HroqDlqWorkers.hs → Concurrent/Queue/Roq/DlqWorkers.hs}
  7. +3 −3 src/Data/{HroqGroups.hs → Concurrent/Queue/Roq/Groups.hs}
  8. +3 −3 src/Data/{HroqHandlePool.hs → Concurrent/Queue/Roq/HandlePool.hs}
  9. +2 −2 src/Data/{ → Concurrent/Queue/Roq}/Hroq.hs
  10. +1 −1 src/Data/{HroqLogDumper.hs → Concurrent/Queue/Roq/LogDumper.hs}
  11. +1 −1 src/Data/{HroqLogger.hs → Concurrent/Queue/Roq/Logger.hs}
  12. +8 −8 src/Data/{HroqMnesia.hs → Concurrent/Queue/Roq/Mnesia.hs}
  13. +11 −11 src/Data/{HroqQueue.hs → Concurrent/Queue/Roq/Queue.hs}
  14. +5 −5 src/Data/{HroqQueueMeta.hs → Concurrent/Queue/Roq/QueueMeta.hs}
  15. +6 −6 src/Data/{HroqQueueWatch.hs → Concurrent/Queue/Roq/QueueWatch.hs}
  16. +5 −5 src/Data/{HroqQueueWatchServer.hs → Concurrent/Queue/Roq/QueueWatchServer.hs}
  17. +4 −4 src/Data/{HroqSampleWorker.hs → Concurrent/Queue/Roq/SampleWorker.hs}
  18. +3 −3 src/Data/{HroqStatsGatherer.hs → Concurrent/Queue/Roq/StatsGatherer.hs}
  19. +7 −7 src/Data/{HroqSup.hs → Concurrent/Queue/Roq/Sup.hs}
  20. +3 −3 src/Data/{HroqUtil.hs → Concurrent/Queue/Roq/Util.hs}
  21. +11 −11 tests/TestAlarmServer.hs
  22. +3 −3 tests/TestStatsGatherer.hs
View
60 main.hs
@@ -10,24 +10,24 @@ import Control.Distributed.Process.Platform hiding (send)
import Control.Distributed.Process.Platform.Time
import Control.Distributed.Process.Platform.Timer
import Data.AffineSpace
-import Data.Hroq
-import Data.HroqAlarmServer
-import Data.HroqConsumer
-import Data.HroqConsumerTH
-import Data.HroqDlqWorkers
-import Data.HroqGroups
-import Data.HroqHandlePool
-import Data.HroqLogger
-import Data.HroqMnesia
-import Data.HroqQueue
-import Data.HroqQueueWatchServer
-import Data.HroqSampleWorker
-import Data.HroqStatsGatherer
+import Data.Concurrent.Queue.Roq.Hroq
+import Data.Concurrent.Queue.Roq.AlarmServer
+import Data.Concurrent.Queue.Roq.Consumer
+import Data.Concurrent.Queue.Roq.ConsumerTH
+import Data.Concurrent.Queue.Roq.DlqWorkers
+import Data.Concurrent.Queue.Roq.Groups
+import Data.Concurrent.Queue.Roq.HandlePool
+import Data.Concurrent.Queue.Roq.Logger
+import Data.Concurrent.Queue.Roq.Mnesia
+import Data.Concurrent.Queue.Roq.Queue
+import Data.Concurrent.Queue.Roq.QueueWatchServer
+import Data.Concurrent.Queue.Roq.SampleWorker
+import Data.Concurrent.Queue.Roq.StatsGatherer
import Data.Thyme.Clock
import Data.Thyme.Format
import Network.Transport.TCP (createTransportExposeInternals, defaultTCPParameters)
-import qualified Data.HroqApp as App
-import qualified Data.HroqGroups as G
+import qualified Data.Concurrent.Queue.Roq.App as App
+import qualified Data.Concurrent.Queue.Roq.Groups as G
import qualified Data.Map as Map
-- https://github.com/tibbe/ekg
@@ -75,7 +75,7 @@ worker_supervised ekg = do
sleepFor 1 Seconds
- Data.HroqQueueWatchServer.ping
+ Data.Concurrent.Queue.Roq.QueueWatchServer.ping
logm $ "starting queue group stuff"
q1 <- queues
@@ -238,8 +238,8 @@ worker_consumer ekg = do
{-
%The consumer will call CMod:CFun(Key, Message, CArgs) to process a message on the queue
-CMod = my_worker_mod.
-CFun = process_message.
+CMod = my_worker_mod.
+CFun = process_message.
CArgs = [my_args_any].
CInitialState = active. %active or paused - the entry state of the consumer
CDoCleanupAtShutdown = true.
@@ -268,16 +268,16 @@ startConsumer :: (ConsumerName,String,QName,QName,ConsumerFuncClosure,AppParams,
-- mapM_ (\n -> enqueue qSidb qNameB (qval $ "bar" ++ (show n))) [1..51]
- liftIO $ threadDelay (5*1000000)
+ liftIO $ threadDelay (5*1000000)
logm "enqueue starting SLAP"
mapM_ (\n -> enqueue qPid (QN "SLAP") (qval $ "bar" ++ (show n))) [1..8000]
logm "enqueue done SLAP 1"
- liftIO $ threadDelay (3*1000000)
+ liftIO $ threadDelay (3*1000000)
mapM_ (\n -> enqueue qPid (QN "SLAP") (qval $ "baz" ++ (show n))) [1..8000]
logm "enqueue done SLAP 2"
- liftIO $ threadDelay (3*1000000)
+ liftIO $ threadDelay (3*1000000)
mapM_ (\n -> enqueue qPid (QN "SLAP") (qval $ "bat" ++ (show n))) [1..8000]
logm "enqueue done SLAP 3"
@@ -341,7 +341,7 @@ startLocalNode = do
return node
where
rtable :: RemoteTable
- rtable = Data.HroqDlqWorkers.__remoteTable
+ rtable = Data.Concurrent.Queue.Roq.DlqWorkers.__remoteTable
$ Control.Distributed.Process.Platform.__remoteTable
$ initRemoteTable
-}
@@ -359,14 +359,14 @@ startLocalNode = do
where
rtable :: RemoteTable
rtable = Control.Distributed.Process.Platform.__remoteTable
- $ Data.HroqAlarmServer.__remoteTable
- $ Data.HroqConsumerTH.__remoteTable
- $ Data.HroqDlqWorkers.__remoteTable
- $ Data.HroqGroups.__remoteTable
- $ Data.HroqHandlePool.__remoteTable
- $ Data.HroqQueueWatchServer.__remoteTable
- $ Data.HroqSampleWorker.__remoteTable
- $ Data.HroqStatsGatherer.__remoteTable
+ $ Data.Concurrent.Queue.Roq.AlarmServer.__remoteTable
+ $ Data.Concurrent.Queue.Roq.ConsumerTH.__remoteTable
+ $ Data.Concurrent.Queue.Roq.DlqWorkers.__remoteTable
+ $ Data.Concurrent.Queue.Roq.Groups.__remoteTable
+ $ Data.Concurrent.Queue.Roq.HandlePool.__remoteTable
+ $ Data.Concurrent.Queue.Roq.QueueWatchServer.__remoteTable
+ $ Data.Concurrent.Queue.Roq.SampleWorker.__remoteTable
+ $ Data.Concurrent.Queue.Roq.StatsGatherer.__remoteTable
$ initRemoteTable
View
12 src/Data/HroqAlarmServer.hs → src/Data/Concurrent/Queue/Roq/AlarmServer.hs
@@ -2,7 +2,7 @@
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE ScopedTypeVariables #-}
-module Data.HroqAlarmServer
+module Data.Concurrent.Queue.Roq.AlarmServer
(
-- * Starting the server
hroq_alarm_server
@@ -19,7 +19,7 @@ module Data.HroqAlarmServer
-- * Remote Table
- , Data.HroqAlarmServer.__remoteTable
+ , Data.Concurrent.Queue.Roq.AlarmServer.__remoteTable
) where
@@ -34,10 +34,10 @@ import Control.Lens
import Data.AffineSpace
import Data.Ratio ((%))
import Data.Binary
-import Data.Hroq
-import Data.HroqGroups
-import Data.HroqLogger
-import Data.HroqStatsGatherer
+import Data.Concurrent.Queue.Roq.Hroq
+import Data.Concurrent.Queue.Roq.Groups
+import Data.Concurrent.Queue.Roq.Logger
+import Data.Concurrent.Queue.Roq.StatsGatherer
-- import Data.Time.Calendar
import Data.Thyme.Calendar
-- import Data.Time.Clock
View
14 src/Data/HroqApp.hs → src/Data/Concurrent/Queue/Roq/App.hs
@@ -1,6 +1,6 @@
{-# LANGUAGE DeriveDataTypeable #-}
-module Data.HroqApp
+module Data.Concurrent.Queue.Roq.App
(
start_app
, create_queue_meta_table
@@ -10,12 +10,12 @@ module Data.HroqApp
where
import Control.Distributed.Process hiding (call)
-import Data.Hroq
-import Data.HroqLogger
-import Data.HroqSup
-import Data.HroqMnesia
-import Data.HroqQueueMeta
-import Data.HroqQueueWatchServer
+import Data.Concurrent.Queue.Roq.Hroq
+import Data.Concurrent.Queue.Roq.Logger
+import Data.Concurrent.Queue.Roq.Sup
+import Data.Concurrent.Queue.Roq.Mnesia
+import Data.Concurrent.Queue.Roq.QueueMeta
+import Data.Concurrent.Queue.Roq.QueueWatchServer
-- ---------------------------------------------------------------------
{-
View
18 src/Data/HroqConsumer.hs → src/Data/Concurrent/Queue/Roq/Consumer.hs
@@ -3,7 +3,7 @@
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeSynonymInstances #-}
-module Data.HroqConsumer
+module Data.Concurrent.Queue.Roq.Consumer
(
pause
, resume
@@ -25,15 +25,15 @@ import Control.Distributed.Process.Platform.Time hiding (microsecondsToNominalDi
import Data.AdditiveGroup
import Data.AffineSpace
import Data.Binary
-import Data.Hroq
-import Data.HroqApp
-import Data.HroqConsumerTH
-import Data.HroqLogger
-import Data.HroqQueue
+import Data.Concurrent.Queue.Roq.Hroq
+import Data.Concurrent.Queue.Roq.App
+import Data.Concurrent.Queue.Roq.ConsumerTH
+import Data.Concurrent.Queue.Roq.Logger
+import Data.Concurrent.Queue.Roq.Queue
import Data.Thyme.Clock
import Data.Typeable hiding (cast)
import GHC.Generics
-import qualified Data.HroqMnesia as HM
+import qualified Data.Concurrent.Queue.Roq.Mnesia as HM
import qualified System.Remote.Monitoring as EKG
@@ -99,14 +99,14 @@ mycall ::
(Typeable b, Typeable a, Binary b, Binary a)
=> ConsumerName -> a -> Process b
mycall consumerName op = do
- sid <- getPid consumerName
+ sid <- Data.Concurrent.Queue.Roq.Consumer.getPid consumerName
call sid op
mycast ::
(Typeable a, Binary a)
=> ConsumerName -> a -> Process ()
mycast consumerName op = do
- sid <- getPid consumerName
+ sid <- Data.Concurrent.Queue.Roq.Consumer.getPid consumerName
cast sid op
-- ---------------------------------------------------------------------
View
10 src/Data/HroqConsumerTH.hs → src/Data/Concurrent/Queue/Roq/ConsumerTH.hs
@@ -1,7 +1,7 @@
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
-module Data.HroqConsumerTH
+module Data.Concurrent.Queue.Roq.ConsumerTH
(
acquire_and_store_msg
, __remoteTable
@@ -10,10 +10,10 @@ module Data.HroqConsumerTH
import Control.Distributed.Process hiding (call)
import Control.Distributed.Process.Closure
-import Data.Hroq
-import Data.HroqApp
-import Data.HroqLogger
-import qualified Data.HroqMnesia as HM
+import Data.Concurrent.Queue.Roq.Hroq
+import Data.Concurrent.Queue.Roq.App
+import Data.Concurrent.Queue.Roq.Logger
+import qualified Data.Concurrent.Queue.Roq.Mnesia as HM
-- ---------------------------------------------------------------------
-- acquire_and_store_msg(Key, Msg, {CName, SrcQ}) -> ok = eroq_util:retry_dirty_write(10, eroq_consumer_local_storage_table, #eroq_consumer_message{cid=CName, key = Key, msg = Msg, src_queue = SrcQ, timestamp = now()}).
View
10 src/Data/HroqDlqWorkers.hs → src/Data/Concurrent/Queue/Roq/DlqWorkers.hs
@@ -1,5 +1,5 @@
{-# LANGUAGE TemplateHaskell #-}
-module Data.HroqDlqWorkers
+module Data.Concurrent.Queue.Roq.DlqWorkers
(
requeue
, purge
@@ -10,16 +10,16 @@ module Data.HroqDlqWorkers
import Control.Distributed.Process hiding (call)
import Control.Distributed.Process.Closure
-import Data.Hroq
-import Data.HroqLogger
-import Data.HroqQueue
+import Data.Concurrent.Queue.Roq.Hroq
+import Data.Concurrent.Queue.Roq.Logger
+import Data.Concurrent.Queue.Roq.Queue
-- ---------------------------------------------------------------------
requeuer :: QName -> WorkerFunc
requeuer destQ entry@(QE _ qv) = do
logm $ "purger:" ++ (show (destQ,entry))
- qpid <- Data.HroqQueue.getSid destQ
+ qpid <- Data.Concurrent.Queue.Roq.Queue.getSid destQ
enqueue qpid destQ qv
return (Right ())
View
6 src/Data/HroqGroups.hs → src/Data/Concurrent/Queue/Roq/Groups.hs
@@ -2,7 +2,7 @@
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
-module Data.HroqGroups
+module Data.Concurrent.Queue.Roq.Groups
(
-- * Starting the server
hroq_groups
@@ -36,8 +36,8 @@ import Control.Distributed.Process.Platform.ManagedProcess hiding (runProcess)
import Control.Distributed.Process.Platform.Time
import Data.Binary
import qualified Data.Map as Map
-import Data.Hroq
-import Data.HroqLogger
+import Data.Concurrent.Queue.Roq.Hroq
+import Data.Concurrent.Queue.Roq.Logger
import Data.Typeable
import GHC.Generics
View
6 src/Data/HroqHandlePool.hs → src/Data/Concurrent/Queue/Roq/HandlePool.hs
@@ -3,7 +3,7 @@
{-# LANGUAGE DeriveGeneric #-}
-- | A pool of handles
-module Data.HroqHandlePool
+module Data.Concurrent.Queue.Roq.HandlePool
(
-- * Starting the server
hroq_handle_pool_server
@@ -21,7 +21,7 @@ module Data.HroqHandlePool
, safeOpenFile
-- * Remote Table
- , Data.HroqHandlePool.__remoteTable
+ , Data.Concurrent.Queue.Roq.HandlePool.__remoteTable
) where
@@ -33,7 +33,7 @@ import Control.Distributed.Process.Platform.Time
import Control.Distributed.Process.Serializable()
import Control.Exception hiding (try,catch)
import Data.Binary
-import Data.HroqLogger
+import Data.Concurrent.Queue.Roq.Logger
import Data.List
import Data.Typeable (Typeable)
import GHC.Generics
View
4 src/Data/Hroq.hs → src/Data/Concurrent/Queue/Roq/Hroq.hs
@@ -5,7 +5,7 @@
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
-module Data.Hroq
+module Data.Concurrent.Queue.Roq.Hroq
(
ConsumerName(..)
, ConsumerMessage(..)
@@ -46,7 +46,7 @@ import Control.Distributed.Process hiding (call)
import Control.Lens
import Data.AffineSpace
import Data.Binary
-import Data.HroqLogger
+import Data.Concurrent.Queue.Roq.Logger
import Data.Ratio ((%))
import Data.RefSerialize
import Data.Thyme.Calendar
View
2 src/Data/HroqLogDumper.hs → src/Data/Concurrent/Queue/Roq/LogDumper.hs
@@ -1,4 +1,4 @@
-module Data.HroqLogDumper
+module Data.Concurrent.Queue.Roq.LogDumper
(
hroq_log_dumper
) where
View
2 src/Data/HroqLogger.hs → src/Data/Concurrent/Queue/Roq/Logger.hs
@@ -1,6 +1,6 @@
{-# LANGUAGE ScopedTypeVariables #-}
-module Data.HroqLogger
+module Data.Concurrent.Queue.Roq.Logger
(
startLoggerProcess
View
16 src/Data/HroqMnesia.hs → src/Data/Concurrent/Queue/Roq/Mnesia.hs
@@ -1,7 +1,7 @@
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# Language ScopedTypeVariables #-}
-module Data.HroqMnesia
+module Data.Concurrent.Queue.Roq.Mnesia
(
-- * Schema etc
create_schema
@@ -33,7 +33,7 @@ module Data.HroqMnesia
, startHroqMnesia
- , getSid
+ , getPid
-- * debug
, queueExists
@@ -53,9 +53,9 @@ import Control.Exception as Exception
import Control.Monad(when,foldM)
import Data.Binary
import Data.Binary.Get
-import Data.Hroq
-import Data.HroqHandlePool
-import Data.HroqLogger
+import Data.Concurrent.Queue.Roq.Hroq
+import Data.Concurrent.Queue.Roq.HandlePool
+import Data.Concurrent.Queue.Roq.Logger
import Data.Int
import Data.List(elemIndices,isInfixOf,(\\))
import Data.Maybe(fromMaybe,isNothing)
@@ -447,8 +447,8 @@ schemaTable = TN "hschema"
-- ---------------------------------------------------------------------
-getSid :: Process ProcessId
-getSid = do
+getPid :: Process ProcessId
+getPid = do
-- deliberately blow up if not registered
Just pid <- whereis hroqMnesiaName
return pid
@@ -457,7 +457,7 @@ mycall ::
(Typeable b, Typeable a, Binary b, Binary a)
=> a -> Process b
mycall op = do
- sid <- getSid
+ sid <- getPid
call sid op
-- ---------------------------------------------------------------------
View
22 src/Data/HroqQueue.hs → src/Data/Concurrent/Queue/Roq/Queue.hs
@@ -3,7 +3,7 @@
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeSynonymInstances #-}
-module Data.HroqQueue
+module Data.Concurrent.Queue.Roq.Queue
(
enqueue
, enqueueCast
@@ -27,21 +27,21 @@ import Control.Distributed.Process.Platform hiding (monitor)
import Control.Distributed.Process.Platform.ManagedProcess hiding (runProcess)
import Control.Distributed.Process.Platform.Time
import Data.Binary
-import Data.Hroq
-import Data.HroqGroups
-import Data.HroqHandlePool
-import Data.HroqLogger
-import Data.HroqQueueMeta
-import Data.HroqStatsGatherer
-import Data.HroqUtil
+import Data.Concurrent.Queue.Roq.Hroq
+import Data.Concurrent.Queue.Roq.Groups
+import Data.Concurrent.Queue.Roq.HandlePool
+import Data.Concurrent.Queue.Roq.Logger
+import Data.Concurrent.Queue.Roq.QueueMeta
+import Data.Concurrent.Queue.Roq.StatsGatherer
+import Data.Concurrent.Queue.Roq.Util
import Data.List
import Data.Typeable (Typeable)
import GHC.Generics
import System.Directory
import System.IO
import System.IO.Error
import qualified Data.ByteString.Lazy.Char8 as B
-import qualified Data.HroqMnesia as HM
+import qualified Data.Concurrent.Queue.Roq.Mnesia as HM
import qualified Data.Map as Map
import qualified System.Remote.Monitoring as EKG
@@ -203,7 +203,7 @@ initFunc (queueName,appInfo,doCleanup,ekg) = do
-- process_flag(trap_exit, true),
- mpid <- HM.getSid
+ mpid <- HM.getPid
HM.wait_for_tables [hroq_queue_meta_table] Infinity
logm $ "HroqQueue:initFunc 1"
@@ -232,7 +232,7 @@ initFunc (queueName,appInfo,doCleanup,ekg) = do
allKeys <- HM.dirty_all_keys currProcBucket
logm $ "HroqQueue:initFunc 5"
- mnesiaSid <- HM.getSid
+ mnesiaSid <- HM.getPid
handlePoolPid <- hroq_handle_pool_server_pid
statsPid <- hroq_stats_gatherer_pid
let s = QueueState
View
10 src/Data/HroqQueueMeta.hs → src/Data/Concurrent/Queue/Roq/QueueMeta.hs
@@ -1,6 +1,6 @@
{-# LANGUAGE DeriveDataTypeable #-}
-module Data.HroqQueueMeta
+module Data.Concurrent.Queue.Roq.QueueMeta
(
meta_add_bucket
, meta_all_buckets
@@ -12,10 +12,10 @@ module Data.HroqQueueMeta
import Control.Distributed.Process hiding (call)
import Data.List
-import Data.Hroq
-import Data.HroqLogger
-import Data.HroqMnesia
-import Data.HroqUtil
+import Data.Concurrent.Queue.Roq.Hroq
+import Data.Concurrent.Queue.Roq.Logger
+import Data.Concurrent.Queue.Roq.Mnesia
+import Data.Concurrent.Queue.Roq.Util
-- ---------------------------------------------------------------------
View
12 src/Data/HroqQueueWatch.hs → src/Data/Concurrent/Queue/Roq/QueueWatch.hs
@@ -1,7 +1,7 @@
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
-module Data.HroqQueueWatch
+module Data.Concurrent.Queue.Roq.QueueWatch
(
-- * API
@@ -14,7 +14,7 @@ module Data.HroqQueueWatch
-- , ping
-- * Remote Table
- -- , Data.HroqQueueWatchServer.__remoteTable
+ -- , Data.Concurrent.Queue.Roq.QueueWatchServer.__remoteTable
) where
@@ -27,10 +27,10 @@ import Control.Distributed.Process.Platform.Time
import Control.Distributed.Process.Serializable()
import Control.Exception hiding (try,catch)
import Data.Binary
-import Data.Hroq
-import Data.HroqGroups
-import Data.HroqLogger
-import Data.HroqStatsGatherer
+import Data.Concurrent.Queue.Roq.Hroq
+import Data.Concurrent.Queue.Roq.Groups
+import Data.Concurrent.Queue.Roq.Logger
+import Data.Concurrent.Queue.Roq.StatsGatherer
-- import Data.Time.Calendar
import Data.Thyme.Calendar
-- import Data.Time.Clock
View
10 src/Data/HroqQueueWatchServer.hs → .../Concurrent/Queue/Roq/QueueWatchServer.hs
@@ -1,7 +1,7 @@
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
-module Data.HroqQueueWatchServer
+module Data.Concurrent.Queue.Roq.QueueWatchServer
(
-- * Starting the server
hroq_queue_watch_server
@@ -17,7 +17,7 @@ module Data.HroqQueueWatchServer
, noopFun
-- * Remote Table
- , Data.HroqQueueWatchServer.__remoteTable
+ , Data.Concurrent.Queue.Roq.QueueWatchServer.__remoteTable
) where
@@ -29,9 +29,9 @@ import Control.Distributed.Process.Platform.Time
import Control.Distributed.Process.Serializable()
import Control.Exception hiding (try,catch)
import Data.Binary
-import Data.HroqLogger
-import Data.HroqQueueWatch
-import Data.HroqStatsGatherer hiding (ping)
+import Data.Concurrent.Queue.Roq.Logger
+import Data.Concurrent.Queue.Roq.QueueWatch
+import Data.Concurrent.Queue.Roq.StatsGatherer hiding (ping)
import Data.Typeable (Typeable)
import GHC.Generics
import System.Environment
View
8 src/Data/HroqSampleWorker.hs → ...Data/Concurrent/Queue/Roq/SampleWorker.hs
@@ -1,5 +1,5 @@
{-# LANGUAGE TemplateHaskell #-}
-module Data.HroqSampleWorker
+module Data.Concurrent.Queue.Roq.SampleWorker
(
sampleWorker
@@ -9,9 +9,9 @@ module Data.HroqSampleWorker
import Control.Distributed.Process hiding (call)
import Control.Distributed.Process.Closure
-import Data.Hroq
-import qualified Data.HroqConsumer as HC
-import Data.HroqLogger
+import Data.Concurrent.Queue.Roq.Hroq
+import qualified Data.Concurrent.Queue.Roq.Consumer as HC
+import Data.Concurrent.Queue.Roq.Logger
-- ---------------------------------------------------------------------
View
6 src/Data/HroqStatsGatherer.hs → ...ata/Concurrent/Queue/Roq/StatsGatherer.hs
@@ -1,7 +1,7 @@
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
-module Data.HroqStatsGatherer
+module Data.Concurrent.Queue.Roq.StatsGatherer
(
-- * Starting the server
hroq_stats_gatherer
@@ -37,8 +37,8 @@ import Control.Distributed.Process.Serializable()
import Data.Binary
import Data.Typeable (Typeable)
import qualified Data.Map as Map
-import Data.Hroq
-import Data.HroqLogger
+import Data.Concurrent.Queue.Roq.Hroq
+import Data.Concurrent.Queue.Roq.Logger
import GHC.Generics
View
14 src/Data/HroqSup.hs → src/Data/Concurrent/Queue/Roq/Sup.hs
@@ -1,4 +1,4 @@
-module Data.HroqSup
+module Data.Concurrent.Queue.Roq.Sup
(
hroq_start_link
)
@@ -8,12 +8,12 @@ import Control.Distributed.Process hiding (call)
-- import Control.Distributed.Process.Platform.ManagedProcess hiding (runProcess)
import Control.Distributed.Process.Platform.Supervisor
import Control.Distributed.Process.Platform.Time
-import Data.HroqAlarmServer
-import Data.HroqGroups
-import Data.HroqHandlePool
-import Data.HroqLogger
-import Data.HroqStatsGatherer
-import Data.HroqQueueWatchServer
+import Data.Concurrent.Queue.Roq.AlarmServer
+import Data.Concurrent.Queue.Roq.Groups
+import Data.Concurrent.Queue.Roq.HandlePool
+import Data.Concurrent.Queue.Roq.Logger
+import Data.Concurrent.Queue.Roq.StatsGatherer
+import Data.Concurrent.Queue.Roq.QueueWatchServer
-- ---------------------------------------------------------------------
View
6 src/Data/HroqUtil.hs → src/Data/Concurrent/Queue/Roq/Util.hs
@@ -1,4 +1,4 @@
-module Data.HroqUtil
+module Data.Concurrent.Queue.Roq.Util
(
generate_key
, retry_dirty_write
@@ -9,8 +9,8 @@ module Data.HroqUtil
import Prelude -- hiding (catch)
import Control.Distributed.Process hiding (call)
-import Data.Hroq
-import Data.HroqMnesia
+import Data.Concurrent.Queue.Roq.Hroq
+import Data.Concurrent.Queue.Roq.Mnesia
-- import Data.Time.Clock
import Data.Thyme.Clock
import System.IO.Unsafe
View
22 tests/TestAlarmServer.hs
@@ -18,11 +18,11 @@ import Control.Distributed.Process.Serializable()
import Control.Distributed.Process.Platform.Timer
-import Data.Hroq
-import qualified Data.HroqStatsGatherer as SG
-import qualified Data.HroqGroups as G
-import qualified Data.HroqAlarmServer as A
-import Data.HroqAlarmServer (__remoteTable)
+import Data.Concurrent.Queue.Roq.Hroq
+import qualified Data.Concurrent.Queue.Roq.StatsGatherer as SG
+import qualified Data.Concurrent.Queue.Roq.Groups as G
+import qualified Data.Concurrent.Queue.Roq.AlarmServer as A
+import Data.Concurrent.Queue.Roq.AlarmServer (__remoteTable)
#if ! MIN_VERSION_base(4,6,0)
import Prelude hiding (catch)
@@ -172,12 +172,12 @@ tests transport = do
rtable :: RemoteTable
rtable = Control.Distributed.Process.Platform.__remoteTable
- $ Data.HroqAlarmServer.__remoteTable
- -- $ Data.HroqConsumerTH.__remoteTable
- -- $ Data.HroqDlqWorkers.__remoteTable
- -- $ Data.HroqGroups.__remoteTable
- -- $ Data.HroqSampleWorker.__remoteTable
- -- $ Data.HroqStatsGatherer.__remoteTable
+ $ Data.Concurrent.Queue.Roq.AlarmServer.__remoteTable
+ -- $ Data.Concurrent.Queue.Roq.ConsumerTH.__remoteTable
+ -- $ Data.Concurrent.Queue.Roq.DlqWorkers.__remoteTable
+ -- $ Data.Concurrent.Queue.Roq.Groups.__remoteTable
+ -- $ Data.Concurrent.Queue.Roq.SampleWorker.__remoteTable
+ -- $ Data.Concurrent.Queue.Roq.StatsGatherer.__remoteTable
$ initRemoteTable
View
6 tests/TestStatsGatherer.hs
@@ -18,9 +18,9 @@ import Control.Distributed.Process.Serializable()
import Control.Distributed.Process.Platform.Timer
-import Data.Hroq
-import qualified Data.HroqStatsGatherer as SG
-import qualified Data.HroqGroups as G
+import Data.Concurrent.Queue.Roq.Hroq
+import qualified Data.Concurrent.Queue.Roq.StatsGatherer as SG
+import qualified Data.Concurrent.Queue.Roq.Groups as G
#if ! MIN_VERSION_base(4,6,0)
import Prelude hiding (catch)

0 comments on commit fc2ac6d

Please sign in to comment.