{"id":19483144,"url":"https://github.com/scalabm/auctions-remote-example","last_synced_at":"2026-05-17T04:41:57.393Z","repository":{"id":93234245,"uuid":"90626459","full_name":"ScalABM/auctions-remote-example","owner":"ScalABM","description":"Example application demonstrating how to use the EconomicSL auction language to build an IoT trading platform.","archived":false,"fork":false,"pushed_at":"2018-05-28T13:57:36.000Z","size":43,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-05T06:38:19.185Z","etag":null,"topics":["agent-based-modeling","akka","iot-platform","java-8","multi-agent-systems","scala"],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ScalABM.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-08T12:37:20.000Z","updated_at":"2022-12-07T19:16:58.000Z","dependencies_parsed_at":"2023-04-25T02:26:10.797Z","dependency_job_id":null,"html_url":"https://github.com/ScalABM/auctions-remote-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ScalABM/auctions-remote-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScalABM%2Fauctions-remote-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScalABM%2Fauctions-remote-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScalABM%2Fauctions-remote-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScalABM%2Fauctions-remote-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ScalABM","download_url":"https://codeload.github.com/ScalABM/auctions-remote-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScalABM%2Fauctions-remote-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281371742,"owners_count":26489526,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-27T02:00:05.855Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-based-modeling","akka","iot-platform","java-8","multi-agent-systems","scala"],"created_at":"2024-11-10T20:13:44.116Z","updated_at":"2025-10-28T01:49:24.709Z","avatar_url":"https://github.com/ScalABM.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Remote auctions application\n\nExample application demonstrating key ideas for \"Economy Of Things\" (EoT) use cases. This example demonstrates both \nthe remote deployment of auction and settlement services that can be discovered by trading actors. The reote application \nconsists of three main components.\n\n* `TradingSystem` listens on port 2552 and starts potentially several `AuctionParticipantActor` instances that generate \n`SingleUnitAskOrder` and `SingleUnitBidOrder` instances and send them to the auction service for processing. In \npractice, I would anticipate some IoT-enabled device to have a JVM process with a `TradingSystem` with a single \n`AuctionParticipantActor` instance.  TODO: use `dccker` and `docker-compose` to demonstrate how the system would work \nwith `N` separate `TradingSystem` instances each running inside its own JVM process in a separate container.\n* `AuctionSystem` listens on port 2553 and starts an `AuctionActor` instance that provides services for matching \nindividual buyers and sellers at specific prices and quantities. The auction service generates streams of `SpotContract` \ninstances which are sent to the settlement service for further processing.\n* `SettlementSystem` listens on port 2554 and logs the received streams of `SpotContract` instances. At some point the \n`SettlementSystem` might interact with a `Blockchain` as part of the settlement service.\n\nEach of the actor systems has its own configuration file located in the `resources` directory. The `TradingSystem` uses \nthe `trading.conf`; `AuctionSystem` uses the `auction.conf`; and `SettlementSystem` uses the `settlement.conf`. All \nthree configuration files share basic settings via `common.conf`. The `common.conf` enables remoting by installing the\n`RemoteActorRefProvider` and chooses the default remote transport. Note that when deploying the services on multiple \nmachines you will need to change the default IP address with the real IP addresses.\n\nThe `SettlementActor` does not really illustrate anything exciting: it simple logs out each of the `Fill` instances it \nreceives. The `RemoteAuctionServiceActor` takes a `String` path as constructor parameter. This is the full path, \nincluding the remote address of the settlement service. \n\n\"akka.tcp://SettlementSystem@127.0.0.1:2554/user/settlement\"\n\nObserve how the actor system name of the path matches the remote settlement system’s name, as do IP address and port \nnumber. As always, top-level actors are always created below the \"/user\" guardian, which supervises them.\n\nUpon creation the `RemoteAuctionServiceActor` instance sends an `Identify` message to the actor selection of the path. \nThe remote `LoggingSettlementActor` actor will reply with an `ActorIdentity` message containing its `ActorRef`. Note \nthat `Identify` is a built-in message that all Akka `Actor` instances understand, and automatically reply to, with a \n`ActorIdentity`. If the `RemoteAuctionServiceActor` is unable to identify the remote settlement service, it will \nretry after some scheduled timeout duration.\n\nOnce the `RemoteAuctionServiceActor` has the `ActorRef` of the remote settlement service it can monitor it. The \nremote settlement system might be shutdown and later started up again, in which case the `RemoteAuctionServiceActor` \nwould receive the `Terminated` message which prompts it to retry the identification process in orde to establish a \nconnection to the new remote settlement system.\n\n### Running the remote applications\nLet's run each of the actor systems remotely in separate JVM processes. Start the settlement system by opening up a\nnew terminal window and running the following.\n\n```bash\nsbt \"run-main RemoteSettlementServiceApp\"\n```\n\nThis should generate some generic logging cruft followed by a message indicating that the settlement service has been \nactivated.  The settlement service is the core service on top of which everything else depends.  If the service is down \nor otherwise unreachable then the auction service can not operate and the participants cannot settle transactions.\n\nOnce the settlement system has started, start the auction system by opening up a new terminal window and running the following.\n\n```bash\nsbt \"run-main RemoteAuctionServiceApp\"\n```\nAgain, this should generate some logging cruft followed by a message indicating that the auction service is operational. \nFinally, start the trading system by opening up a new terminal window and running thw following.\n\n```bash\nsbt \"run-main org.economicsl.auctions.remote.RemoteAuctionExampleApp Trading\"\n```\n\nOnce the trading system is operational, you should be able to see `SpotContract` instances being logged to the terminal window \nhandling the remote settlement service.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscalabm%2Fauctions-remote-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscalabm%2Fauctions-remote-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscalabm%2Fauctions-remote-example/lists"}